/* ============================================================
   Vilora — Design System (Redesign 2026)
   Typography: Sora (display) + Manrope (body), self-hosted
   Palette: deep sea-teal primary, warm amber accent, hairline neutrals
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Sora';
  src: url('../fonts/sora-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Sora';
  src: url('../fonts/sora-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-500.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-600.woff2') format('woff2');
  font-weight:600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --brand: #0d5c54;
  --brand-ink: #083f3a;
  --brand-soft: #e7f0ed;
  --accent: #d97a2b;
  --bg: #ffffff;
  --surface: #f5f7f6;
  --surface-2: #eef2f0;
  --ink: #16231e;
  --ink-soft: #33433d;
  --muted: #64716b;
  --muted-2: #98a39e;
  --line: #e5eae7;
  --line-strong: #d3dcd7;
  --danger: #c13515;
  --ok: #0d7a4f;
  --footer: #0c2e2a;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-card: 0 1px 2px rgba(16,35,31,.04), 0 8px 24px rgba(16,35,31,.06);
  --shadow-float: 0 2px 6px rgba(0,0,0,.04), 0 12px 40px rgba(0,0,0,.10);
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --maxw: 1200px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.16; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 600; letter-spacing: -.01em; }
p { margin: .4em 0; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { width: 20px; height: 20px; flex: none; }
.center { text-align: center; }
.section { padding: 72px 0; }
.section-tint { background: var(--surface); }
.section-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-head h2 { margin-bottom: 0; }
.section-meta { color: var(--muted); font-size: .95rem; margin: 0; }
.link-btn { background: none; border: none; color: var(--brand); font-weight: 600; font-size: .9rem; padding: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; padding: 13px 22px; font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; line-height: 1; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); text-decoration: none; }
.btn-primary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn-sm { padding: 10px 16px; font-size: .88rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: #fff;
  border-bottom: 1px solid var(--line); transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(16,35,31,.06); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--brand); font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.brand-name { letter-spacing: -.02em; }
.main-nav { display: flex; gap: 26px; margin-left: 8px; }
.main-nav a { color: var(--ink-soft); font-weight: 500; font-size: .94rem; padding: 4px 0; }
.main-nav a:hover { color: var(--brand); text-decoration: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.saved-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); transition: border-color .15s; }
.saved-btn:hover { border-color: var(--brand); color: var(--brand); }
.saved-btn[aria-pressed="true"] { color: var(--brand); border-color: var(--brand); }
.saved-count { position: absolute; top: -6px; right: -6px; background: var(--accent); color: #fff; font-size: .68rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; }

.currency-select { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 10px; }
.currency-select select { border: 0; background: transparent; font-family: inherit; font-weight: 600; font-size: .88rem; color: var(--ink); cursor: pointer; padding: 2px; }
.currency-select select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.menu-btn { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; height: clamp(460px, 64vh, 620px); overflow: hidden; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,26,22,.28) 0%, rgba(8,26,22,.05) 40%, rgba(8,26,22,.62) 100%); }
.hero-content { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding-bottom: 96px; }
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.35); max-width: 18ch; }
.hero-sub { color: rgba(255,255,255,.92); font-size: 1.1rem; max-width: 46ch; text-shadow: 0 1px 12px rgba(0,0,0,.4); }

/* ---------- Search band (overlapping card) ---------- */
.search-band { margin-top: -52px; position: relative; z-index: 5; padding-bottom: 0; }
.search-card {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float); overflow: hidden;
}
.search-field { padding: 14px 18px; border-right: 1px solid var(--line); }
.search-field label { display: block; font-size: .78rem; font-weight: 700; color: var(--ink); margin-bottom: 4px; letter-spacing: .02em; }
.search-field input, .search-field select {
  width: 100%; border: 0; background: transparent; font-family: inherit; font-size: .95rem;
  color: var(--ink); padding: 2px 0;
}
.search-field select { cursor: pointer; }
.search-field input:focus, .search-field select:focus { outline: none; }
.search-field:focus-within { background: var(--surface); }
.search-btn { border-radius: 0; margin: 8px; padding: 0 26px; font-weight: 700; }
.search-btn .icon { width: 18px; height: 18px; }
.search-error { color: var(--danger); font-size: .88rem; margin: 10px 4px 0; }

