/* Multi-page storefront: which sections each page shows, page headings,
   homepage favorites and the in-page product detail. Pages are marked on <body>
   by the server: data-page="shop|collection|product" (the homepage has none). */

/* ---------- section visibility ---------- */
body:not([data-page]) #shop,
body:not([data-page]) #wardrobe,
body:not([data-page]) #toy-box{display:none}

body[data-page] .hero,
body[data-page] #favorites,
body[data-page] .how,
body[data-page] #fyp,
body[data-page="product"] #story-books{display:none}

body[data-page="collection"] .hero-shop,
body[data-page="product"] .hero-shop{display:none}

body[data-page="shop"] .proof-band,
body[data-page="shop"] #faq{display:none}

body[data-page="collection"]:not([data-collection="custom-charms"]) .proof-band,
body[data-page="product"]:not([data-collection="custom-charms"]) .proof-band{display:none}

body[data-source="wardrobe"] #shop,
body[data-source="toybox"] #shop,
body[data-source="catalog"] #wardrobe,
body[data-source="catalog"] #toy-box,
body[data-source="wardrobe"] #toy-box{display:none}

body[data-page="product"] #shop,
body[data-page="product"] #wardrobe,
body[data-page="product"] #toy-box{display:none}

/* Collection pages already have their heading and category: drop the repeated title and category row. */
body[data-page="collection"] #shop .cat-head h2,
body[data-page="collection"] #wardrobe .cat-head h2,
body[data-page="collection"] #cats{display:none}
body[data-page="collection"] #shop .cat-head,
body[data-page="collection"] #wardrobe .cat-head{justify-content:flex-end;padding-block:0 6px}

/* ---------- page heading & breadcrumbs ---------- */
.page-head{padding-block:28px 18px}
.page-head h1{font-family:var(--display);font-weight:400;font-size:clamp(40px,6vw,68px);line-height:.98;letter-spacing:-.01em;color:var(--blue);margin:10px 0 0}
.page-head p{max-width:46em;margin:12px 0 0;color:var(--ink-soft);font-size:16px;line-height:1.55}
.page-head-product{padding-block:18px 14px}
.crumbs ol{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none;font-size:13px;color:var(--ink-soft)}
.crumbs li{display:flex;align-items:center;gap:6px}
.crumbs li+li::before{content:"/";opacity:.45}
.crumbs a{color:inherit;text-decoration:none;border-bottom:1px solid transparent}
.crumbs a:hover{color:var(--ink);border-bottom-color:currentColor}
.crumbs [aria-current]{color:var(--ink);font-weight:600}
body[data-page="shop"] .hero-shop{padding-top:4px}

.nav a[aria-current="page"]{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:6px}

/* ---------- favorites & related ---------- */
.favorites,.related{padding-block:40px 24px}
.favorites-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:22px}
.favorites-head h2{font-family:var(--display);font-weight:400;font-size:clamp(34px,4.4vw,52px);line-height:1;color:var(--blue);margin:6px 0 0}
.favorites-head .kicker{color:var(--pink)}
.favorites-head .btn{flex:none}
.favorites-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.page-card .card-frame{aspect-ratio:4/5;background:var(--white);overflow:hidden}
.page-card .card-frame img{width:100%;height:100%;object-fit:contain;display:block}
.page-card .line{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}

/* Quick view sits above the card link. */
.qv-button,.card .card-frame .qv-button{cursor:pointer;z-index:4;font:inherit;font-weight:800;font-size:13px;color:var(--ink)}
.card .mo-dots{z-index:5}

/* ---------- product page: the detail sits in the page ---------- */
.pdp{padding-block:0 8px}
.pdp > .modal,
.pdp > .wardrobe-dialog{position:relative;inset:auto;left:auto;top:auto;bottom:auto;transform:none;opacity:1;pointer-events:auto;z-index:auto;
  width:min(1180px,calc(100% - 48px));max-width:none;height:auto;max-height:none;margin:0 auto;transition:none;overflow:clip;
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;box-shadow:6px 6px 0 var(--pink)}
.pdp > .modal .dialog-header,
.pdp > .wardrobe-dialog .dialog-header{display:none}
.pdp .detail-body,
.pdp .wardrobe-showcase{overflow:visible;height:auto;min-height:0;border-radius:22px}
.pdp .detail-body > .gal,
.pdp .wardrobe-showcase > .wardrobe-visual{position:sticky;top:calc(var(--hh,72px) + 12px);align-self:start;border-radius:22px 0 0 22px}
@media(min-width:981px){
  .pdp .gal .main,
  .pdp .wardrobe-reference{flex:none;height:min(560px,calc(100dvh - var(--hh,72px) - 220px));min-height:340px}
}
.pdp .detail-body > .info,
.pdp .wardrobe-showcase > .wardrobe-product{overflow:visible;max-height:none}
/* The purchase box follows the options, as on a regular product page. */
.pdp .buy.pdp-buy{position:static;margin:16px 0 20px;padding:16px 18px;border:2px solid var(--ink);border-radius:18px;background:var(--paper);display:grid;grid-template-columns:minmax(0,1fr);gap:10px;box-shadow:4px 4px 0 var(--ink)}
.pdp .buy.pdp-buy>small{justify-self:start}
/* Wardrobe and collection details reorder their parts with flex order; keep the box right after the choices. */
.pdp .wardrobe-product > .pdp-buy{order:2}
.pdp .info,.pdp .wardrobe-product{padding-bottom:24px}
.pdp-missing{text-align:center;padding:60px 16px}
.pdp-missing .btn{margin-top:18px}

