/* Divino Desa — villa collection (home #villas) and villa detail pages.
   Uses the home page tokens: --cream, --sand, --charcoal, --ink, --text, --umber, --stone, --line, --display, --body. */

/* Shared gallery (built on the existing .unit viewer) */
.vgal{margin:0}
.vg-stage{position:relative}
.vgal .unit-main{border-radius:16px;aspect-ratio:16/10;cursor:zoom-in}
.vgal .unit-main img{transition:opacity .45s ease}
.vgal .unit-main .count{right:1rem;bottom:1rem}
.vg-nav{position:absolute;top:50%;transform:translateY(-50%);width:2.9rem;height:2.9rem;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:rgba(246,243,231,.92);color:var(--charcoal);box-shadow:0 4px 18px rgba(0,0,0,.18);transition:background .2s,transform .2s}
.vg-nav:hover{background:#fff;transform:translateY(-50%) scale(1.05)}
.vg-nav svg{width:1.2rem;height:1.2rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.vg-prev{left:1rem}.vg-next{right:1rem}
.vg-full{position:absolute;top:1rem;right:1rem;width:2.4rem;height:2.4rem;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:rgba(38,38,38,.55);color:#fff;backdrop-filter:blur(4px)}
.vg-full .ic{width:1.05rem;height:1.05rem}
.ic{fill:none;stroke:currentColor;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}

/* ===== Collection ===== */
.collection .center{max-width:46rem;margin-inline:auto}
.coll-tabs{display:flex;justify-content:center;gap:.4rem;margin-top:2rem;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:.2rem}
.coll-tabs::-webkit-scrollbar{display:none}
.coll-tabs [role=tab]{flex:none;border:0;background:transparent;border-radius:999px;padding:.55rem 1.25rem;font:400 .92rem var(--body);color:var(--text);cursor:pointer;transition:background .25s,color .25s}
.coll-tabs [role=tab]:hover{background:rgba(51,51,51,.06)}
.coll-tabs [aria-selected=true]{background:var(--charcoal);color:var(--cream)}
.coll-list{margin-top:clamp(2.2rem,4vw,3rem)}
.coll-item{animation:coll-in .5s ease}
.coll-item[hidden]{display:none}
@keyframes coll-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.coll-list[data-filter]:not([data-filter=all]) .villa-sep{display:none}
.vgal-coll .strip{display:none}
.coll-body{max-width:100%;margin-top:1.6rem}
.coll-title{font-size:clamp(2.2rem,4vw,3.1rem);font-weight:400}
.coll-kind{font-family:var(--display);font-size:1.25rem;color:var(--ink);margin-top:.2rem}
.coll-desc{margin-top:.9rem;max-width:40rem}
.coll-feats{list-style:none;padding:0;margin:1.8rem 0 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}
.coll-feats li{display:flex;gap:.85rem;align-items:center;font-size:.92rem;line-height:1.5;color:var(--ink)}
.coll-feats .ic{flex:none;width:2.6rem;height:2.6rem;padding:.55rem;border-radius:10px;background:rgba(95,86,75,.08);color:var(--umber)}
.coll-foot{display:flex;align-items:center;justify-content:space-between;gap:1.2rem;margin-top:1.8rem;padding-top:1.6rem;border-top:1px solid var(--line)}
.coll-price strong{display:block;font-family:var(--display);font-weight:400;font-size:clamp(1.9rem,3vw,2.4rem);line-height:1;color:var(--ink)}
.coll-price span{display:block;font-size:.85rem;color:var(--stone);margin-top:.4rem}
.btn.pill{border-radius:999px;padding:1rem 2.1rem;gap:.7rem}
.btn.pill svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.collection .villa-sep{margin:clamp(3rem,6vw,4.5rem) auto}

/* ===== Detail page ===== */
body.subpage{padding-top:4.5rem}
.subpage header{background:rgba(246,243,231,.96);color:var(--charcoal);box-shadow:0 1px 0 var(--line);backdrop-filter:blur(8px)}
.subpage header .brand .on-light{display:block}
.subpage header .brand .on-dark{display:none}
.vd{padding:clamp(1.8rem,4vw,3rem) 0 clamp(4rem,8vw,6rem)}
.vd .wrap{max-width:68rem}
.vd-back{display:inline-flex;align-items:center;gap:.5rem;font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:var(--umber);text-decoration:none;margin-bottom:1.6rem}
.vd-back svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;transition:transform .2s}
.vd-back:hover svg{transform:translateX(-3px)}
.vd-title{font-size:clamp(2.4rem,5vw,3.8rem);font-weight:400;margin:.4rem 0 clamp(1.4rem,3vw,2rem)}
.vgal-detail .strip{margin-top:.75rem}
.vgal-detail .thumbs{gap:.75rem}
.vgal-detail .thumb{flex:0 0 calc((100% - 2.25rem) / 4);aspect-ratio:4/3;border-radius:10px}
.vgal-detail .strip-nav{display:none}
.vd-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:clamp(2rem,4vw,2.8rem) 0 0;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:rgba(255,255,255,.35)}
.vd-grid div{text-align:center;padding:clamp(1.4rem,2.6vw,2rem) 1rem;border-left:1px solid var(--line);border-top:1px solid var(--line)}
.vd-grid div:nth-child(3n+1){border-left:0}
.vd-grid div:nth-child(-n+3){border-top:0}
.vd-grid .ic{width:1.6rem;height:1.6rem;color:var(--umber);margin:0 auto .7rem;display:block}
.vd-grid dt{font-size:.66rem;letter-spacing:.2em;text-transform:uppercase;color:var(--umber)}
.vd-grid dd{margin:.45rem 0 0;font-family:var(--display);font-size:clamp(1.5rem,2.6vw,2.1rem);line-height:1.2;color:var(--ink)}
.vd-grid small{display:block;font-family:var(--body);font-size:.74rem;color:var(--stone);margin-top:.35rem}
.vd-note{font-size:.74rem;color:var(--stone);line-height:1.6;margin-top:1rem;text-align:center;max-width:52rem;margin-inline:auto}
.vd-desc{font-family:var(--display);font-size:clamp(1.15rem,1.8vw,1.35rem);line-height:1.65;color:var(--ink);text-align:center;max-width:44rem;margin:clamp(2rem,4vw,2.8rem) auto 0}
.vd-cta{text-align:center;margin-top:2rem}
.vd-more{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:1rem;margin-top:clamp(3rem,6vw,4.5rem);padding-top:1.6rem;border-top:1px solid var(--line)}
.vd-more a{text-decoration:none;font-family:var(--display);font-size:1.15rem;color:var(--ink)}
.vd-more a span{display:block;font-family:var(--body);font-size:.66rem;letter-spacing:.2em;text-transform:uppercase;color:var(--umber);margin-bottom:.2rem}
.vd-more a:last-child{text-align:right}
.vd-more .vd-all{font-family:var(--body);font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;border:1px solid var(--line);border-radius:999px;padding:.55rem 1.1rem}

/* ===== Phones & tablets ===== */
@media (max-width:760px){
  .coll-tabs{justify-content:flex-start;margin-inline:-1rem;padding-inline:1rem}
  .vgal .unit-main{aspect-ratio:4/3;border-radius:12px}
  .vg-nav{width:2.4rem;height:2.4rem}
  .vg-prev{left:.6rem}.vg-next{right:.6rem}
  .coll-feats{grid-template-columns:1fr 1fr;gap:1rem .8rem}
  .coll-feats li:last-child{grid-column:1/-1}
  .coll-feats .ic{width:2.3rem;height:2.3rem}
  .coll-foot{flex-wrap:wrap}
  .coll-foot .btn{padding:.9rem 1.6rem}
  .vgal-detail .thumbs{gap:.5rem}
  .vgal-detail .thumb{flex-basis:calc((100% - 1.5rem) / 4)}
  .vd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .vd-grid div:nth-child(3n+1){border-left:1px solid var(--line)}
  .vd-grid div:nth-child(odd){border-left:0}
  .vd-grid div:nth-child(-n+3){border-top:1px solid var(--line)}
  .vd-grid div:nth-child(-n+2){border-top:0}
  .vd-grid dd{font-size:1.35rem}
  .vd-more{grid-template-columns:1fr 1fr}
  .vd-more .vd-all{grid-column:1/-1;grid-row:2;justify-self:center}
}
@media (prefers-reduced-motion:reduce){.coll-item{animation:none}.vgal .unit-main img{transition:none}}

/* One accessible dropdown replaces previous/next villa links. */
.vd-more{display:flex;justify-content:center}
.villa-switcher{position:relative;width:min(100%,22rem);border:0;background:transparent;overflow:visible}
.villa-switcher summary{display:flex;align-items:center;justify-content:center;gap:1rem;min-height:3.2rem;padding:.8rem 1.4rem;border:1px solid var(--line);border-radius:999px;font-family:var(--body);font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;cursor:pointer}
.villa-switcher summary::after{display:none}
.villa-switcher summary svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.5}
.villa-switcher[open] summary svg{transform:rotate(180deg)}
.villa-switcher summary:focus-visible,.villa-switcher a:focus-visible{outline:2px solid var(--umber);outline-offset:3px}
.villa-switcher ul{list-style:none;padding:.5rem;margin:.75rem 0 0;border:1px solid var(--line);border-radius:14px;background:var(--cream);box-shadow:0 10px 25px rgba(43,40,36,.08)}
.villa-switcher li+li{border-top:1px solid var(--line)}
.vd-more .villa-switcher a{display:block;padding:.8rem 1rem;min-height:44px;font-size:1.3rem;text-align:left}
.villa-switcher a:hover{background:var(--sand);border-radius:8px}

/* Walkthrough film above the photo gallery */
.vd-film{margin:0 0 clamp(1.2rem,2.4vw,1.8rem);border-radius:16px;overflow:hidden;background:#1f1b17;aspect-ratio:16/9}
.vd-film video{display:block;width:100%;height:100%;object-fit:cover}