/* ---------- Trust strip ---------- */
.trust-strip { border-bottom: 1px solid var(--line); padding: 26px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.trust-item { display: flex; align-items: center; gap: 14px; color: var(--ink-soft); font-size: .95rem; }
.trust-item .icon { width: 26px; height: 26px; color: var(--brand); }
.trust-item b { color: var(--ink); font-family: var(--font-display); }

/* ---------- Villa grid ---------- */
.villa-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.villa-card { background: #fff; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); transition: box-shadow .2s ease, transform .2s ease; }
.villa-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media-link { display: block; width: 100%; height: 100%; }
.card-media-link:hover { text-decoration: none; }
.card-media-link::after { content: ''; position: absolute; inset: 0; }
.villa-card { cursor: pointer; }
.heart {
  position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.92); border: 1px solid rgba(0,0,0,.08); color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: transform .15s, color .15s;
}
.heart:hover { transform: scale(1.06); }
.heart.is-on { color: var(--brand); }
.heart:active { transform: scale(.94); }
.card-badge {
  position: absolute; top: 14px; left: 12px; background: rgba(13,92,84,.88); color: #fff;
  font-size: .72rem; font-weight: 600; padding: 5px 11px; border-radius: 999px; letter-spacing: .02em;
}
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-title { margin: 0; font-size: 1.06rem; }
.card-rating { color: var(--ink); font-weight: 700; font-size: .9rem; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.card-rating::first-letter { color: var(--accent); }
.card-blurb { color: var(--muted); font-size: .9rem; margin: 0; }
.card-specs { color: var(--muted-2); font-size: .82rem; margin: 0; }
.card-amenities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.amenity { background: var(--surface); color: var(--ink-soft); font-size: .78rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.amenity-more { background: var(--surface-2); color: var(--muted); }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.card-actions { display: flex; align-items: center; gap: 8px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft); transition: border-color .15s, color .15s; }
.share-btn:hover { border-color: var(--brand); color: var(--brand); }
.share-btn .icon { width: 17px; height: 17px; }
.card-price b { font-size: 1.2rem; font-family: var(--font-display); font-weight: 700; color: var(--ink); }
.card-price span { color: var(--muted); font-size: .85rem; }
.empty-note { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- Calculator ---------- */
.calc-split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.calc-copy h2 { margin-bottom: 14px; }
.calc-copy p { color: var(--ink-soft); max-width: 52ch; }
.calc-points { list-style: none; padding: 0; margin: 18px 0; }
.calc-points li { position: relative; padding-left: 28px; margin-bottom: 10px; color: var(--ink-soft); }
.calc-points li::before { content: ''; position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--brand-soft); }
.calc-points li::after { content: ''; position: absolute; left: 4px; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.calc-note { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; }
.calc-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: 26px; }
.calc-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 2px rgba(22,35,30,.12);
}
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(193,53,21,.14); }
.field textarea { resize: vertical; }
.optional { color: var(--muted-2); font-weight: 400; font-size: .8rem; }
.field-error { color: var(--danger); font-size: .82rem; margin: 4px 0 0; }

.calc-results { margin-bottom: 20px; }
.calc-row { margin-bottom: 14px; }
.calc-label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.calc-value { display: block; font-family: var(--font-display); font-size: 1.25rem; color: var(--ink); }
.calc-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.calc-bar i { display: block; height: 100%; border-radius: 4px; background: var(--muted-2); transition: width .4s ease; }
.calc-row:first-child .calc-bar i { background: var(--accent); }
.calc-row:nth-child(2) .calc-bar i { background: var(--brand); }
.calc-save { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 16px 18px; margin: 18px 0 20px; }
.calc-save b { display: block; font-family: var(--font-display); font-size: 1.9rem; color: var(--brand-ink); }
.calc-save span { color: var(--ink-soft); font-size: .9rem; }
.calc-pct { display: block; color: var(--brand) !important; font-weight: 600; font-size: .85rem; }

