/* Vrika Spiti — premium rental portal for Heraklion, Crete */
:root{
  --ink:#0F2A3A; --ink-2:#2A4557; --muted:#5A6B75; --faint:#8494A0;
  --line:#E1E6E8; --line-2:#EDF0F1; --surface:#F3F6F6; --paper:#FFFFFF;
  --harbour:#1C5A82; --harbour-2:#154868; --harbour-soft:#E5EEF4;
  --ochre:#C6973F; --ochre-ink:#7A5716; --ochre-soft:#F7EEDC;
  --olive:#4C5E2F; --olive-soft:#ECF0E2; --danger:#B42318; --danger-soft:#FDECEA;
  --heart:#D93A4A;
  --r-sm:8px; --r:14px; --r-lg:22px; --pill:999px;
  --shadow-float:0 18px 48px -18px rgba(15,42,58,.35),0 2px 8px rgba(15,42,58,.06);
  --shadow-pop:0 10px 30px -10px rgba(15,42,58,.28);
  --font:'Commissioner',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --w:1240px; --gut:clamp(16px,4vw,32px);
  --ease:cubic-bezier(.2,.7,.2,1);
}
*,*::before,*::after{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{margin:0;font-family:var(--font);font-size:16px;line-height:1.55;color:var(--ink);background:var(--paper);font-variation-settings:"FLAR" 0,"VOLM" 0;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{max-width:100%;display:block}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:3px solid var(--harbour);outline-offset:2px;border-radius:6px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.wrap{max-width:var(--w);margin:0 auto;padding:0 var(--gut)}
.num{font-variant-numeric:tabular-nums}
svg.i{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
svg.i.sm{width:16px;height:16px}
svg.i.lg{width:24px;height:24px}

/* ---------- Type ---------- */
.display{font-weight:760;letter-spacing:-.025em;line-height:1.02;font-variation-settings:"FLAR" 100,"VOLM" 40;margin:0}
h1,h2,h3{margin:0;font-weight:720;letter-spacing:-.02em;line-height:1.15}
.h2{font-size:clamp(26px,3.2vw,36px);font-variation-settings:"FLAR" 100,"VOLM" 20}
.h3{font-size:20px}
.lead{font-size:clamp(17px,1.6vw,20px);color:var(--ink-2);max-width:56ch}
.muted{color:var(--muted)}
.small{font-size:14px}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 20px;border-radius:var(--pill);border:1px solid transparent;font-weight:650;font-size:15px;text-decoration:none;transition:background .18s,border-color .18s,transform .12s,box-shadow .18s;white-space:nowrap}
.btn:active{transform:scale(.98)}
.btn-primary{background:var(--ink);color:#fff}
.btn-primary:hover{background:#18394D}
.btn-blue{background:var(--harbour);color:#fff}
.btn-blue:hover{background:var(--harbour-2)}
.btn-ghost{background:var(--paper);border-color:var(--line);color:var(--ink)}
.btn-ghost:hover{border-color:var(--ink)}
.btn-plus{background:var(--ochre);color:#1c1405}
.btn-plus:hover{background:#b98a33}
.btn-block{width:100%}
.btn-sm{min-height:38px;padding:0 14px;font-size:14px}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--paper);color:var(--ink);transition:border-color .18s,background .18s}
.icon-btn:hover{border-color:var(--ink)}
.link{color:var(--harbour);font-weight:650;text-decoration:none}
.link:hover{text-decoration:underline;text-underline-offset:3px}

/* ---------- Header ---------- */
.site-header{position:sticky;top:0;z-index:1000;background:rgba(255,255,255,.92);backdrop-filter:saturate(1.4) blur(12px);-webkit-backdrop-filter:saturate(1.4) blur(12px);border-bottom:1px solid transparent;transition:border-color .2s,box-shadow .2s}
.site-header.scrolled{border-bottom-color:var(--line);box-shadow:0 4px 20px -12px rgba(15,42,58,.18)}
.site-header .wrap{height:72px;display:flex;align-items:center;gap:28px}
.brand{display:inline-flex;align-items:center;gap:9px;text-decoration:none;font-weight:800;font-size:25px;letter-spacing:-.03em;font-variation-settings:"FLAR" 100,"VOLM" 60;color:var(--ink)}
.brand-mark{width:32px;height:32px;border-radius:9px;background:var(--ink);color:#fff;display:grid;place-items:center}
.brand-mark svg{width:19px;height:19px;stroke:#fff;fill:none;stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.nav-main{display:flex;gap:4px;margin-right:auto}
.nav-main a{padding:9px 13px;border-radius:var(--pill);text-decoration:none;font-weight:560;font-size:15px;color:var(--ink-2)}
.nav-main a:hover{background:var(--surface);color:var(--ink)}
.nav-main a[aria-current="page"]{color:var(--ink);background:var(--surface)}
.nav-actions{display:flex;align-items:center;gap:10px}
.fav-link{position:relative}
.fav-count{position:absolute;top:-3px;right:-3px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--heart);color:#fff;font-size:11px;font-weight:750;display:none;align-items:center;justify-content:center;border:2px solid #fff}
.fav-count.on{display:flex}
.menu-btn{display:none}
.drawer{position:fixed;inset:0;z-index:1100;background:rgba(15,42,58,.35);opacity:0;visibility:hidden;transition:.22s}
.drawer.open{opacity:1;visibility:visible}
.drawer-panel{position:absolute;top:0;right:0;bottom:0;width:min(360px,88vw);background:#fff;padding:22px;display:flex;flex-direction:column;gap:6px;transform:translateX(100%);transition:transform .26s var(--ease)}
.drawer.open .drawer-panel{transform:none}
.drawer-panel a:not(.btn){padding:15px 4px;border-bottom:1px solid var(--line-2);text-decoration:none;font-size:20px;font-weight:650}
.drawer-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}

/* Mobile bottom tab bar (Airbnb-style) */
.tabbar{display:none}
@media (max-width:860px){
  .nav-main,.nav-actions .hide-m{display:none}
  .menu-btn{display:inline-flex}
  .site-header .wrap{height:64px;gap:12px}
  .nav-actions{margin-left:auto}
  .tabbar{display:grid;grid-template-columns:repeat(4,1fr);position:fixed;left:0;right:0;bottom:0;z-index:999;background:#fff;border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom))}
  .tabbar a{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0;font-size:11.5px;font-weight:600;color:var(--muted);text-decoration:none;min-height:48px}
  .tabbar a[aria-current="page"]{color:var(--ink)}
  .tabbar a[aria-current="page"] svg{stroke:var(--harbour)}
  body{padding-bottom:72px}
}

/* ---------- Search (segmented) ---------- */
.search{display:grid;grid-template-columns:1.35fr 1fr 1fr .8fr auto;align-items:stretch;background:#fff;border:1px solid var(--line);border-radius:var(--pill);box-shadow:var(--shadow-float);padding:6px;position:relative}
.seg{position:relative;padding:10px 20px 10px 24px;border-radius:var(--pill);display:flex;flex-direction:column;justify-content:center;min-width:0;transition:background .15s}
.seg + .seg::before{content:"";position:absolute;left:0;top:22%;bottom:22%;width:1px;background:var(--line)}
.seg:hover{background:var(--surface)}
.seg:hover::before,.seg:hover + .seg::before{opacity:0}
.seg label{font-size:12.5px;font-weight:700;color:var(--ink)}
.seg input,.seg select{border:0;background:transparent;padding:2px 0 0;font-size:15px;color:var(--ink-2);outline:none;width:100%;min-width:0;appearance:none;-webkit-appearance:none;text-overflow:ellipsis}
.seg input::placeholder{color:var(--faint)}
.seg:focus-within{background:var(--surface)}
.search-go{align-self:center;display:inline-flex;align-items:center;gap:8px;height:52px;padding:0 24px;border:0;border-radius:var(--pill);background:var(--harbour);color:#fff;font-weight:700;font-size:15px}
.search-go:hover{background:var(--harbour-2)}
.suggest{position:absolute;top:calc(100% + 10px);left:0;width:min(420px,92vw);background:#fff;border-radius:var(--r-lg);box-shadow:var(--shadow-float);border:1px solid var(--line);padding:8px;z-index:50;display:none;max-height:360px;overflow:auto}
.suggest.on{display:block}
.suggest button{display:flex;align-items:center;gap:12px;width:100%;text-align:left;border:0;background:none;padding:10px 12px;border-radius:12px}
.suggest button:hover,.suggest button.hl{background:var(--surface)}
.suggest .pin{width:40px;height:40px;border-radius:10px;background:var(--surface);display:grid;place-items:center;flex:none}
.suggest small{display:block;color:var(--muted);font-size:13px}
@media (max-width:860px){
  .search{grid-template-columns:1fr 1fr;border-radius:var(--r-lg);padding:8px;gap:0}
  .seg{border-radius:12px;padding:12px 14px}
  .seg + .seg::before{display:none}
  .seg.where{grid-column:1/-1;border-bottom:1px solid var(--line-2)}
  .search-go{grid-column:1/-1;justify-content:center;margin-top:6px;width:100%;border-radius:14px}
}

/* ---------- Chips & badges ---------- */
.chip{display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 15px;border:1px solid var(--line);border-radius:var(--pill);background:#fff;font-size:14px;font-weight:600;white-space:nowrap;color:var(--ink)}
.chip:hover{border-color:var(--ink)}
.chip[aria-pressed="true"],.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.chip .dot{width:7px;height:7px;border-radius:50%;background:var(--harbour)}
.badge{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border-radius:var(--pill);font-size:12px;font-weight:700;line-height:1;white-space:nowrap}
.badge-plus{background:var(--ink);color:#fff}
.badge-plus svg{stroke:var(--ochre);fill:var(--ochre);width:12px;height:12px}
.badge-new{background:#fff;color:var(--ink)}
.badge-verified{background:var(--olive-soft);color:var(--olive)}
.badge-student{background:var(--harbour-soft);color:var(--harbour-2)}
.tag{display:inline-flex;align-items:center;gap:5px;font-size:13px;color:var(--ink-2);background:var(--surface);border-radius:8px;padding:4px 8px}

/* ---------- Listing card ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:30px 22px}
.card{position:relative;display:flex;flex-direction:column;gap:12px;text-decoration:none;color:inherit;border-radius:var(--r);outline-offset:4px}
.card-media{position:relative;aspect-ratio:20/19;border-radius:var(--r);overflow:hidden;background:var(--surface)}
.card-track{display:flex;height:100%;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
.card-track::-webkit-scrollbar{display:none}
.card-track img{flex:0 0 100%;width:100%;height:100%;object-fit:cover;scroll-snap-align:start}
.card-badges{position:absolute;top:12px;left:12px;display:flex;gap:6px;z-index:2}
.card-badges .badge{box-shadow:0 2px 8px rgba(0,0,0,.14)}
.heart{position:absolute;top:8px;right:8px;z-index:3;width:44px;height:44px;border:0;background:none;display:grid;place-items:center;padding:0}
.heart svg{width:26px;height:26px;fill:rgba(15,42,58,.35);stroke:#fff;stroke-width:1.8;transition:transform .2s var(--ease),fill .15s;filter:drop-shadow(0 1px 3px rgba(0,0,0,.25))}
.heart:hover svg{transform:scale(1.08)}
.heart[aria-pressed="true"] svg{fill:var(--heart)}
.heart.pop svg{animation:heartPop .38s var(--ease)}
@keyframes heartPop{40%{transform:scale(1.28)}100%{transform:scale(1)}}
.card-nav{position:absolute;top:50%;transform:translateY(-50%);z-index:2;width:32px;height:32px;border-radius:50%;border:0;background:rgba(255,255,255,.94);display:grid;place-items:center;opacity:0;transition:opacity .15s;box-shadow:0 2px 8px rgba(0,0,0,.18)}
.card-nav svg{width:16px;height:16px}
.card-nav.prev{left:10px}.card-nav.next{right:10px}
.card:hover .card-nav,.card-media:focus-within .card-nav{opacity:1}
.card-dots{position:absolute;bottom:10px;left:0;right:0;display:flex;justify-content:center;gap:5px;z-index:2;pointer-events:none}
.card-dots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.6);transition:transform .2s,background .2s}
.card-dots i.on{background:#fff;transform:scale(1.2)}
.card-body{display:flex;flex-direction:column;gap:3px;padding:0 2px}
.card-top{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.card-price{font-size:19px;font-weight:760;letter-spacing:-.01em}
.card-price small{font-size:14px;font-weight:500;color:var(--muted)}
.card-ppsm{font-size:13px;color:var(--muted);white-space:nowrap}
.card-title{font-size:15px;font-weight:600;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-where{font-size:14px;color:var(--muted);display:flex;align-items:center;gap:5px}
.card-facts{display:flex;gap:14px;font-size:14px;color:var(--ink-2);margin-top:4px}
.card-facts span{display:inline-flex;align-items:center;gap:5px}
.card-facts svg{width:16px;height:16px;color:var(--muted)}
.card-avail{font-size:13px;color:var(--olive);font-weight:650;margin-top:2px}
.card.is-active .card-media{outline:3px solid var(--harbour);outline-offset:2px}
@media (hover:none){.card-nav{display:none}}

/* ---------- Sections ---------- */
.section{padding:clamp(56px,7vw,96px) 0}
.section-head{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:28px}
.section-head p{margin:8px 0 0}
@media (max-width:640px){.section-head{flex-wrap:wrap;align-items:flex-start}.section-head .btn{white-space:normal;text-align:center}}
.scroller{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(270px,1fr);gap:22px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;scrollbar-width:thin}
.scroller > *{scroll-snap-align:start}
.scroller-ctrl{display:flex;gap:8px}
@media (min-width:1100px){.scroller{grid-auto-columns:calc((100% - 66px)/4)}}

/* ---------- Home hero ---------- */
.hero{position:relative;padding:clamp(28px,4vw,48px) 0 0}
.hero-grid{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:clamp(24px,4vw,56px);align-items:center}
.hero h1{font-size:clamp(40px,5.2vw,72px);max-width:13ch}
.hero .lead{margin:22px 0 0}
.hero-photo{position:relative;aspect-ratio:5/4.4;border-radius:28px;overflow:hidden;background:var(--surface)}
.hero-photo img{width:100%;height:100%;object-fit:cover}
.hero-photo .hero-card{position:absolute;left:18px;right:18px;bottom:18px;background:rgba(255,255,255,.95);backdrop-filter:blur(10px);border-radius:18px;padding:14px;display:flex;gap:14px;align-items:center;text-decoration:none;box-shadow:var(--shadow-pop)}
.hero-card img{width:66px;height:66px;border-radius:12px;object-fit:cover}
.hero-card b{display:block;font-size:15px}
.hero-card span{font-size:14px;color:var(--muted)}
.hero-card .card-price{margin-left:auto;font-size:18px}
.hero-search{margin-top:clamp(28px,3.5vw,44px);position:relative;z-index:5;max-width:1060px}
@media (max-width:960px){.hero-search{margin-top:24px}}
.hero-stats{display:flex;gap:clamp(18px,4vw,44px);margin-top:28px;flex-wrap:wrap}
.hero-stats div{font-size:14px;color:var(--muted)}
.hero-stats b{display:block;font-size:22px;color:var(--ink);font-weight:760;letter-spacing:-.01em}
@media (max-width:960px){
  .hero-grid{grid-template-columns:1fr}
  .hero-photo{aspect-ratio:16/11;order:-1;border-radius:20px}
}
@media (prefers-reduced-motion:no-preference){
  .hero-in > *{animation:rise .8s var(--ease) both}
  .hero-in > *:nth-child(2){animation-delay:.08s}
  .hero-in > *:nth-child(3){animation-delay:.16s}
  .hero-in > *:nth-child(4){animation-delay:.24s}
  .hero-photo img{animation:settle 1.4s var(--ease) both}
}
@keyframes rise{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes settle{from{transform:scale(1.06)}to{transform:scale(1)}}

/* Category bar */
.catbar{display:flex;gap:28px;overflow-x:auto;padding:26px 0 4px;scrollbar-width:none;border-bottom:1px solid var(--line)}
.catbar::-webkit-scrollbar{display:none}
.cat{display:flex;flex-direction:column;align-items:center;gap:7px;padding:4px 2px 12px;border:0;background:none;color:var(--muted);font-size:13px;font-weight:600;white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-1px;text-decoration:none}
.cat svg{width:26px;height:26px}
.cat:hover{color:var(--ink);border-bottom-color:var(--line)}
.cat[aria-pressed="true"]{color:var(--ink);border-bottom-color:var(--ink)}

/* Coastline index — the signature element */
.coast{background:var(--ink);color:#fff;border-radius:32px;padding:clamp(28px,4vw,52px);overflow:hidden;position:relative}
.coast .h2{color:#fff}
.coast p.muted{color:#A9BAC5}
.coast-map{position:relative;margin-top:36px;height:260px}
.coast-map svg.shore{position:absolute;inset:0;width:100%;height:100%}
.coast-pt{position:absolute;transform:translate(-50%,0);display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:none;color:#fff;padding:0;text-decoration:none}
.coast-pt .stem{width:1px;background:linear-gradient(#fff6,#fff0)}
.coast-pt .dot{width:13px;height:13px;border-radius:50%;background:var(--ochre);box-shadow:0 0 0 5px rgba(198,151,63,.22);transition:transform .2s}
.coast-pt .lbl{font-size:13.5px;font-weight:700;white-space:nowrap}
.coast-pt .meta{font-size:12.5px;color:#A9BAC5;white-space:nowrap}
.coast-pt:hover .dot,.coast-pt:focus-visible .dot{transform:scale(1.35)}
.coast-pt:hover .lbl{text-decoration:underline;text-underline-offset:3px}
.coast-list{display:none}
@media (max-width:860px){
  .coast-map{display:none}
  .coast-list{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:24px}
  .coast-list a{display:flex;justify-content:space-between;gap:8px;padding:13px 14px;border-radius:14px;background:rgba(255,255,255,.07);text-decoration:none;font-weight:650;font-size:14px}
  .coast-list a span{color:#A9BAC5;font-weight:500}
}

/* Value strip */
.values{display:grid;grid-template-columns:repeat(4,1fr);gap:28px}
.value svg{width:28px;height:28px;color:var(--harbour);margin-bottom:12px}
.value b{display:block;font-size:17px;margin-bottom:4px}
.value p{margin:0;color:var(--muted);font-size:15px}
@media (max-width:860px){.values{grid-template-columns:1fr 1fr}}

/* Plus promo */
.plus-band{display:grid;grid-template-columns:1fr 1fr;border-radius:32px;overflow:hidden;background:var(--ochre-soft)}
.plus-band .copy{padding:clamp(28px,5vw,64px)}
.plus-band .copy .h2{margin:14px 0 14px}
.plus-band ul{list-style:none;padding:0;margin:22px 0 28px;display:grid;gap:12px}
.plus-band li{display:flex;gap:10px;align-items:flex-start}
.plus-band li svg{color:var(--ochre-ink);margin-top:2px}
.plus-band .pic{min-height:320px;background:center/cover no-repeat}
@media (max-width:860px){.plus-band{grid-template-columns:1fr}.plus-band .pic{min-height:220px;order:-1}}

/* Steps (a real sequence, so numbered) */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;counter-reset:s}
.step{border-top:2px solid var(--ink);padding-top:18px}
.step::before{counter-increment:s;content:counter(s);display:block;font-size:40px;font-weight:800;letter-spacing:-.03em;font-variation-settings:"FLAR" 100;color:var(--harbour);line-height:1;margin-bottom:12px}
.step b{display:block;font-size:18px;margin-bottom:6px}
.step p{margin:0;color:var(--muted)}
@media (max-width:760px){.steps{grid-template-columns:1fr}}

/* FAQ */
.faq{max-width:820px}
.faq details{border-bottom:1px solid var(--line)}
.faq summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;gap:20px;align-items:center;padding:22px 0;font-weight:650;font-size:17px}
.faq summary::-webkit-details-marker{display:none}
.faq summary svg{transition:transform .22s var(--ease)}
.faq details[open] summary svg{transform:rotate(45deg)}
.faq details p{margin:0 0 22px;color:var(--ink-2);max-width:68ch}

/* Owner CTA */
.owner-cta{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:clamp(28px,4vw,44px);border:1px solid var(--line);border-radius:28px;flex-wrap:wrap}

/* ---------- Footer ---------- */
.site-footer{background:var(--surface);margin-top:clamp(40px,6vw,80px);padding:56px 0 30px;font-size:15px}
.foot-grid{display:grid;grid-template-columns:1.4fr repeat(3,1fr);gap:32px}
.foot-grid h4{margin:0 0 14px;font-size:15px}
.foot-grid ul{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.foot-grid a{text-decoration:none;color:var(--ink-2)}
.foot-grid a:hover{text-decoration:underline}
.foot-bottom{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;border-top:1px solid var(--line);margin-top:40px;padding-top:22px;color:var(--muted);font-size:14px}
@media (max-width:760px){.foot-grid{grid-template-columns:1fr 1fr}.foot-grid > :first-child{grid-column:1/-1}}

/* ---------- Toast ---------- */
.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,16px);z-index:30000;background:var(--ink);color:#fff;padding:13px 18px;border-radius:14px;font-weight:600;font-size:15px;opacity:0;pointer-events:none;transition:.24s var(--ease);display:flex;gap:10px;align-items:center;box-shadow:var(--shadow-float);max-width:calc(100vw - 32px)}
.toast.on{opacity:1;transform:translate(-50%,0);pointer-events:auto}
.toast a{color:#9FD1F0;font-weight:700}
@media (max-width:860px){.toast{bottom:88px}}

/* ---------- Forms ---------- */
.field{display:flex;flex-direction:column;gap:6px}
.field label,.field .lbl{font-size:14px;font-weight:650}
.field .hint{font-size:13px;color:var(--muted)}
.input,.select,.textarea{width:100%;min-height:48px;padding:12px 14px;border:1px solid #CDD5D9;border-radius:12px;background:#fff;font-size:16px;transition:border-color .15s,box-shadow .15s}
.textarea{min-height:120px;resize:vertical}
.input:focus,.select:focus,.textarea:focus{outline:none;border-color:var(--harbour);box-shadow:0 0 0 4px var(--harbour-soft)}
.field.err .input,.field.err .select,.field.err .textarea{border-color:var(--danger)}
.field .err-msg{display:none;color:var(--danger);font-size:13px;font-weight:600}
.field.err .err-msg{display:block}
.check{display:flex;gap:10px;align-items:flex-start;font-size:15px;cursor:pointer}
.check input{width:20px;height:20px;accent-color:var(--ink);margin-top:2px;flex:none}
.seg-ctrl{display:inline-flex;border:1px solid var(--line);border-radius:var(--pill);padding:4px;gap:2px;background:#fff;flex-wrap:wrap}
.seg-ctrl button{border:0;background:none;min-height:36px;min-width:44px;padding:0 13px;border-radius:var(--pill);font-weight:650;font-size:14px}
.seg-ctrl button[aria-pressed="true"]{background:var(--ink);color:#fff}
.toggle-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.toggle{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;cursor:pointer;font-size:15px;font-weight:550;user-select:none}
.toggle input{position:absolute;opacity:0;pointer-events:none}
.toggle svg{color:var(--muted)}
.toggle:has(input:checked){border-color:var(--ink);background:var(--surface);box-shadow:inset 0 0 0 1px var(--ink)}
.toggle:has(input:checked) svg{color:var(--ink)}
.toggle:has(input:focus-visible){outline:3px solid var(--harbour);outline-offset:2px}

/* ---------- Modal / sheet ---------- */
.modal{position:fixed;inset:0;z-index:20000;background:rgba(15,42,58,.45);display:none;align-items:center;justify-content:center;padding:18px}
.modal.on{display:flex}
.modal-box{background:#fff;border-radius:24px;width:min(640px,100%);max-height:90vh;display:flex;flex-direction:column;overflow:hidden;box-shadow:var(--shadow-float)}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--line)}
.modal-head h2{font-size:18px}
.modal-body{padding:22px;overflow:auto;display:grid;gap:26px}
.modal-foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 20px;border-top:1px solid var(--line)}
@media (prefers-reduced-motion:no-preference){.modal.on .modal-box{animation:sheetIn .28s var(--ease)}}
@keyframes sheetIn{from{transform:translateY(24px);opacity:.6}to{transform:none;opacity:1}}
@media (max-width:640px){.modal{align-items:flex-end;padding:0}.modal-box{border-radius:22px 22px 0 0;max-height:92vh}}

/* ---------- Lightbox ---------- */
.lightbox{position:fixed;inset:0;z-index:25000;background:rgba(8,14,18,.96);display:none;align-items:center;justify-content:center;user-select:none}
.lightbox.on{display:flex}
.lightbox img{max-width:92vw;max-height:86vh;object-fit:contain;border-radius:6px}
.lb-btn{position:absolute;width:52px;height:52px;border-radius:50%;border:0;background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center}
.lb-btn:hover{background:rgba(255,255,255,.22)}
.lb-close{top:18px;right:18px}.lb-prev{left:18px;top:50%;transform:translateY(-50%)}.lb-next{right:18px;top:50%;transform:translateY(-50%)}
.lb-count{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);color:#fff;font-size:14px;background:rgba(0,0,0,.35);padding:7px 13px;border-radius:var(--pill)}

/* ---------- Empty state ---------- */
.empty{text-align:center;padding:56px 20px;border:1px dashed #CDD5D9;border-radius:var(--r-lg)}
.empty svg{width:40px;height:40px;color:var(--faint);margin:0 auto 14px}
.empty h3{margin-bottom:6px}
.empty p{margin:0 auto 18px;color:var(--muted);max-width:44ch}

/* ---------- Page head ---------- */
.page-head{padding:clamp(36px,5vw,64px) 0 clamp(20px,3vw,32px)}
.page-head h1{font-size:clamp(34px,4.6vw,56px)}
.page-head .lead{margin-top:14px}
.crumbs{display:flex;gap:8px;font-size:14px;color:var(--muted);margin-bottom:14px;flex-wrap:wrap}
.crumbs a{text-decoration:none}
.crumbs a:hover{text-decoration:underline}

/* Leaflet price pins */
.pin-price{display:inline-flex;align-items:center;justify-content:center;transform:translate(-50%,-50%);background:#fff;color:var(--ink);font:700 13px/1 var(--font);padding:7px 10px;border-radius:var(--pill);box-shadow:0 2px 10px rgba(15,42,58,.28);white-space:nowrap;border:1px solid rgba(15,42,58,.08);transition:transform .15s,background .15s,color .15s}
.pin-price.plus{background:var(--ochre);color:#1c1405;border-color:#A87824;box-shadow:0 0 0 3px rgba(198,151,63,.24),0 5px 16px rgba(122,87,22,.32)}
.pin-price.on,.pin-price:hover{background:var(--ink);color:#fff;transform:translate(-50%,-50%) scale(1.1);z-index:1000}
.pin-price.seen{background:#EEF1F2;color:var(--muted)}
.leaflet-div-icon{background:none!important;border:0!important}
.leaflet-container{font-family:var(--font)!important;background:#E8EDEF}
.leaflet-popup-content-wrapper{border-radius:16px!important;padding:0!important;overflow:hidden;box-shadow:var(--shadow-float)!important}
.leaflet-popup-content{margin:0!important;width:260px!important}
.leaflet-popup-tip-container{display:none}
.map-pop img{width:100%;height:140px;object-fit:cover}
.map-pop div{padding:12px 14px}
.map-pop b{display:block;font-size:16px}
.map-pop span{font-size:13px;color:var(--muted)}
.leaflet-tile-pane{filter:saturate(.55) contrast(.95) brightness(1.03)}

@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* ---------- Accounts (demo auth) ---------- */
.acct{position:relative}
.acct-btn{display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:var(--pill);padding:3px;min-height:44px;min-width:44px;justify-content:center}
.acct-btn:hover{border-color:var(--ink)}
.avatar-sm{width:36px;height:36px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:750;font-size:13.5px;letter-spacing:.02em}
.avatar-xs{width:24px;height:24px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-weight:750;font-size:10.5px}
.tabbar a[aria-current="page"] .avatar-xs{background:var(--harbour)}
.acct-menu{position:absolute;right:0;top:calc(100% + 10px);width:260px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow-float);padding:8px;z-index:1200;display:grid}
.acct-menu a,.acct-menu button{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:10px;text-decoration:none;border:0;background:none;text-align:left;font-size:15px;font-weight:550;color:var(--ink)}
.acct-menu a:hover,.acct-menu button:hover,.acct-menu a:focus-visible,.acct-menu button:focus-visible{background:var(--surface)}
.acct-menu svg{color:var(--muted)}
.acct-menu [data-logout]{border-top:1px solid var(--line-2);border-radius:0 0 10px 10px;margin-top:4px}
.acct-who{padding:10px 12px 12px;border-bottom:1px solid var(--line-2);margin-bottom:4px}
.acct-who b{display:block;font-size:16px}
.acct-who span{font-size:13px;color:var(--muted)}
@media (max-width:860px){.acct-slot{display:none}}

.auth{display:grid;gap:18px}
.auth-reason{display:flex;gap:10px;background:var(--harbour-soft);color:var(--harbour-2);border-radius:12px;padding:12px 14px;font-size:14.5px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr}
.auth-form{display:grid;gap:14px}
.auth-error{background:var(--danger-soft);color:var(--danger);border-radius:10px;padding:10px 12px;font-size:14px;font-weight:600}
.auth-forgot{border:0;background:none;justify-self:center;font-size:14px;padding:4px}
.pw-wrap{position:relative}
.pw-wrap .input{padding-right:52px}
.pw-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:44px;height:40px;border:0;background:none;border-radius:8px;display:grid;place-items:center;color:var(--muted)}
.pw-eye[aria-pressed="true"]{color:var(--harbour)}
.pw-meter{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;margin-top:-6px}
.pw-meter i{height:4px;border-radius:2px;background:var(--line)}
.pw-meter i.on.s1{background:var(--danger)}.pw-meter i.on.s2{background:var(--ochre)}.pw-meter i.on.s3{background:var(--olive)}
.pw-hint{font-size:13px;color:var(--muted);margin-top:-8px}
.auth-roles{border:0;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.auth-roles legend{margin-bottom:8px;font-size:14px;font-weight:650;padding:0}
.auth-roles .err-msg{grid-column:1/-1}
.auth-roles.err .toggle{border-color:var(--danger)}
.auth-roles .toggle span{display:flex;flex-direction:column;line-height:1.25}
.auth-roles .toggle small{font-size:12.5px;color:var(--muted);font-weight:500}
.auth-demo{border-top:1px solid var(--line-2);padding-top:16px;display:grid;gap:10px}
.auth-demo > span{font-size:13.5px;color:var(--muted);font-weight:600}
.auth-demo > div{display:flex;gap:8px;flex-wrap:wrap}
.auth-note{margin:0;font-size:12.5px;color:var(--faint)}


/* ===== Vrika Spiti: listing mobile layout fix ===== */
@media (max-width: 700px) {
  body { overflow-x: hidden; }

  .container,
  .listing-wrap,
  .listing-page,
  .listing-main,
  .listing-content,
  .property-detail,
  .property-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .listing-wrap,
  .listing-page,
  .property-detail {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  main .container {
    padding-left: 14px !important;
    padding-right: 14px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .listing-gallery,
  .gallery,
  .property-gallery {
    width: calc(100% + 28px) !important;
    max-width: none !important;
    margin-left: -14px !important;
    margin-right: -14px !important;
  }

  .listing-gallery img,
  .gallery img,
  .property-gallery img,
  .gallery-main img {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    display: block;
    object-fit: cover;
  }

  .listing-facts,
  .facts-grid,
  .property-facts {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .listing-description,
  .listing-features,
  .listing-costs,
  .cost-card,
  .property-description,
  .property-features {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .listing-layout > *,
  .detail-layout > *,
  .property-layout > * {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .listing-sidebar,
  .property-sidebar {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sticky-contact,
  .mobile-contact-bar {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
  }
}


/* ===== Vrika Spiti mobile: prevent horizontal clipping ===== */
@media (max-width: 700px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }

  *, *::before, *::after {
    box-sizing: border-box;
  }

  main, main > .container,
  .listing-wrap, .listing-page, .listing-main, .listing-content,
  .property-detail, .property-main, .listing-sidebar, .property-sidebar {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Any desktop grid/flex child must be allowed to shrink */
  main * {
    min-width: 0;
  }

  /* Text must wrap instead of forcing the page wider */
  main h1, main h2, main h3, main p, main span, main a,
  main button, main td, main th, main div {
    overflow-wrap: anywhere;
  }

  /* Feature rows become a clean single column on phones */
  .features-grid, .listing-features-grid, .property-features-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  /* Cost rows always keep both label and value visible */
  .cost-row, .cost-line, .price-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .cost-row > :last-child, .cost-line > :last-child, .price-row > :last-child {
    text-align: right;
    white-space: nowrap;
  }

  /* Contact card: never wider than viewport */
  .contact-card, .owner-card, .listing-contact, .property-contact {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: hidden;
  }

  .contact-card button, .owner-card button,
  .listing-contact button, .property-contact button {
    max-width: 100% !important;
  }

  /* Quick-message chips can wrap instead of extending offscreen */
  .chips, .quick-messages, .message-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
  }

  .chips > *, .quick-messages > *, .message-chips > * {
    max-width: 100% !important;
    white-space: normal !important;
  }

  /* Facts can scroll inside their own strip if they do not fit */
  .listing-facts, .facts-grid, .property-facts {
    max-width: 100% !important;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
  }
}


/* ===== Home mobile category carousel fix ===== */
@media (max-width:700px){
  .catbar{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:10px !important;
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:18px 0 8px !important;
    scroll-snap-type:x proximity;
    -webkit-overflow-scrolling:touch;
  }

  .catbar .cat{
    flex:0 0 88px !important;
    width:88px !important;
    min-width:88px !important;
    max-width:88px !important;
    padding:6px 4px 12px !important;
    gap:7px !important;
    white-space:normal !important;
    text-align:center !important;
    line-height:1.2 !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
    scroll-snap-align:start;
  }

  .catbar .cat svg{
    flex:0 0 auto;
    width:28px !important;
    height:28px !important;
  }
}


/* ===== Mobile bottom navigation: 4 primary items only ===== */
@media (max-width:700px){
  .mobile-nav a[href*="auth"],
  .mobile-nav a[href*="account"],
  .mobile-bottom-nav a[href*="auth"],
  .mobile-bottom-nav a[href*="account"],
  .bottom-nav a[href*="auth"],
  .bottom-nav a[href*="account"]{
    display:none !important;
  }

  .mobile-nav,
  .mobile-bottom-nav,
  .bottom-nav{
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}

@media (max-width:860px){
  .tabbar{grid-template-columns:repeat(4,minmax(0,1fr)) !important;}
}

/* ---------- Header notifications ---------- */
.notif-slot:empty{display:none}
.notif{position:relative}
.notif-btn{position:relative}
.notif-count{position:absolute;top:-3px;right:-3px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--heart);color:#fff;font-size:11px;font-weight:750;display:none;align-items:center;justify-content:center;border:2px solid #fff;line-height:1}
.notif-count.on{display:flex}
.notif-menu{position:absolute;right:0;top:calc(100% + 12px);width:min(390px,calc(100vw - 24px));max-height:min(520px,72vh);overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 18px 55px rgba(15,42,58,.18);z-index:1300}
.notif-menu[hidden]{display:none}
.notif-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 16px;border-bottom:1px solid var(--line-2)}
.notif-head b{font-size:16px}
.notif-head button{border:0;background:transparent;color:var(--harbour);font:inherit;font-size:12px;font-weight:700;cursor:pointer;padding:4px}
.notif-list{max-height:440px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.notif-item{display:grid;grid-template-columns:8px 1fr;gap:10px;padding:14px 16px;text-decoration:none;color:var(--ink);border-bottom:1px solid var(--line-2);background:#fff}
.notif-item:last-child{border-bottom:0}
.notif-item:hover{background:var(--surface)}
.notif-item.unread{background:#f7fbfd}
.notif-dot{width:7px;height:7px;border-radius:50%;background:transparent;margin-top:7px}
.notif-item.unread .notif-dot{background:var(--harbour)}
.notif-copy{min-width:0;display:grid;gap:3px}
.notif-copy b{font-size:14px;line-height:1.3}
.notif-copy span{font-size:13px;line-height:1.4;color:var(--ink-2);overflow-wrap:anywhere}
.notif-copy small{font-size:11.5px;color:var(--muted)}
.notif-empty{padding:28px 22px;text-align:center;display:grid;justify-items:center;gap:7px;color:var(--muted)}
.notif-empty svg{width:26px;height:26px;margin-bottom:2px}.notif-empty b{color:var(--ink)}.notif-empty span{font-size:13px;max-width:30ch}
@media (max-width:860px){
  .notif-menu{position:fixed;top:70px;right:12px;left:12px;width:auto;max-height:calc(100dvh - 96px)}
  .notif-list{max-height:calc(100dvh - 160px)}
}

/* Vrika Spiti mobile drawer account menu polish */
@media (max-width:860px){
  .drawer-panel{
    padding:22px 20px 28px;
    overflow-y:auto;
    overscroll-behavior:contain;
  }
  .drawer-acct{
    display:flex;
    flex-direction:column;
    gap:0;
    margin:2px 0 10px;
    border-top:1px solid var(--line-2);
  }
  .drawer-acct .acct-who{
    display:flex;
    flex-direction:column;
    gap:4px;
    padding:18px 8px 14px !important;
    border-bottom:1px solid var(--line-2);
  }
  .drawer-acct .acct-who b{
    font-size:18px;
    line-height:1.2;
    overflow-wrap:anywhere;
  }
  .drawer-acct .acct-who span{
    font-size:14px;
    color:var(--muted);
  }
  .drawer-acct a:not(.btn){
    display:flex;
    align-items:center;
    width:100%;
    min-height:52px;
    padding:13px 8px !important;
    margin:0;
    border-bottom:1px solid var(--line-2);
    font-size:17px !important;
    line-height:1.25;
    font-weight:650;
    white-space:normal;
    overflow-wrap:anywhere;
  }
  .drawer-acct a[data-logout]{
    color:#a33b31;
    border-bottom:0;
  }
  .drawer-panel > a:not(.btn){
    display:flex;
    align-items:center;
    min-height:54px;
    padding:14px 8px;
    font-size:18px;
    line-height:1.25;
  }
  .drawer-panel > .btn{
    margin-top:18px !important;
    min-height:54px;
  }
}


/* Viewing request mobile polish */
.book-selection{margin:2px 0 10px;text-align:center;color:var(--muted,#667784);font-size:14px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
#bookBtn{white-space:normal;line-height:1.2;min-height:52px;text-align:center}
@media (max-width:860px){
  .book-selection{font-size:13px;margin:0 6px 9px}
  #bookBtn{font-size:16px;padding:14px 18px;max-width:100%;width:100%}
}

/* Searchable area field */
.area-autocomplete{position:relative}
.area-autocomplete .suggest{top:calc(100% + 6px);width:100%;max-width:100%}

/* Google sign-in: shared by the auth page and modal. */
.auth-social{display:grid;gap:10px}
.auth-google{background:#fff;color:var(--ink);border:1px solid var(--line);gap:12px;min-height:48px}
.auth-google:hover{background:var(--harbour-soft);border-color:var(--harbour)}
.auth-google:focus-visible{outline:3px solid var(--harbour);outline-offset:3px}
.auth-google:disabled{opacity:.65;cursor:wait}
.auth-google svg{flex:none}
.auth-social-terms{margin:0;font-size:12px;color:var(--muted);line-height:1.5;text-align:center}
.auth-divider{display:flex;align-items:center;gap:12px;color:var(--muted);font-size:13px}
.auth-divider::before,.auth-divider::after{content:'';height:1px;background:var(--line);flex:1}