/* ---------- homepage: the making steps in one row ---------- */
body:not([data-page]) .how{padding-block:clamp(36px,5vw,64px)}
body:not([data-page]) .how-story{display:block;margin-top:18px}
body:not([data-page]) .how-stage{display:none}
body:not([data-page]) .how-story .how-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
body:not([data-page]) .how-story .how-steps li{min-height:0;opacity:1;transform:none;justify-content:flex-start;padding:18px;border:1px solid color-mix(in srgb,var(--ink) 16%,transparent);border-radius:18px;background:var(--white)}
body:not([data-page]) .how-story .how-steps b{font-size:20px}
body:not([data-page]) .how-story .how-steps p{font-size:14px;line-height:1.5}
body:not([data-page]) .how-story li .how-n{background:var(--yolk);color:var(--ink);transform:none}

@media(max-width:980px){
  body:not([data-page]) .how-story .how-steps{grid-template-columns:repeat(2,minmax(0,1fr))}
  .favorites-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .pdp > .modal,.pdp > .wardrobe-dialog{width:calc(100% - 32px)}
  .pdp .detail-body > .gal,
  .pdp .wardrobe-showcase > .wardrobe-visual{position:static;max-height:none;border-radius:22px 22px 0 0}
}
@media(max-width:700px){
  .page-head{padding-block:18px 10px}
  .page-head p{font-size:14px}
  .favorites,.related{padding-block:28px 12px}
  .favorites-head{margin-bottom:14px}
  .favorites-head .btn{min-height:40px;padding-inline:12px;font-size:12px}
  .favorites-grid{gap:12px}
  .pdp > .modal,.pdp > .wardrobe-dialog{width:100%;border-radius:0;border-inline:0;box-shadow:none}
  .pdp .detail-body,.pdp .wardrobe-showcase{border-radius:0}
}

/* ---------- phone & tablet menu drawer ---------- */
.menu-btn{display:none}
@media(max-width:980px){
  .menu-btn{display:inline-grid;place-items:center;flex:none;width:42px;height:42px;margin-left:-6px;padding:0;border:0;border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}
  .menu-btn svg{width:24px;height:24px}
  .menu-btn:focus-visible{outline:2px solid var(--blue);outline-offset:2px}
}
.menu-drawer{position:fixed;inset:0 auto 0 0;width:min(86vw,360px);max-width:none;height:100dvh;max-height:none;margin:0;padding:0 0 calc(24px + env(safe-area-inset-bottom,0px));border:0;border-right:2px solid var(--ink);background:var(--paper);color:var(--ink);overflow-y:auto;overscroll-behavior:contain}
.menu-drawer[open]{animation:menu-in .28s var(--ease,ease-out)}
.menu-drawer::backdrop{background:rgba(22,19,106,.38)}
@keyframes menu-in{from{transform:translateX(-100%)}to{transform:none}}
@media(prefers-reduced-motion:reduce){.menu-drawer[open]{animation:none}}
html.menu-open{overflow:hidden}
.menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:calc(14px + env(safe-area-inset-top,0px)) 16px 14px 20px;border-bottom:1px solid var(--line,rgba(22,19,106,.14))}
.menu-brand{font-family:var(--display);font-size:22px;color:var(--blue);text-decoration:none}
.menu-close{display:grid;place-items:center;width:42px;height:42px;padding:0;border:0;border-radius:12px;background:transparent;color:var(--ink);cursor:pointer}
.menu-close svg{width:22px;height:22px}
.menu-shop{padding:18px 12px 8px}
.menu-label{margin:0 8px 8px;font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--ink-soft)}
.menu-row{display:flex;align-items:center;gap:14px;min-height:56px;padding:6px 8px;border-radius:14px;font-weight:800;font-size:17px;color:var(--ink);text-decoration:none}
.menu-row img{width:44px;height:44px;border-radius:12px;object-fit:cover;background:var(--white)}
.menu-row:hover,.menu-row:focus-visible{background:var(--white)}
.menu-row[aria-current="page"]{background:var(--white);box-shadow:inset 3px 0 0 var(--pink)}
.menu-more{display:grid;margin:8px 20px 0;padding-top:12px;border-top:1px solid var(--line,rgba(22,19,106,.14))}
.menu-more a{padding:12px 0;font-weight:700;font-size:15px;color:var(--ink);text-decoration:none}
.menu-ico{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--yolk);color:var(--ink)}
.menu-ico svg{width:22px;height:22px}
