:root {
  --green: #1e3a2b;
  --green-deep: #142a1f;
  --cream: #faf6ef;
  --terra: #c96f4a;
  --terra-dark: #a8562f;
  --ink: #2b2b26;
  --muted: #6f6a5e;
  --line: #e7dfd0;
  --card: #ffffff;
  --radius: 18px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Inter", system-ui, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
}
h1, h2, h3, .serif { font-family: "Fraunces", Georgia, serif; font-weight: 600; line-height: 1.2; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 239, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1120px; margin: 0 auto; }
.logo { font-family: "Fraunces", serif; font-size: 1.4rem; color: var(--green); text-decoration: none; }
.logo span { color: var(--terra); }
.nav a.btn { text-decoration: none; }
.btn {
  display: inline-block; background: var(--terra); color: #fff !important;
  padding: 12px 26px; border-radius: 999px; border: none; cursor: pointer;
  font-weight: 600; font-size: 1rem; text-decoration: none; text-align: center;
  transition: transform .15s, background .15s;
}
.btn:hover { background: var(--terra-dark); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--green) !important; border: 2px solid var(--green); }
.btn.block { display: block; width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 78vh; display: flex; align-items: flex-end; color: #fff; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,42,31,.85), rgba(20,42,31,.15) 60%, rgba(20,42,31,.25)); }
.hero-inner { position: relative; z-index: 2; padding: 60px 20px 48px; max-width: 1120px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 14ch; }
.hero p { font-size: 1.15rem; opacity: .92; margin: 12px 0 26px; max-width: 46ch; }
.search {
  background: #fff; border-radius: var(--radius); padding: 14px;
  display: grid; gap: 10px; color: var(--ink);
  box-shadow: 0 18px 40px rgba(20,42,31,.25);
}
@media (min-width: 760px) { .search { grid-template-columns: 1fr 1fr 1fr auto; align-items: end; } }
.field label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.field input, .field select {
  width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 1rem; background: var(--cream); color: var(--ink);
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); color: var(--green); }
.sec-head p { color: var(--muted); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .18s, box-shadow .18s; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(30,58,43,.14); }
.card .ph { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .ph img { transform: scale(1.05); }
.badge {
  position: absolute; top: 12px; left: 12px; background: rgba(20,42,31,.85); color: #fff;
  font-size: .75rem; font-weight: 600; padding: 6px 12px; border-radius: 999px;
}
.badge.free { background: #2e7d4f; }
.badge.busy { background: #a33b2e; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.35rem; color: var(--green); }
.card-body .tag { color: var(--muted); font-size: .95rem; }
.meta { display: flex; gap: 14px; font-size: .9rem; color: var(--muted); flex-wrap: wrap; }
.price-row { margin-top: auto; padding-top: 10px; display: flex; align-items: baseline; justify-content: space-between; }
.price { font-size: 1.3rem; font-weight: 700; color: var(--green); }
.price small { font-weight: 400; font-size: .85rem; color: var(--muted); }
.link { color: var(--terra-dark); font-weight: 600; }

/* ---------- Features ---------- */
.feats { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .feats { grid-template-columns: repeat(3, 1fr); } }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.feat .ic { font-size: 2rem; }
.feat h3 { margin: 10px 0 6px; color: var(--green); }
.feat p { color: var(--muted); font-size: .95rem; }

/* ---------- Detail page ---------- */
.detail-hero { position: relative; height: 44vh; min-height: 300px; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.back { position: absolute; top: 16px; left: 16px; z-index: 3; background: rgba(250,246,239,.94); border-radius: 999px; padding: 9px 18px; text-decoration: none; font-weight: 600; font-size: .9rem; }
.detail { display: grid; gap: 28px; padding: 34px 0 70px; }
@media (min-width: 900px) { .detail { grid-template-columns: 1.5fr 1fr; } }
.detail h1 { color: var(--green); font-size: clamp(1.9rem, 4vw, 2.8rem); }
.detail .tag { color: var(--muted); font-size: 1.1rem; margin: 6px 0 18px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 26px; }
.thumbs img { border-radius: 12px; aspect-ratio: 4/3; object-fit: cover; cursor: pointer; border: 2px solid transparent; }
.thumbs img.on { border-color: var(--terra); }
.amen { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 22px; }
.amen span { background: #efe9da; border-radius: 999px; padding: 8px 15px; font-size: .9rem; }
.desc { color: #3d3a33; font-size: 1.05rem; }
.book {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 84px; align-self: start;
  box-shadow: 0 12px 30px rgba(30,58,43,.1);
}
.book .pr { font-size: 1.6rem; font-weight: 700; color: var(--green); }
.book .pr small { font-size: .9rem; color: var(--muted); font-weight: 400; }
.totals { margin: 16px 0; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 6px; font-size: .95rem; }
.totals .t { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; color: var(--green); }
.book .field { margin-bottom: 10px; }

/* ---------- Calendar ---------- */
.cal-nav { display: flex; justify-content: space-between; margin-bottom: 10px; }
.cal-nav button { background: none; border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 16px; cursor: pointer; font-weight: 600; color: var(--green); }
.cal-month { margin-bottom: 18px; }
.cal-title { font-weight: 700; color: var(--green); margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-dow { font-size: .75rem; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.cal-day {
  aspect-ratio: 1; border: none; border-radius: 10px; background: #f1ebdd;
  cursor: pointer; font-size: .9rem; color: var(--ink);
}
.cal-day:hover:not(:disabled) { background: var(--terra); color: #fff; }
.cal-day.past { opacity: .35; cursor: default; }
.cal-day.blocked { background: #e5cfc9; color: #8a5a50; text-decoration: line-through; cursor: default; }
.cal-day.sel-start, .cal-day.sel-end { background: var(--green); color: #fff; font-weight: 700; }
.cal-day.in-range { background: #cfe0d4; }
.legend { display: flex; gap: 16px; font-size: .82rem; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; }

/* ---------- Admin ---------- */
.admin-box { max-width: 860px; margin: 40px auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.tabs button { border: 1.5px solid var(--line); background: var(--cream); border-radius: 999px; padding: 9px 18px; cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--green); color: #fff; border-color: var(--green); }
.req { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 12px; display: grid; gap: 6px; }
.req .st { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 4px 12px; border-radius: 999px; width: fit-content; }
.st.pendiente { background: #fdf0d5; color: #8a6d1a; }
.st.confirmada { background: #d8ecdd; color: #2e7d4f; }
.st.rechazada { background: #f3d9d4; color: #a33b2e; }
.req .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.req .acts button { border-radius: 999px; padding: 8px 16px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; font-size: .88rem; }
.req .acts button.ok { background: var(--green); color: #fff; border-color: var(--green); }
.req .acts button.no { color: #a33b2e; border-color: #e0b3ac; }
.req .acts button.del { color: var(--muted); }
.note { background: #fdf6e9; border: 1px solid #ecd9ac; border-radius: 12px; padding: 14px 16px; font-size: .9rem; color: #6b5a2e; margin: 16px 0; }
table.prices { width: 100%; border-collapse: collapse; }
table.prices td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
table.prices input { width: 130px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1rem; }

/* ---------- Footer ---------- */
footer { background: var(--green-deep); color: #e9e2d2; padding: 46px 0 30px; margin-top: 20px; }
footer .wrap { display: grid; gap: 26px; }
@media (min-width: 760px) { footer .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
footer h3 { font-size: 1.5rem; margin-bottom: 10px; }
footer h3 span { color: var(--terra); }
footer p, footer a { font-size: .95rem; opacity: .9; }
footer a { display: block; margin: 6px 0; text-decoration: none; }
footer a:hover { opacity: 1; text-decoration: underline; }
.copy { text-align: center; font-size: .82rem; opacity: .6; margin-top: 30px; }