/* ---------- Tabs / steps ---------- */
.tabs { display: inline-flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin: 0 auto 28px; }
.tab { border: 0; background: transparent; padding: 9px 20px; border-radius: 999px; font-family: inherit; font-weight: 600; font-size: .9rem; color: var(--ink-soft); transition: background .15s, color .15s; }
.tab:hover { color: var(--brand); }
.tab.is-active, .tab[aria-selected="true"] { background: #fff; color: var(--brand-ink); box-shadow: 0 1px 4px rgba(16,35,31,.1); }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { position: relative; padding: 26px 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--brand-soft); display: block; margin-bottom: 12px; }
.steps h3 { margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; }
.faq-list details { border-bottom: 1px solid var(--line-strong); }
.faq-list summary { cursor: pointer; padding: 18px 0; font-weight: 600; font-size: 1.02rem; color: var(--ink); list-style: none; position: relative; padding-right: 36px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--brand); font-weight: 400; }
.faq-list details[open] summary::after { content: '\2013'; }
.faq-list summary:hover { color: var(--brand); }
.faq-list .faq-a { padding: 0 0 18px; color: var(--ink-soft); max-width: 62ch; }
.faq-list .faq-a p { margin: 0; }

/* ---------- Destinations ---------- */
.dest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.dest-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.dest-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-card); text-decoration: none; }
.dest-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.dest-sub { color: var(--muted); font-size: .88rem; }
.dest-flag { margin-top: 10px; align-self: flex-start; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
.dest-live { border-color: var(--brand); background: linear-gradient(180deg, #fff, var(--brand-soft)); }
.dest-live .dest-flag { color: #fff; background: var(--brand); border-color: var(--brand); }
.dest-cta { background: var(--surface); border-style: dashed; }

/* ---------- Partner form ---------- */
.partner-split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.partner-media { margin: 0; }
.partner-media img { border-radius: var(--radius-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.partner-copy h2 { margin-bottom: 8px; }
.partner-copy > p { color: var(--muted); margin-bottom: 22px; }
.role-toggle { display: inline-flex; gap: 4px; background: var(--surface-2); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.role-toggle label { cursor: pointer; }
.role-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.role-toggle span { display: inline-block; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: .88rem; color: var(--ink-soft); transition: background .15s; }
.role-toggle input:checked + span { background: #fff; color: var(--brand-ink); box-shadow: 0 1px 4px rgba(16,35,31,.1); }
.role-toggle input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-status { margin-top: 14px; font-weight: 600; font-size: .92rem; min-height: 1.4em; }
.form-status.is-ok { color: var(--ok); }
.form-status.is-error { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer); color: #cfe0db; padding: 56px 0 28px; margin-top: 40px; }
.brand-footer { color: #fff; }
.footer-note { color: #9fb7b0; max-width: 34ch; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h3 { color: #fff; font-family: var(--font-body); font-size: .9rem; font-weight: 700; margin-bottom: 14px; letter-spacing: 0; }
.footer-grid nav { display: flex; flex-direction: column; gap: 9px; }
.footer-grid a { color: #cfe0db; font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.14); margin-top: 36px; padding-top: 20px; font-size: .82rem; color: #8faaa3; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .villa-grid { grid-template-columns: repeat(2, 1fr); }
  .dest-grid { grid-template-columns: repeat(2, 1fr); }
  .calc-split, .partner-split { grid-template-columns: 1fr; gap: 32px; }
  .main-nav { gap: 18px; }
}
@media (max-width: 820px) {
  .main-nav {
    position: fixed; top: 68px; left: 0; right: 0; background: #fff;
    flex-direction: column; gap: 0; padding: 8px 24px 20px; border-bottom: 1px solid var(--line);
    display: none; box-shadow: 0 12px 24px rgba(16,35,31,.08);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .main-nav a:last-child { border-bottom: 0; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .header-actions .btn-secondary { display: none; }
  .guest-select { display: none; }
  .search-card { grid-template-columns: 1fr 1fr; }
  .search-field { border-right: 0; border-bottom: 1px solid var(--line); }
  .search-btn { grid-column: span 2; margin: 10px; border-radius: var(--radius-sm); }
  .trust-grid { grid-template-columns: 1fr; gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .villa-grid { grid-template-columns: 1fr; }
  .dest-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: 1fr; }
  .search-card { grid-template-columns: 1fr; }
  .search-btn { grid-column: span 1; }
  .section { padding: 52px 0; }
  .hero-content { padding-bottom: 110px; }
}

/* ---------- Focus visibility (a11y) ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.villa-card:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.price-src { display: inline-block; font-size: .68rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; vertical-align: middle; text-transform: uppercase; letter-spacing: .04em; }
.bp-price .price-src { display: block; border: 0; padding: 0; margin-top: 2px; text-transform: none; letter-spacing: 0; font-size: .78rem; }

/* ============================================================
   Vilora — App layer (detail page + chat drawer)
   Extends styles.css with booking-page & chat components
   ============================================================ */

/* ---------- gallery ---------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; margin: 12px 0 24px; height: 460px; }
.gallery-hero, .gallery-side { border-radius: var(--radius); overflow: hidden; }
.gallery-hero { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface-2); cursor: pointer; }
.gallery-hero img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-hero:hover img { transform: scale(1.03); }
.gallery-expand {
  position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.94); color: var(--ink); border-radius: 999px; padding: 8px 14px;
  font-family: var(--font-body); font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-card);
}
.gallery-expand .icon { width: 15px; height: 15px; }
.gallery-side { display: grid; grid-template-rows: repeat(3, 1fr); gap: 8px; }
.gallery-thumb { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); cursor: pointer; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-thumb:hover img { transform: scale(1.05); }
.gallery-thumb.is-active { outline: 2px solid var(--brand); outline-offset: -2px; }
.gallery-thumb-more { position: relative; }
.gallery-thumb-more::after { content: ''; position: absolute; inset: 0; background: rgba(8,26,22,.45); }
.gallery-thumb-more span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; z-index: 1;
}
@media (max-width: 820px) {
  .gallery { grid-template-columns: 1fr; height: auto; }
  .gallery-hero { height: 320px; }
  .gallery-side { grid-template-columns: repeat(4, 1fr); grid-template-rows: auto; height: 72px; }
}

/* ---------- lightbox ---------- */
[hidden] { display: none !important; }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(7,20,17,.94); display: flex; flex-direction: column; }
.lb-stage { flex: 1; display: flex; align-items: stretch; justify-content: flex-start; min-height: 0; padding: 40px 84px 8px; touch-action: pan-y; overflow: hidden; }
.lb-track { display: flex; flex: 0 0 300%; width: 300%; height: 100%; will-change: transform; transform: translateX(-33.3333%); cursor: grab; }
.lb-track.anim { transition: transform .28s cubic-bezier(.22,.61,.36,1); }
.lb-track.dragging { cursor: grabbing; }
.lb-slide { flex: 0 0 33.3333%; width: 33.3333%; height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 80px rgba(0,0,0,.5); user-select: none; -webkit-user-drag: none; }
.lb-slide:empty { box-shadow: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255,255,255,.12); color: #fff; font-size: 2rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; padding-bottom: 4px;
  transition: background .15s ease, transform .12s ease;
}
.lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-nav:active { transform: translateY(-50%) scale(.92); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close {
  position: absolute; top: 16px; right: 18px; z-index: 3; width: 44px; height: 44px;
  border-radius: 50%; border: 0; cursor: pointer; background: rgba(255,255,255,.12); color: #fff;
  font-size: 1.15rem; display: flex; align-items: center; justify-content: center;
}
.lb-close:hover { background: rgba(255,255,255,.26); }
.lb-caption {
  display: flex; align-items: baseline; justify-content: center; gap: 14px;
  color: rgba(255,255,255,.92); padding: 10px 16px 2px; font-size: .92rem; text-align: center;
}
.lb-count { color: rgba(255,255,255,.55); font-size: .82rem; font-variant-numeric: tabular-nums; }
.lb-thumbs { display: flex; gap: 6px; justify-content: center; overflow-x: auto; padding: 8px 16px 12px; scrollbar-width: thin; }
.lb-thumb { flex: 0 0 52px; width: 52px; height: 38px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: none; opacity: .55; transition: opacity .15s ease, border-color .15s ease; }
.lb-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.is-active { border-color: #fff; opacity: 1; }
@media (max-width: 700px) {
  .lb-stage { padding: 64px 10px 6px; }
  .lb-stage img { border-radius: 6px; }
  .lb-nav { width: 44px; height: 44px; top: auto; bottom: 86px; }
  .lb-prev { left: 10px; }
  .lb-next { right: 10px; }
  .lb-thumb { flex-basis: 44px; width: 44px; height: 32px; }
}

.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.detail-head h1 { margin-bottom: 6px; }
.detail-sub { color: var(--muted); font-size: .95rem; margin: 0; }
.detail-host { display: flex; align-items: center; gap: 16px; }
.host-chip { display: flex; align-items: center; gap: 12px; }
.host-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); font-size: 1.1rem; flex: none; }
.host-since { display: block; color: var(--muted); font-size: .8rem; }

.detail-split { display: grid; grid-template-columns: 1fr 400px; gap: 48px; align-items: start; }
.detail-split > * { min-width: 0; }
@media (max-width: 980px) { .detail-split { grid-template-columns: 1fr; } }

.detail-section { padding: 26px 0; border-top: 1px solid var(--line); }
.detail-section h2 { margin-bottom: 12px; }
.detail-blurb { font-size: 1.05rem; color: var(--ink); }
.detail-desc { color: var(--ink-soft); max-width: 64ch; }

.amenity-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.amenity-grid li { display: flex; align-items: center; gap: 10px; color: var(--ink-soft); font-size: .94rem; }
.amenity-grid li::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
@media (max-width: 560px) { .amenity-grid { grid-template-columns: 1fr; } }

.policy-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.policy-list li { color: var(--ink-soft); font-size: .94rem; padding-left: 18px; position: relative; }
.policy-list li::before { content: '§'; position: absolute; left: 0; color: var(--brand); font-weight: 600; }

.bp-calendar { margin: 12px 0 0; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 600; font-size: 14px; }
.cal-nav { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 14px; color: var(--text); }
.cal-nav:hover { background: var(--surface-hover); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.cal-empty { }
.cal-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 13px; border: none; border-radius: 6px; background: none; cursor: pointer; color: var(--text); transition: background .1s; }
.cal-day:hover:not(.cal-past):not(.cal-in):not(.cal-out) { background: var(--surface-hover); }
.cal-past { color: var(--border); cursor: default; }
.cal-in { background: var(--primary) !important; color: #fff !important; border-radius: 6px 0 0 6px; }
.cal-out { background: var(--primary) !important; color: #fff !important; border-radius: 0 6px 6px 0; }
.cal-range { background: rgba(13,92,84,.12); border-radius: 0; }
.cal-in.cal-out { border-radius: 6px; }

/* Payment */
.bp-payment { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.bp-payment-title { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.bp-pay-opt { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 6px; }
.bp-pay-opt b { display: block; font-size: 13px; }
.bp-pay-detail { font-size: 12px; color: var(--muted); }

/* Map */
.map-ph, .map-embed { border-radius: var(--radius); overflow: hidden; }
.map-embed iframe { display: block; width: 100%; height: 260px; border: 0; border-radius: 14px; }

.fair-mini { display: flex; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.fair-step { display: flex; align-items: center; gap: 8px; background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: .84rem; color: var(--ink-soft); }
.fair-step b { width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .78rem; flex: none; }

/* ---------- booking panel ---------- */
.booking-panel {
  position: sticky; top: 84px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-float); padding: 24px;
}
.bp-price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 16px; }
.bp-price b { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.bp-price span { color: var(--muted); }
.bp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.bp-quote { margin: 18px 0; border-top: 1px solid var(--line); padding-top: 16px; }
.bp-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .92rem; color: var(--ink); }
.bp-muted { color: var(--muted); }
.bp-total { font-weight: 700; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 1rem; }
.bp-note { font-size: .8rem; color: var(--muted); margin: 10px 0 0; }
.bp-center { text-align: center; }

.bp-confirmed { text-align: center; }
.bp-ok-mark { width: 52px; height: 52px; border-radius: 50%; background: #e5f4ec; display: flex; align-items: center; justify-content: center; margin: 6px auto 12px; }
.bp-confirmed b { display: block; font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 4px; }
.bp-code { display: inline-block; font-family: var(--font-display); font-weight: 700; color: var(--brand); background: var(--brand-soft); padding: 3px 12px; border-radius: 999px; font-size: .82rem; letter-spacing: .04em; margin-bottom: 10px; }
.bp-confirmed .btn { margin-top: 14px; }

/* ---------- chat drawer ---------- */
.chat-backdrop { position: fixed; inset: 0; background: rgba(8,26,22,.4); z-index: 90; }
.chat-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw;
  background: #fff; z-index: 100; display: flex; flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,.16); transform: translateX(0);
  transition: transform .25s ease;
}
.chat-drawer[aria-hidden="true"] { transform: translateX(100%); visibility: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat-head-info { display: flex; align-items: center; gap: 12px; }
.chat-sub { display: block; color: var(--muted); font-size: .78rem; }
.chat-close { border: 0; background: none; font-size: 1.1rem; color: var(--muted); width: 36px; height: 36px; border-radius: 50%; }
.chat-close:hover { background: var(--surface); color: var(--ink); }

.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: .93rem; line-height: 1.45; animation: msg-in .18s ease; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.guest { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.host { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.system { align-self: center; background: transparent; color: var(--muted); font-size: .8rem; text-align: center; max-width: 90%; }
.msg .msg-time { display: block; font-size: .68rem; opacity: .6; margin-top: 3px; }
.msg.guest .msg-time { color: rgba(255,255,255,.8); }

.agreement-card {
  align-self: stretch; background: #fff; border: 1px solid var(--brand);
  border-radius: var(--radius); padding: 14px; margin: 4px 0;
}
.agreement-card .ag-title { font-weight: 700; font-size: .92rem; margin-bottom: 4px; }
.agreement-card .ag-body { color: var(--ink-soft); font-size: .88rem; margin-bottom: 12px; }
.agreement-card .ag-actions { display: flex; gap: 8px; }
.agreement-card .ag-actions .btn { padding: 8px 16px; font-size: .84rem; }

.dispute-card {
  align-self: stretch; background: #fff8ec; border: 1px solid #e8d7a8;
  border-radius: var(--radius); padding: 14px; margin: 4px 0;
}
.dispute-card b { display: block; font-size: .9rem; margin-bottom: 4px; }
.dispute-card p { font-size: .86rem; color: var(--ink-soft); margin: 0 0 12px; }
.dispute-card .ag-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.chat-tools { padding: 10px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-tool { border: 1px solid var(--line-strong); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: .82rem; font-weight: 600; color: var(--ink-soft); }
.chat-tool:hover { border-color: var(--warn, #d97a2b); color: var(--warn, #d97a2b); }
.chat-tools-hint { font-size: .74rem; color: var(--muted-2); }

.chat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; border: 1px solid var(--line-strong); border-radius: 999px; padding: 10px 16px; font-family: inherit; font-size: .93rem; }
.chat-input input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px rgba(13,92,84,.14); }
.chat-send { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; border: 0; display: flex; align-items: center; justify-content: center; }
.chat-send:hover { background: var(--brand-ink); }
.chat-send:active { transform: scale(.95); }

@media (max-width: 560px) {
  .booking-panel { position: static; }
  .detail-host { flex-direction: column; align-items: flex-start; }
  .bp-grid { grid-template-columns: 1fr; }
}

.cal-booked { color: var(--muted-2, #98a39e); text-decoration: line-through; cursor: default; }
.cal-booked:hover { background: none; }
.bp-booking-error { margin: 10px 0 0; }

:root{--maxw:2028px}
.brand{gap:20px}
@media (max-width:560px){.brand{font-size:.85rem;gap:8px;flex:1;min-width:0}.brand-name{line-height:1.15}}
.brand{gap:16px;font-weight:400;font-size:1.05rem}
.brand .brand-name{font-weight:400}
.brand .brand-mark{height:56px;width:auto;border-radius:0}
.cal-day{flex-direction:column;gap:1px;font-weight:700;color:#0e1218;line-height:1.05}
.cal-day.cal-past,.cal-day[disabled]{font-weight:500;opacity:.5}
.cal-p{display:block;font-size:9px;line-height:1.1;font-weight:500;opacity:.5;letter-spacing:-.01em}
.cal-band{margin:2px 0 8px;font-size:12px;color:var(--mut,#6f6a61)}
.cal-band-note{opacity:.75}
@media (max-width:980px){.detail-page main>.container{display:flex;flex-direction:column}.detail-page main>.container>.gallery{order:1}.detail-page .detail-head{order:2}.detail-page .booking-panel{order:3;position:static;margin-bottom:8px}.detail-page .detail-main{order:4}.detail-page .detail-split{display:contents}.detail-page #messageHostBtn{display:none}}
