/* ============================================================================
   EGM Cigars — Distributor Portal
   Brand: Navy #182B43 · warm neutrals · Circe (text) · BAU Bold (large titles)
   ========================================================================== */

/* ---- Fonts ---------------------------------------------------------------- */
@font-face{font-family:'Circe';src:url('../brand/fonts/circe-extralight.woff2') format('woff2');font-weight:200;font-style:normal;font-display:swap}
@font-face{font-family:'Circe';src:url('../brand/fonts/circe-light.woff2') format('woff2');font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:'Circe';src:url('../brand/fonts/circe-regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Circe';src:url('../brand/fonts/circe-bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:'BAU';src:url('../brand/fonts/bau-bold.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}

/* ---- Tokens --------------------------------------------------------------- */
:root{
  /* --navy* = text/accent tones (flip in dark mode); --brand* = fixed EGM navy
     surfaces (hero, primary buttons, selection bar) that stay navy in BOTH themes. */
  --navy:#182B43;
  --navy-700:#22395a;
  --navy-900:#0f1d30;
  --brand:#182B43;
  --brand-700:#22395a;
  --brand-900:#0f1d30;
  --blush:#E3CAC0;
  --rose:#CCB0A7;
  --grey:#D1D3D4;
  --gold:#9c7a4d;
  --ink:#1c2535;
  --muted:#6b7585;
  --line:#e7e6e2;
  --bg:#f6f4f0;
  --bg-soft:#fbfaf8;
  --card:#ffffff;
  --radius:14px;
  --radius-sm:9px;
  --shadow:0 1px 2px rgba(24,43,67,.05),0 8px 30px rgba(24,43,67,.06);
  --shadow-lg:0 18px 50px rgba(24,43,67,.14);
  --maxw:1280px;
  /* Side gutter: grows with the viewport so content never hugs the window edge.
     Used by the header bar, page container, footer and selection bar alike. */
  --gutter:clamp(20px,4.5vw,64px);
  --header-h:72px;
  --font:'Circe',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}

*{box-sizing:border-box}
/* The off-canvas drawer parks itself past the right edge; without clipping it
   widened the document (horizontal scroll on phones, and the open drawer landed
   outside the visible area). "clip" — unlike "hidden" — keeps position:sticky working. */
html{-webkit-text-size-adjust:100%;overflow-x:clip}
@supports not (overflow-x:clip){body{overflow-x:hidden}}
body{
  margin:0;font-family:var(--font);font-weight:300;color:var(--ink);
  background:var(--bg);line-height:1.55;letter-spacing:.005em;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  /* sticky footer: page fills at least the viewport so the footer never floats mid-screen */
  display:flex;flex-direction:column;min-height:100vh;
}
#main{flex:1 0 auto}
/* object-fit:contain as the global default means an image can only scale up or
   down — never distort — if width and height are ever constrained at the same
   time (e.g. a flex item squeezed by max-width). Rules that want cropping
   (cards, hero, banners) set object-fit:cover explicitly and still win. */
img{max-width:100%;display:block;object-fit:contain}
a{color:inherit;text-decoration:none}
button{font-family:inherit}
:focus-visible{outline:2px solid var(--navy);outline-offset:2px}

.display{font-family:'BAU','Circe',sans-serif;font-weight:700;letter-spacing:.01em;line-height:1.05}
.eyebrow{font-size:.72rem;letter-spacing:.22em;text-transform:uppercase;color:var(--muted);font-weight:400}
.container{max-width:calc(var(--maxw) + 2 * var(--gutter));margin:0 auto;padding:0 var(--gutter)}
.muted{color:var(--muted)}
.center{text-align:center}

/* ---- Header --------------------------------------------------------------- */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.92);
  backdrop-filter:saturate(140%) blur(10px);border-bottom:1px solid var(--line)}
.site-header .bar{display:flex;align-items:center;gap:22px;height:var(--header-h)}
/* flex items shrink by default: without this the wordmark got squeezed
   horizontally while its fixed height stayed, i.e. visibly stretched. */
.brand-logo{flex:0 0 auto;min-width:0}
.brand-logo img{height:26px;width:auto;max-width:none}
.nav-links{display:flex;gap:4px;margin-left:6px}
.nav-links a{padding:8px 12px;border-radius:8px;font-size:.92rem;color:var(--muted);font-weight:400}
.nav-links a:hover,.nav-links a.active{color:var(--navy);background:#f0eee9}

.searchbox{position:relative;flex:1;max-width:460px;margin-left:auto}
.searchbox input{width:100%;height:42px;border:1px solid var(--line);background:#fff;
  border-radius:999px;padding:0 16px 0 42px;font-size:.94rem;color:var(--ink);transition:.15s}
.searchbox input:focus{border-color:var(--navy);box-shadow:0 0 0 3px rgba(24,43,67,.08)}
.searchbox .si{position:absolute;left:15px;top:50%;transform:translateY(-50%);color:var(--muted)}
.suggest{position:absolute;top:48px;left:0;right:0;background:#fff;border:1px solid var(--line);
  border-radius:14px;box-shadow:var(--shadow-lg);overflow:hidden;display:none;max-height:70vh;overflow-y:auto}
.suggest.open{display:block;animation:ddIn .18s ease}
@keyframes ddIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.suggest .grp{padding:10px 16px 4px;font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.suggest a{display:flex;align-items:center;gap:12px;padding:9px 16px}
.suggest a:hover,.suggest a.hl{background:#f4f2ee}
.suggest .th{width:42px;height:42px;border-radius:8px;background:#f0eee9 center/contain no-repeat;flex:0 0 auto}
.suggest .nm{font-weight:400;color:var(--navy)}
.suggest .sub{font-size:.8rem;color:var(--muted)}

/* z-index above the search field: the open panel must never slide under it */
.usermenu{position:relative;z-index:60}
.avatar{display:inline-flex;align-items:center;gap:5px;height:38px;padding:0 8px 0 0;border:0;background:none;
  color:var(--navy);cursor:pointer;font-weight:400}
.avatar .ini{width:38px;height:38px;border-radius:50%;background:var(--brand);color:#fff;display:grid;
  place-items:center;font-size:.82rem;flex:0 0 auto}
.avatar .cx{transition:transform .18s ease;opacity:.75}
.avatar[aria-expanded="true"] .cx{transform:rotate(180deg)}
.menu{position:absolute;right:0;top:46px;z-index:61;background:#fff;border:1px solid var(--line);border-radius:12px;
  box-shadow:var(--shadow-lg);min-width:210px;padding:8px;display:none}
.menu.open{display:block}
.menu .who{padding:8px 12px;border-bottom:1px solid var(--line);margin-bottom:6px}
.menu a{display:block;padding:9px 12px;border-radius:8px;font-size:.9rem}
.menu a:hover{background:#f4f2ee}

.icon-btn{display:none;background:none;border:0;color:var(--navy);cursor:pointer;padding:6px}

/* ---- Buttons -------------------------------------------------------------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:9px;cursor:pointer;
  border:1px solid transparent;border-radius:999px;padding:11px 20px;font-size:.92rem;font-weight:400;
  transition:.16s;white-space:nowrap;background:#fff}
.btn svg{width:17px;height:17px}
.btn-primary{background:linear-gradient(160deg,var(--brand-700),var(--brand) 55%,var(--brand-900));color:#fff;background-size:100% 130%}
.btn-primary:hover{background-position:0 100%;transform:translateY(-1px);box-shadow:0 6px 18px rgba(24,43,67,.22)}
.btn-outline{background:#fff;border-color:#d8d6d0;color:var(--navy)}
.btn-outline:hover{border-color:var(--navy);background:#faf9f6}
.btn-ghost{background:transparent;color:var(--navy)}
.btn-ghost:hover{background:#efedea}
.btn-sm{padding:8px 14px;font-size:.85rem}
.btn-block{width:100%}
.btn[disabled]{opacity:.5;cursor:not-allowed}

/* ---- Page furniture ------------------------------------------------------- */
/* Vertical only: the shorthand used to reset the .container side gutter to 0,
   so page content sat flush against the window edge while header/footer didn't. */
.page{padding-top:38px;padding-bottom:80px;min-height:60vh}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:26px;flex-wrap:wrap}
.page-head h1{font-size:clamp(1.7rem,3vw,2.4rem);margin:.2em 0 0;color:var(--navy)}
.crumbs{font-size:.85rem;color:var(--muted);margin-bottom:14px;display:flex;gap:8px;align-items:center}
.crumbs a:hover{color:var(--navy)}
.crumbs .sep{opacity:.5}

/* ---- Hero (home) ---------------------------------------------------------- */
.hero{background:linear-gradient(155deg,var(--brand) 0%,var(--brand-900) 100%);color:#fff;
  border-radius:22px;padding:46px 44px;margin:8px 0 38px;position:relative;overflow:hidden;
  box-shadow:inset 0 0 0 1px rgba(227,202,192,.14)}       /* faint blush keyline */
.hero:after{content:"";position:absolute;right:-60px;top:-60px;width:340px;height:340px;
  background:url('../brand/img/logos-web/egm-monogram-white.png') center/contain no-repeat;opacity:.06;
  animation:heroDrift 26s ease-in-out infinite alternate}
/* thin gold hairline along the base — echoes the gold foil of the print material */
.hero:before{content:"";position:absolute;left:44px;right:44px;bottom:0;height:2px;
  background:linear-gradient(90deg,transparent,var(--gold) 18%,#c9a468 50%,var(--gold) 82%,transparent);opacity:.75}
.hero .eyebrow{color:var(--blush)}
.hero h1{font-size:clamp(1.9rem,3.4vw,2.7rem);margin:.25em 0 .3em;max-width:18ch}
.hero p{max-width:60ch;color:#cfd6e0;font-weight:300}
@keyframes heroDrift{from{transform:translate(0,0) rotate(0deg)}to{transform:translate(-26px,18px) rotate(4deg)}}

/* ---- Collection grid ------------------------------------------------------ */
.section-title{display:flex;align-items:center;gap:14px;margin:36px 0 18px}
.section-title h2{font-size:1.15rem;color:var(--navy);margin:0;font-weight:700;letter-spacing:.02em}
/* short gold tick fading into the neutral rule — a quiet luxury accent */
.section-title .rule{flex:1;height:1px;background:linear-gradient(90deg,var(--gold) 0,rgba(156,122,77,.35) 42px,var(--line) 90px)}

.grid{display:grid;gap:20px}
.grid.collections{grid-template-columns:repeat(auto-fill,minmax(240px,1fr))}
.col-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:30px 24px 22px;text-align:center;transition:.2s;box-shadow:var(--shadow);display:flex;
  flex-direction:column;align-items:center}
.col-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:#e0ddd5}
.col-card .mark{height:130px;display:grid;place-items:center;margin-bottom:14px}
.col-card .mark img{max-height:130px;width:auto;transition:transform .5s cubic-bezier(.2,.6,.2,1)}
.col-card:hover .mark img{transform:scale(1.05)}
.col-card h3{font-size:1.02rem;color:var(--navy);margin:.2em 0 .1em;font-weight:700}
.col-card .count{font-size:.82rem;color:var(--muted)}

/* ---- Product grid --------------------------------------------------------- */
.grid.products{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
.p-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;
  transition:.18s;box-shadow:var(--shadow);position:relative;display:flex;flex-direction:column}
.p-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg)}
.p-card .ph{position:relative;aspect-ratio:1/1;background:#fff;display:block;overflow:hidden}
.p-card .ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;box-sizing:border-box;
  transition:transform .55s cubic-bezier(.2,.6,.2,1)}
.p-card:hover .ph img{transform:scale(1.045)}
.p-card .body{padding:14px 16px 16px}
.p-card .ptype{font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);font-weight:400}
.p-card h3{font-size:1rem;margin:.25em 0 .35em;color:var(--navy);font-weight:700;letter-spacing:.01em}
.p-card .meta{font-size:.82rem;color:var(--muted);display:flex;gap:8px;align-items:center}
.p-card .pill{display:inline-block;background:#f0eee9;border-radius:999px;padding:2px 9px;font-size:.74rem;color:var(--navy)}

/* selection checkbox overlay — the input covers a 44px hit zone (comfortable tap
   target) while the visible box stays small. */
.sel{position:absolute;top:10px;left:10px;z-index:3}
.sel input{position:absolute;opacity:0;width:44px;height:44px;top:-9px;left:-9px;margin:0;cursor:pointer}
.sel .box{width:26px;height:26px;border-radius:7px;background:rgba(255,255,255,.92);border:1px solid #cfccc4;
  display:grid;place-items:center;color:#fff;transition:.12s;box-shadow:0 1px 3px rgba(0,0,0,.12)}
.sel .box svg{width:15px;height:15px;opacity:0;transform:scale(.6);transition:.12s}
.sel input:checked + .box{background:var(--navy);border-color:var(--navy)}
.sel input:checked + .box svg{opacity:1;transform:scale(1)}
.p-card.picked{outline:2px solid var(--navy);outline-offset:-2px}

/* ---- Product detail ------------------------------------------------------- */
.pd{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:42px;align-items:start}
.gallery .main{background:#fff;border:1px solid var(--line);border-radius:var(--radius);aspect-ratio:4/3;
  overflow:hidden;cursor:zoom-in;position:relative}
/* absolute-fill + contain: percentage height resolves against the positioned box (aspect-ratio
   height isn't "definite" for normal-flow %height), so tall/wide photos letterbox — never crop/stretch. */
.gallery .main img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:14px;box-sizing:border-box}
.thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:10px;margin-top:12px}
.thumbs button{position:relative;border:1px solid var(--line);border-radius:10px;background:#fff;aspect-ratio:1/1;
  overflow:hidden;cursor:pointer;padding:0;transition:.12s}
.thumbs button.active{border-color:var(--navy);box-shadow:0 0 0 2px rgba(24,43,67,.12)}
.thumbs img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}

.pd .info h1{font-size:clamp(1.6rem,3vw,2.2rem);color:var(--navy);margin:.1em 0 .25em}
.specs{display:grid;grid-template-columns:auto 1fr;gap:8px 18px;margin:20px 0;font-size:.92rem}
.specs dt{color:var(--muted)}
.specs dd{margin:0;color:var(--ink)}
.prose{font-weight:300;color:#39414f}
.prose p{margin:.6em 0}
.prose a{color:var(--navy);border-bottom:1px solid var(--blush)}

/* Cigar Journal rating badge */
.cj-badge{display:flex;gap:16px;align-items:center;text-decoration:none;
  background:linear-gradient(135deg,#fbf7f0,#f4ece1);border:1px solid #e7d9c4;border-radius:14px;
  padding:14px 18px;margin:20px 0;transition:.15s}
.cj-badge:hover{box-shadow:var(--shadow);border-color:#d8c2a0}
.cj-score{flex:0 0 auto;text-align:center;line-height:1;min-width:58px}
.cj-score .n{font-family:'BAU',sans-serif;font-size:2.1rem;color:var(--navy);font-weight:700}
.cj-score .d{display:block;font-size:.7rem;color:var(--gold);letter-spacing:.12em;margin-top:2px}
.cj-body{min-width:0}
.cj-label{font-size:.73rem;letter-spacing:.12em;text-transform:uppercase;color:var(--gold);margin-bottom:3px}
.cj-note{font-size:.86rem;color:#4a4338;line-height:1.45}
.cj-more{font-size:.82rem;color:var(--navy);margin-top:7px;border-bottom:1px solid var(--blush);display:inline-block}

.variant-card{border:1px solid var(--line);border-radius:var(--radius);background:#fff;padding:16px;margin-bottom:14px;
  box-shadow:var(--shadow)}
.variant-card .vh{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.variant-card .vh h4{margin:0;font-size:1rem;color:var(--navy);font-weight:700}
.variant-card .vh .sku{font-size:.76rem;color:var(--muted)}
.asset-row{display:flex;gap:10px;overflow-x:auto;padding-bottom:6px}
.asset-tile{flex:0 0 auto;width:96px}
.asset-tile .img{width:96px;height:96px;border-radius:10px;border:1px solid var(--line);overflow:hidden;
  background:#fff;position:relative}
/* contain: these squares ARE the downloadable files — the distributor has to
   recognise each shot before ticking it, so nothing may be cropped away. */
.asset-tile .img img{width:100%;height:100%;object-fit:contain;padding:5px}
.asset-tile .sel{top:6px;left:6px}
.asset-tile .sel .box{width:22px;height:22px}

/* download toolbar */
.dl-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;background:var(--bg-soft);
  border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;margin:18px 0}
.field{display:flex;flex-direction:column;gap:4px}
.field label{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
.select{position:relative}
select,.input{height:42px;border:1px solid #d8d6d0;border-radius:10px;background:#fff;padding:0 14px;
  font-family:inherit;font-size:.92rem;color:var(--ink);min-width:150px}
select:focus,.input:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(24,43,67,.08)}
.hint{font-size:.8rem;color:var(--muted);display:flex;gap:7px;align-items:center}
.badge{display:inline-flex;align-items:center;gap:6px;background:#eef0ec;color:var(--navy);border-radius:999px;
  padding:3px 10px;font-size:.76rem}

/* ---- Selection bar (sticky) ---------------------------------------------- */
.selbar{position:fixed;left:0;right:0;bottom:0;z-index:60;transform:translateY(120%);transition:.25s;
  background:var(--brand);color:#fff;box-shadow:0 -10px 40px rgba(0,0,0,.2)}
.selbar.show{transform:translateY(0)}
.selbar .in{max-width:calc(var(--maxw) + 2 * var(--gutter));margin:0 auto;padding:14px var(--gutter);display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.selbar .cnt{font-weight:700;font-family:'BAU',sans-serif}
.selbar select{height:40px;background:var(--brand-700);color:#fff;border-color:var(--brand-700)}
.selbar .spacer{flex:1}
.selbar .btn-light{background:#fff;color:var(--navy)}
.selbar .btn-clear{background:transparent;color:#cfd6e0;border-color:rgba(255,255,255,.25)}

/* ---- Empty / notices ------------------------------------------------------ */
.notice{padding:14px 16px;border-radius:12px;font-size:.92rem;margin-bottom:18px;border:1px solid}
.notice.info{background:#eef2f7;border-color:#d6e0ec;color:#2a4a6b}
.notice.ok{background:#edf6ef;border-color:#cfe7d4;color:#256b39}
.notice.warn{background:#fdf3e7;border-color:#f3dcb8;color:#8a5a16}
.notice.err{background:#fbecea;border-color:#f3cfc9;color:#9c3326}
.empty{text-align:center;padding:70px 20px;color:var(--muted)}
.empty svg{width:46px;height:46px;opacity:.5;margin-bottom:10px}

/* ---- Footer --------------------------------------------------------------- */
.site-footer{background:var(--brand-900);color:#c2ccd8;margin-top:40px;border-top:1px solid rgba(156,122,77,.4)}
.site-footer .in{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:34px var(--gutter);
  flex-wrap:wrap;max-width:calc(var(--maxw) + 2 * var(--gutter));margin:0 auto}
.site-footer img{height:22px;width:auto;max-width:none;flex:0 0 auto;opacity:.95}
.site-footer .lnk{display:flex;gap:18px;font-size:.86rem}
.site-footer a:hover{color:#fff}
.site-footer .fine{width:100%;border-top:1px solid rgba(255,255,255,.1);padding-top:16px;font-size:.78rem;color:#8d97a8}

/* ---- Auth ----------------------------------------------------------------- */
.auth{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}
.auth .visual{background:linear-gradient(160deg,var(--brand),var(--brand-900));color:#fff;padding:56px;
  display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth .visual:after{content:"";position:absolute;right:-120px;bottom:-120px;width:520px;height:520px;
  background:url('../brand/img/logos-web/egm-monogram-white.png') center/contain no-repeat;opacity:.07}
.auth .visual .wm img{height:30px}
.auth .visual h2{font-size:2.1rem;max-width:16ch;margin:0 0 .3em}
.auth .visual p{color:#cdd5e0;max-width:46ch;font-weight:300}
.auth .panel{display:flex;align-items:center;justify-content:center;padding:40px}
.auth .card{width:100%;max-width:400px}
.auth .card .mono{height:48px;margin-bottom:22px}
.auth h1{font-size:1.55rem;color:var(--navy);margin:0 0 .25em}
.auth .lead{color:var(--muted);margin-bottom:24px}
.form-group{margin-bottom:16px}
.form-group label{display:block;font-size:.85rem;color:var(--navy);margin-bottom:6px;font-weight:400}
.form-group .input{width:100%}
.otp-input{letter-spacing:.5em;text-align:center;font-size:1.5rem;font-weight:400;padding-left:.5em}
.auth .alt{margin-top:20px;font-size:.88rem;color:var(--muted);text-align:center}
.auth .alt a{color:var(--navy);border-bottom:1px solid var(--blush)}

/* ---- Lightbox ------------------------------------------------------------- */
/* opacity/visibility instead of display:none, so open/close can animate */
.lightbox{position:fixed;inset:0;background:rgba(15,29,48,.94);z-index:200;display:flex;
  align-items:center;justify-content:center;padding:30px;
  opacity:0;visibility:hidden;transition:opacity .22s ease,visibility .22s ease}
.lightbox.open{opacity:1;visibility:visible}
.lightbox img{max-width:94vw;max-height:90vh;object-fit:contain;border-radius:8px;
  transform:scale(.965);transition:transform .24s cubic-bezier(.2,.6,.2,1)}
.lightbox.open img{transform:scale(1)}
.lightbox .x{position:absolute;top:20px;right:24px;color:#fff;background:none;border:0;font-size:2rem;cursor:pointer;line-height:1}
.lightbox .nav{position:absolute;top:50%;transform:translateY(-50%);background:rgba(255,255,255,.12);
  border:0;color:#fff;width:48px;height:48px;border-radius:50%;cursor:pointer;font-size:1.5rem}
.lightbox .prev{left:20px}.lightbox .next{right:20px}

/* ---- Responsive ----------------------------------------------------------- */
@media (max-width:980px){
  .pd{grid-template-columns:1fr;gap:26px}
  .auth{grid-template-columns:1fr}
  .auth .visual{display:none}
}
@media (max-width:760px){
  :root{--header-h:62px}
  .nav-links{display:none}
  /* No top hamburger on phones — the bottom tab bar's "Menu" opens the drawer,
     one entry point instead of two. */
  .icon-btn{display:none}
  .searchbox{max-width:none;order:3;flex-basis:100%;margin:0 0 12px;z-index:1}
  /* push the account button to the far right, away from the wordmark */
  .usermenu{margin-left:auto}
  .site-header .bar{flex-wrap:wrap;height:auto;padding:12px var(--gutter);gap:12px}
  .brand-logo img{height:19px}
  .hero{padding:32px 24px}
  .mobile-nav{display:block}
  /* footer links: comfortable tap targets */
  .site-footer .lnk a{padding:10px 4px;display:inline-block}
}
@media (max-width:640px){
  /* Compact selection bar: count on a thin line, the two selects side by side,
     then Clear + Download sharing a row — instead of 5 stacked rows covering
     half of a small phone screen. */
  .selbar .in{padding:10px 14px calc(10px + env(safe-area-inset-bottom));gap:8px 10px}
  .selbar .cnt{flex-basis:100%;font-size:.9rem}
  .selbar .field{flex:1 1 40%;min-width:0}
  .selbar .field label{display:none}
  .selbar select{width:100%;min-width:0;height:38px;font-size:.85rem;padding:0 8px}
  .selbar .spacer{display:none}
  .selbar .btn-clear{flex:0 0 auto;height:40px;padding:0 14px;font-size:.85rem}
  .selbar .btn-light{flex:1 1 auto;height:40px;justify-content:center;font-size:.9rem}
  /* Compact download toolbar: fields two-up, buttons full width */
  .dl-toolbar{gap:10px}
  .dl-toolbar .field{flex:1 1 40%;min-width:0}
  .dl-toolbar .field select{width:100%;min-width:0}
  .dl-toolbar .btn{flex:1 1 46%;justify-content:center}
}
/* Keep the last content rows reachable while the selection bar is open. */
body.selbar-open #main{padding-bottom:170px}
@media (min-width:761px){.mobile-nav{display:none}}
.mobile-nav{padding:6px 0}
.mobile-nav a{display:block;padding:10px 4px;color:var(--navy);font-size:.95rem}

/* Collections nav dropdown */
.nav-dd{position:relative}
.nav-dd-toggle{display:inline-flex;align-items:center;gap:5px;padding:8px 12px;border-radius:8px;font-size:.92rem;color:var(--muted);font-weight:400}
.nav-dd-toggle:hover,.nav-dd:hover .nav-dd-toggle,.nav-dd:focus-within .nav-dd-toggle{color:var(--navy);background:#f0eee9}
.nav-dd-toggle .cx{transition:transform .18s ease}
.nav-dd:hover .nav-dd-toggle .cx,.nav-dd:focus-within .nav-dd-toggle .cx{transform:rotate(180deg)}
/* transparent bridge so the menu doesn't close while the pointer crosses the gap */
.nav-dd::after{content:"";position:absolute;left:0;right:0;top:100%;height:10px}
.nav-dd-menu{position:absolute;left:0;top:100%;margin-top:6px;min-width:250px;background:#fff;
  border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:8px;z-index:60;
  opacity:0;visibility:hidden;transform:translateY(-6px);transition:opacity .16s ease,transform .16s ease}
.nav-dd:hover .nav-dd-menu,.nav-dd:focus-within .nav-dd-menu{opacity:1;visibility:visible;transform:none}
.nav-dd-head{padding:8px 12px 4px;font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;color:var(--muted)}
.nav-dd-menu a{display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:9px 12px;border-radius:8px;font-size:.9rem;color:var(--navy)}
.nav-dd-menu a:hover{background:#f4f2ee}
.nav-dd-n{font-size:.75rem;color:var(--muted);background:#f0eee9;border-radius:20px;padding:1px 8px;min-width:22px;text-align:center}
.nav-dd-sep{height:1px;background:var(--line);margin:6px}
.nav-dd-all{color:var(--muted)!important;font-size:.85rem!important}
/* mobile: indented collection sub-links under "Collections" */
.mobile-nav .mnav-sub{padding-left:22px;font-size:.9rem;color:var(--muted)}

/* Favourite heart on product cards */
.p-card{position:relative}
.p-card .fav{position:absolute;top:10px;right:10px;z-index:3;width:34px;height:34px;border-radius:50%;
  border:1px solid var(--line);background:rgba(255,255,255,.9);color:var(--navy);display:grid;place-items:center;
  cursor:pointer;padding:0;transition:transform .1s ease,background .12s ease}
.p-card .fav svg{fill:none;stroke:currentColor;stroke-width:2}
.p-card .fav:hover{background:#fff;transform:scale(1.08)}
.p-card .fav.on{color:#c0392b;border-color:#e6b8b2;background:#fff}
.p-card .fav.on svg{fill:currentColor;stroke:currentColor}
/* Favourite button on the product page */
.btn.js-fav .heart svg{fill:none;stroke:currentColor;stroke-width:2;vertical-align:-3px;margin-right:6px}
.btn.js-fav.on{color:#c0392b;border-color:#e6b8b2}
.btn.js-fav.on .heart svg{fill:currentColor}

/* Account tables (downloads history) */
.acct-table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:14px;background:#fff}
.acct-table{width:100%;border-collapse:collapse;font-size:.92rem;min-width:520px}
.acct-table th{text-align:left;font-weight:600;color:var(--muted);font-size:.72rem;letter-spacing:.1em;
  text-transform:uppercase;padding:12px 16px;border-bottom:1px solid var(--line)}
.acct-table td{padding:12px 16px;border-bottom:1px solid var(--line);color:var(--navy)}
.acct-table tr:last-child td{border-bottom:none}
.acct-table .pill{display:inline-block;font-size:.72rem;background:#f0eee9;color:var(--navy);border-radius:20px;padding:2px 10px}

/* utility */
.flex{display:flex}.between{justify-content:space-between}.center-y{align-items:center}
.gap{gap:12px}.wrap{flex-wrap:wrap}.mt{margin-top:18px}.mt-lg{margin-top:30px}.hidden{display:none}

/* ============================================================================
   Motion & polish (v13)
   Pure-CSS entrances always end visible (no JS needed); anything that HIDES
   content first is scoped under html.js-anim, which app.js adds only when it
   runs and the visitor hasn't asked for reduced motion.
   ========================================================================== */
::selection{background:var(--navy);color:#fff}

/* Page + hero + auth entrances (pure CSS, safe without JS) */
@keyframes pageIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes riseIn{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
#main{animation:pageIn .5s ease both}
.hero>*{animation:riseIn .65s cubic-bezier(.2,.6,.2,1) both}
.hero>*:nth-child(2){animation-delay:.08s}
.hero>*:nth-child(3){animation-delay:.16s}
.auth .card{animation:riseIn .55s cubic-bezier(.2,.6,.2,1) both}
.auth .visual>*{animation:riseIn .7s cubic-bezier(.2,.6,.2,1) both}
.auth .visual>*:nth-child(2){animation-delay:.1s}
.auth .visual:after{animation:heroDrift 30s ease-in-out infinite alternate}

/* Reveal on scroll (JS adds .rv at init, .in when the element enters the viewport) */
html.js-anim .rv{opacity:0;transform:translateY(14px);
  transition:opacity .6s ease,transform .6s cubic-bezier(.2,.6,.2,1)}
html.js-anim .rv.in{opacity:1;transform:none}

/* Images fade in as they finish loading (JS marks them .ld).
   The .ld selectors mirror the hiding ones so they always win on specificity. */
html.js-anim .p-card .ph img,
html.js-anim .asset-tile .img img,
html.js-anim .col-card .mark img,
html.js-anim .thumbs img{opacity:0}
html.js-anim .p-card .ph img.ld,
html.js-anim .asset-tile .img img.ld,
html.js-anim .col-card .mark img.ld,
html.js-anim .thumbs img.ld,
html.js-anim img.ld{opacity:1;transition:opacity .4s ease}
/* keep the hover zoom transition alongside the fade */
html.js-anim .p-card .ph img.ld{transition:opacity .4s ease,transform .55s cubic-bezier(.2,.6,.2,1)}
html.js-anim .col-card .mark img.ld{transition:opacity .4s ease,transform .5s cubic-bezier(.2,.6,.2,1)}

/* Product gallery: soft crossfade when switching thumbnails */
.gallery .main img{transition:opacity .22s ease}
.gallery .main img.swapping{opacity:.15}

/* Favourite heart: pop when saved */
@keyframes favPop{0%{transform:scale(1)}40%{transform:scale(1.35)}70%{transform:scale(.92)}100%{transform:scale(1)}}
.js-fav.pop svg,.js-fav.pop .heart svg{animation:favPop .38s cubic-bezier(.2,.6,.2,1)}

/* Selection bar: gentle count pulse when it changes */
@keyframes cntPulse{0%{transform:scale(1)}45%{transform:scale(1.18)}100%{transform:scale(1)}}
.selbar .cnt{display:inline-block}
.selbar .cnt.pulse{animation:cntPulse .3s ease}

/* Inline video player overlay (brand films) */
.videobox{position:fixed;inset:0;z-index:220;background:rgba(15,29,48,.95);display:flex;
  flex-direction:column;align-items:center;justify-content:center;padding:26px;
  animation:pageIn .2s ease}
.videobox .vb-bar{display:flex;align-items:center;gap:14px;width:min(1100px,94vw);margin-bottom:10px}
.videobox .vb-title{color:#f4f1ea;font-size:.95rem;font-weight:600;flex:1;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis}
.videobox .vb-close{background:none;border:0;color:#fff;font-size:2rem;line-height:1;cursor:pointer;padding:4px}
.videobox video{width:min(1100px,94vw);max-height:78vh;background:#000;border-radius:12px;
  box-shadow:0 24px 80px rgba(0,0,0,.5);outline:none}

/* ============================================================================
   v16 — photographic hero, collection banners, quick download, skeletons,
   mobile carousel + drawer + tab bar, dark theme.
   ========================================================================== */

/* ---- Home hero with lifestyle photo -------------------------------------- */
.hero.has-media{min-height:340px;display:flex;flex-direction:column;justify-content:center}
.hero.has-media:after{display:none}                 /* photo replaces the monogram */
.hero .hero-media{position:absolute;top:0;right:0;bottom:0;width:74%;overflow:hidden;border-radius:0 22px 22px 0}
/* The photo fades out via a MASK (not a colour overlay), so it dissolves into the
   real hero gradient underneath — a long ramp means no visible seam anywhere. */
.hero .hero-media img{width:100%;height:100%;object-fit:cover;object-position:center;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.18) 22%,rgba(0,0,0,.55) 45%,rgba(0,0,0,.9) 68%,#000 85%);
          mask-image:linear-gradient(90deg,transparent 0%,rgba(0,0,0,.18) 22%,rgba(0,0,0,.55) 45%,rgba(0,0,0,.9) 68%,#000 85%);
  animation:heroZoom 18s ease-in-out infinite alternate}
/* just a whisper of navy on top for text safety — no hard-edged veil */
.hero .hero-media:after{content:"";position:absolute;inset:0;
  background:linear-gradient(90deg,rgba(24,43,67,.30) 0%,rgba(24,43,67,.06) 55%,rgba(24,43,67,.22) 100%)}
.hero.has-media>*:not(.hero-media){position:relative;z-index:2;max-width:52%}
@keyframes heroZoom{from{transform:scale(1)}to{transform:scale(1.07)}}
@media (max-width:860px){
  .hero .hero-media{width:100%;border-radius:22px}
  .hero .hero-media img{-webkit-mask-image:none;mask-image:none}
  .hero .hero-media:after{background:linear-gradient(180deg,rgba(24,43,67,.88) 0%,rgba(24,43,67,.72) 100%)}
  .hero.has-media>*:not(.hero-media){max-width:none}
}

/* ---- Collection page banner ----------------------------------------------- */
.col-hero{position:relative;border-radius:20px;overflow:hidden;margin-bottom:26px;
  min-height:clamp(220px,26vw,330px);display:flex;align-items:flex-end;box-shadow:var(--shadow-lg)}
.col-hero .bg{position:absolute;inset:0;overflow:hidden}
/* Absolute + fixed 24px overscan top and bottom: percentage margins resolve
   against WIDTH, which pushed the photo far off-centre and left a gap under the
   banner. The overscan gives the parallax (±20px) room without ever uncovering. */
.col-hero .bg img{position:absolute;left:0;top:-24px;width:100%;height:calc(100% + 48px);
  object-fit:cover;object-position:center 42%;will-change:transform}
.col-hero .bg:after{content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(15,29,48,.22) 0%,rgba(15,29,48,.66) 78%,rgba(15,29,48,.82) 100%)}
.col-hero .in{position:relative;z-index:2;display:flex;align-items:center;gap:20px;padding:26px 30px;width:100%}
.col-hero .mark-chip{flex:0 0 auto;background:rgba(250,249,246,.94);border-radius:14px;padding:10px 14px;
  box-shadow:0 6px 22px rgba(0,0,0,.25)}
.col-hero .mark-chip img{height:66px;width:auto;display:block}
.col-hero .eyebrow{color:var(--blush)}
.col-hero h1{color:#fff;margin:.1em 0 0;font-size:clamp(1.7rem,3vw,2.4rem)}
.col-hero p{color:#d6dce6;margin:.25em 0 0;font-size:.95rem}
.col-hero:before{content:"";position:absolute;left:30px;right:30px;bottom:0;height:2px;z-index:3;
  background:linear-gradient(90deg,transparent,var(--gold) 20%,#c9a468 50%,var(--gold) 80%,transparent);opacity:.8}
@media (max-width:640px){
  .col-hero{min-height:190px}
  .col-hero .in{padding:18px 18px;gap:14px}
  .col-hero .mark-chip img{height:46px}
}

/* ---- Brand Assets: uniform folder tiles (Drive-like) ---------------------- */
/* Category thumbnails carried their own white/grey backgrounds, which clashed
   with the cream page. Identical navy folders read as one calm system instead. */
.folders{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:20px}
.folder-card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);
  padding:24px 22px 20px;box-shadow:var(--shadow);transition:.2s;display:block}
.folder-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-lg);border-color:#dcd8cf}
.folder{position:relative;display:block;width:68px;margin-bottom:16px}
/* direct child only — the category icon nested in .ico must keep its own size */
.folder>svg{width:100%;height:auto;display:block;overflow:visible;
  filter:drop-shadow(0 6px 12px rgba(24,43,67,.18));transition:transform .25s cubic-bezier(.2,.6,.2,1)}
.folder .tab{fill:var(--brand-700)}
.folder .body{fill:var(--brand)}
.folder .strip{fill:var(--gold);opacity:.95}
/* Hover: a sheet is pulled out of the folder, sideways. It travels PAST the right
   edge instead of upward, so it never crosses the gold trim — the earlier version
   rose through that line and looked sliced. The sheet sits between the back wall and
   the front lip, so it reads as coming from inside the pocket. */
.folder>svg{overflow:visible;transform-origin:50% 100%}
.folder .slide{opacity:0;transform-origin:50% 50%;transform-box:fill-box;
  transition:transform .44s cubic-bezier(.2,.85,.3,1),opacity .26s ease}
.folder .sheet{fill:#fff}
.folder .line{fill:var(--gold);opacity:.5}
.folder .line-b{fill:var(--brand-700);opacity:.3}
.folder-card:hover .folder>svg,.folder-card:focus-within .folder>svg{transform:translateY(-2px)}
.folder-card:hover .folder .slide,.folder-card:focus-within .folder .slide{
  opacity:1;transform:translate(20px,-6px) rotate(7deg)}
@media (prefers-reduced-motion:reduce){
  .folder .slide{display:none}
  .folder-card:hover .folder>svg{transform:none}
}
}
.folder-card h3{font-size:1rem;color:var(--navy);margin:0;font-weight:700;letter-spacing:.01em}
.folder-card .count{font-size:.8rem;color:var(--gold);margin-top:3px;letter-spacing:.04em}
.folder-card .blurb{font-size:.82rem;color:var(--muted);line-height:1.45;margin-top:7px}
[data-theme="dark"] .folder .tab{fill:#2f4a6e}
[data-theme="dark"] .folder-card:hover{border-color:#3a4d69}


/* ---- Quick download on product cards -------------------------------------- */
.p-card .qdl{position:absolute;right:10px;bottom:10px;z-index:3;width:36px;height:36px;border-radius:50%;
  display:grid;place-items:center;background:rgba(24,43,67,.88);color:#fff;border:1px solid rgba(255,255,255,.25);
  opacity:0;transform:translateY(6px);transition:opacity .18s ease,transform .18s ease,background .15s}
.p-card .qdl svg{width:16px;height:16px}
.p-card:hover .qdl,.p-card .qdl:focus-visible{opacity:1;transform:none}
.p-card .qdl:hover{background:var(--gold)}
@media (hover:none){.p-card .qdl{opacity:.92;transform:none}}

/* ---- Skeleton shimmer while thumbnails load -------------------------------- */
@keyframes shimmer{from{background-position:200% 0}to{background-position:-200% 0}}
html.js-anim .p-card .ph,
html.js-anim .asset-tile .img,
html.js-anim .thumbs button,
html.js-anim .gallery .main{background-image:linear-gradient(100deg,#f1efe9 40%,#faf9f6 50%,#f1efe9 60%);
  background-size:200% 100%;animation:shimmer 1.5s linear infinite}
html.js-anim .p-card .ph:has(img.ld),
html.js-anim .asset-tile .img:has(img.ld),
html.js-anim .thumbs button:has(img.ld),
html.js-anim .gallery .main:has(img.ld){animation:none;background-image:none}

/* ---- Product gallery: swipe carousel on phones ----------------------------- */
.pd-swipe{display:none}
@media (max-width:760px){
  .gallery .main,.gallery .thumbs{display:none}
  .pd-swipe{display:block;position:relative}
  .pd-swipe .track{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;gap:10px;
    border-radius:var(--radius);-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .pd-swipe .track::-webkit-scrollbar{display:none}
  .pd-swipe .slide{flex:0 0 100%;scroll-snap-align:center;aspect-ratio:1/1;background:#fff;
    border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;position:relative}
  .pd-swipe .slide img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:12px;box-sizing:border-box}
  .pd-swipe .dots{display:flex;justify-content:center;gap:6px;margin-top:10px}
  .pd-swipe .dots span{width:7px;height:7px;border-radius:50%;background:#cfccc4;transition:.2s}
  .pd-swipe .dots span.on{background:var(--gold);transform:scale(1.25)}
}

/* ---- Mobile drawer (replaces the push-down menu) --------------------------- */
@media (max-width:760px){
  .mobile-nav{display:block;position:fixed;top:0;right:0;bottom:0;z-index:130;width:min(320px,84vw);
    background:var(--card);border-top:none;border-left:1px solid var(--line);padding:66px 22px 30px;
    overflow-y:auto;transform:translateX(100%);visibility:hidden;
    transition:transform .28s cubic-bezier(.2,.6,.2,1),visibility .28s;
    box-shadow:-18px 0 50px rgba(15,29,48,.25)}
  .mobile-nav.open{transform:none;visibility:visible}
  .mobile-nav a{border-radius:8px;padding:11px 10px}
  .mobile-nav a:active{background:#f0eee9}
  .drawer-close{position:absolute;top:14px;right:14px;background:none;border:0;color:var(--navy);
    font-size:1.7rem;line-height:1;cursor:pointer;padding:6px}
  .drawer-backdrop{position:fixed;inset:0;background:rgba(15,29,48,.5);z-index:125;opacity:0;
    visibility:hidden;transition:.25s}
  .drawer-backdrop.show{opacity:1;visibility:visible}
}
@media (min-width:761px){.drawer-close,.drawer-backdrop{display:none}}

/* ---- Bottom tab bar on phones ---------------------------------------------- */
.tabbar{display:none}
@media (max-width:760px){
  .tabbar{position:fixed;left:0;right:0;bottom:0;z-index:55;display:flex;
    background:var(--card);border-top:1px solid var(--line);
    padding:6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow:0 -6px 24px rgba(15,29,48,.08);transition:transform .25s}
  .tabbar a,.tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
    background:none;border:0;color:var(--muted);font-family:inherit;font-size:.64rem;letter-spacing:.04em;
    padding:4px 0;cursor:pointer}
  .tabbar svg{width:21px;height:21px}
  .tabbar .ic{position:relative;display:inline-flex}
  .tabbar .tab-badge{position:absolute;top:-5px;right:-9px;min-width:16px;height:16px;padding:0 4px;
    border-radius:20px;background:var(--gold);color:#fff;font-size:.6rem;line-height:16px;text-align:center}
  .tabbar .on{color:var(--navy)}
  .tabbar .on svg{color:var(--gold)}
  #main{padding-bottom:76px}
  body.selbar-open .tabbar{transform:translateY(110%)}
  body.selbar-open #main{padding-bottom:190px}
  .site-footer .in{padding-bottom:44px}
}

/* ---- Dark theme ------------------------------------------------------------ */
:root[data-theme="dark"]{
  --navy:#dce4f1;          /* headings / primary text on dark */
  --navy-700:#c4d0e2;
  --navy-900:#0c1622;
  --ink:#e6e3dc;
  --muted:#98a5b8;
  --line:#28394f;
  --bg:#0e1826;
  --bg-soft:#132132;
  --card:#162740;
  --shadow:0 1px 2px rgba(0,0,0,.35),0 8px 30px rgba(0,0,0,.3);
  --shadow-lg:0 18px 50px rgba(0,0,0,.5);
}
[data-theme="dark"] .site-header{background:rgba(13,22,35,.92);border-bottom-color:var(--line)}
[data-theme="dark"] .brand-logo img,
[data-theme="dark"] .page-head img[src*="collections-web"],
[data-theme="dark"] .auth .card .mono{filter:brightness(0) invert(.92)}
[data-theme="dark"] .nav-links a:hover,[data-theme="dark"] .nav-links a.active,
[data-theme="dark"] .nav-dd-toggle:hover,[data-theme="dark"] .nav-dd:hover .nav-dd-toggle,
[data-theme="dark"] .nav-dd:focus-within .nav-dd-toggle{background:#1d3049;color:var(--navy)}
[data-theme="dark"] .nav-dd-menu,[data-theme="dark"] .menu,[data-theme="dark"] .suggest{background:var(--card);border-color:var(--line)}
[data-theme="dark"] .nav-dd-menu a:hover,[data-theme="dark"] .menu a:hover,
[data-theme="dark"] .suggest a:hover,[data-theme="dark"] .suggest a.hl{background:#1f3350}
[data-theme="dark"] .nav-dd-n,[data-theme="dark"] .pill,[data-theme="dark"] .badge{background:#1f3350;color:var(--navy)}
[data-theme="dark"] .searchbox input,[data-theme="dark"] select,[data-theme="dark"] .input{
  background:var(--card);border-color:#33455f;color:var(--ink)}
[data-theme="dark"] .searchbox input:focus,[data-theme="dark"] select:focus,[data-theme="dark"] .input:focus{
  border-color:var(--gold);box-shadow:0 0 0 3px rgba(156,122,77,.22)}
[data-theme="dark"] .btn{background:var(--card);color:var(--ink)}
[data-theme="dark"] .btn-outline{background:var(--card);border-color:#3a4d69;color:var(--navy)}
[data-theme="dark"] .btn-outline:hover{border-color:var(--gold);background:#1c2f4a}
[data-theme="dark"] .btn-ghost{background:transparent}
[data-theme="dark"] .btn-ghost:hover{background:#1d3049}
[data-theme="dark"] .btn-primary{color:#fff;box-shadow:inset 0 0 0 1px rgba(227,202,192,.18)}
[data-theme="dark"] .variant-card{background:var(--card)}
/* Media stages stay WHITE even in dark mode: EGM packshots and collection logos
   live on white, so a white stage keeps artwork and background seamless — no
   dark box "jump" behind light imagery. */
[data-theme="dark"] .p-card .ph,[data-theme="dark"] .gallery .main,
[data-theme="dark"] .asset-tile .img,[data-theme="dark"] .thumbs button,
[data-theme="dark"] .pd-swipe .slide{background:#fff;border-color:var(--line)}
[data-theme="dark"] .col-card .mark{background:#fff;border-radius:12px;width:100%}
[data-theme="dark"] .col-card .mark img{mix-blend-mode:normal}
[data-theme="dark"] .suggest .th{background-color:#fff}
[data-theme="dark"] .sel .box{background:rgba(22,39,64,.92);border-color:#3a4d69}
[data-theme="dark"] .sel input:checked + .box{background:var(--gold);border-color:var(--gold)}
[data-theme="dark"] .p-card .fav{background:rgba(22,39,64,.92);border-color:#3a4d69;color:var(--navy)}
[data-theme="dark"] .p-card .fav.on{color:#e07b6d;border-color:#7a4a42;background:#241c22}
[data-theme="dark"] .cj-badge{background:linear-gradient(135deg,#1f2536,#262b22);border-color:#4a3f28}
[data-theme="dark"] .cj-note{color:#cfc7b6}
[data-theme="dark"] .dl-toolbar{background:var(--bg-soft);border-color:var(--line)}
[data-theme="dark"] .notice.info{background:#13253c;border-color:#28466b;color:#9ec1e8}
[data-theme="dark"] .notice.ok{background:#12301c;border-color:#245a35;color:#8fd6a5}
[data-theme="dark"] .notice.warn{background:#33260e;border-color:#6b501f;color:#e5bd72}
[data-theme="dark"] .notice.err{background:#331313;border-color:#6b2a26;color:#eda49a}
[data-theme="dark"] .acct-table-wrap{background:var(--card);border-color:var(--line)}
[data-theme="dark"] .acct-table th,[data-theme="dark"] .acct-table td{border-color:var(--line)}
[data-theme="dark"] .mobile-nav a:active{background:#1f3350}
[data-theme="dark"] .prose{color:#c8cdd6}
[data-theme="dark"] .prose a{color:var(--navy)}
[data-theme="dark"] ::selection{background:var(--gold);color:#0e1826}

/* ============================================================================
   v27 — nav states, counters, "New" badges, toast, first-run tour, wide screens
   ========================================================================== */

/* Active section in the desktop nav */
.nav-links a.active,.nav-dd-toggle.active{color:var(--navy);background:#f0eee9;position:relative}
.nav-links a.active::after,.nav-dd-toggle.active::after{content:"";position:absolute;left:12px;right:12px;bottom:3px;
  height:2px;border-radius:2px;background:var(--gold)}
/* Favourites counter in the nav */
.nav-count{display:inline-block;min-width:18px;margin-left:7px;padding:0 5px;border-radius:20px;
  background:var(--gold);color:#fff;font-size:.68rem;line-height:18px;text-align:center;vertical-align:1px}
.mobile-nav .nav-count{background:var(--gold)}

/* "New" badge on product cards */
.new-badge{position:absolute;top:10px;left:50%;transform:translateX(-50%);z-index:3;
  background:var(--brand);color:#fff;font-size:.62rem;letter-spacing:.14em;text-transform:uppercase;
  padding:3px 9px;border-radius:20px;box-shadow:0 4px 12px rgba(24,43,67,.28)}
.p-card:has(.sel) .new-badge{left:auto;right:52px;transform:none}

/* Selection bar: how many picks came from other pages */
.sel-note{font-family:var(--font);font-weight:300;font-size:.8rem;color:#b9c4d3;margin-left:6px}

/* Toast (mirrors the admin one) */
.egm-toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,16px);z-index:240;
  background:var(--brand);color:#fff;padding:12px 20px;border-radius:10px;font-size:.9rem;
  box-shadow:0 12px 34px rgba(24,43,67,.32);opacity:0;visibility:hidden;
  transition:opacity .18s ease,transform .18s ease;max-width:min(90vw,460px);text-align:center}
.egm-toast.show{opacity:1;visibility:visible;transform:translate(-50%,0)}
.egm-toast.err{background:#8f2530}
body.selbar-open .egm-toast{bottom:96px}
@media (max-width:760px){.egm-toast{bottom:88px}body.selbar-open .egm-toast{bottom:150px}}

/* First-run tour */
.tour{position:fixed;inset:0;z-index:250;background:rgba(15,29,48,.62);backdrop-filter:blur(3px);
  display:grid;place-items:center;padding:22px;opacity:0;transition:opacity .25s ease}
.tour.show{opacity:1}
.tour-card{width:min(430px,100%);background:var(--card);border-radius:20px;overflow:hidden;
  box-shadow:0 30px 90px rgba(15,29,48,.45);transform:translateY(10px) scale(.98);
  transition:transform .28s cubic-bezier(.2,.6,.2,1)}
.tour.show .tour-card{transform:none}
.tour-body{padding:34px 30px 10px;text-align:center}
.tour-ico{display:grid;place-items:center;width:60px;height:60px;margin:0 auto 16px;border-radius:50%;
  background:linear-gradient(160deg,var(--brand-700),var(--brand));color:#fff;
  box-shadow:0 10px 24px rgba(24,43,67,.28)}
.tour-step h3{font-family:'BAU','Circe',sans-serif;font-size:1.16rem;color:var(--navy);margin:0 0 10px}
.tour-step p{color:var(--muted);font-size:.94rem;line-height:1.6;margin:0}
.tour-step strong{color:var(--navy);font-weight:400}
.tour-foot{display:flex;align-items:center;gap:10px;padding:18px 24px 22px}
.tour-dots{display:flex;gap:6px;flex:1}
.tour-dots i{width:7px;height:7px;border-radius:50%;background:#d8d5cd;transition:.2s}
.tour-dots i.on{background:var(--gold);transform:scale(1.25)}

/* Roomier catalogue on very wide screens */
@media (min-width:1600px){
  :root{--maxw:1500px}
  .grid.products{grid-template-columns:repeat(auto-fill,minmax(215px,1fr))}
  .grid.collections{grid-template-columns:repeat(auto-fill,minmax(230px,1fr))}
}

[data-theme="dark"] .nav-links a.active,[data-theme="dark"] .nav-dd-toggle.active{background:#1d3049}
[data-theme="dark"] .tour-card{background:var(--card)}
[data-theme="dark"] .tour-dots i{background:#33455f}

/* Brand asset: hovering the thumbnail offers a look at the full picture. The
   magnifier sits over a soft wash rather than a dark scrim — these are packshots on
   white, and dimming them to announce a hover state is the wrong trade. */
.ph.zoomable{position:relative;cursor:zoom-in}
.zoom-hint{position:absolute;inset:0;display:grid;place-items:center;border:0;padding:0;margin:0;
  background:rgba(255,255,255,.55);color:var(--navy);opacity:0;cursor:zoom-in;
  transition:opacity .18s ease}
.zoom-hint svg{width:26px;height:26px;background:#fff;border-radius:50%;padding:9px;
  box-shadow:0 4px 16px rgba(24,43,67,.22);transform:scale(.86);transition:transform .18s ease}
.ph.zoomable:hover .zoom-hint,.zoom-hint:focus-visible{opacity:1}
.ph.zoomable:hover .zoom-hint svg,.zoom-hint:focus-visible svg{transform:scale(1)}
.zoom-hint:focus-visible{outline:2px solid var(--gold);outline-offset:-3px}
[data-theme="dark"] .zoom-hint{background:rgba(12,20,32,.45);color:#fff}
[data-theme="dark"] .zoom-hint svg{background:#182b43}
/* Touch has no hover: show it faintly so the affordance is discoverable at all. */
@media (hover:none){.zoom-hint{opacity:1;background:none}
  .zoom-hint svg{box-shadow:0 2px 10px rgba(24,43,67,.28)}}
@media (prefers-reduced-motion:reduce){.zoom-hint,.zoom-hint svg{transition:none}}

/* ---- Download busy state -------------------------------------------------
   A conversion takes seconds with nothing on screen to show for it. Single
   files get a spinning ring (there is no honest percentage for one file); ZIP
   bundles get a bar that fills the button itself, driven by the real count of
   files already written into the archive. Both sit INSIDE the control, so the
   layout never shifts while a download is being prepared.                   */
.is-dl-busy{position:relative;overflow:hidden;cursor:progress}
.is-dl-busy .dl-fill{position:absolute;left:0;top:0;bottom:0;width:0;z-index:0;
  background:rgba(156,122,77,.32);transition:width .35s ease;pointer-events:none}
.btn-primary.is-dl-busy .dl-fill{background:rgba(255,255,255,.24)}
.is-dl-busy .dl-ring{display:inline-block;flex:0 0 auto;width:15px;height:15px;border-radius:50%;
  border:2px solid currentColor;border-top-color:transparent;opacity:.9;
  animation:dl-spin .7s linear infinite;position:relative;z-index:1}
.is-dl-busy .dl-label{position:relative;z-index:1}
.p-card .qdl.is-dl-busy .dl-ring{width:16px;height:16px}
@keyframes dl-spin{to{transform:rotate(360deg)}}

/* Respect the visitor's motion preference across the board.
   The ring then stops after one turn — it stays a readable "busy" glyph, and
   the label plus aria-busy still say what is happening. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001s!important;animation-iteration-count:1!important;transition-duration:.001s!important}
}

/* Favourites counter: a short bump when a product is added, so the number that just
   changed is noticed without a page reload. */
.nav-count.bump,.tab-badge.bump{animation:fav-bump .42s cubic-bezier(.3,1.4,.4,1)}
@keyframes fav-bump{0%{transform:scale(1)}38%{transform:scale(1.45)}100%{transform:scale(1)}}

/* Progressive loading: a quiet skeleton while a tile waits its turn in the queue,
   so an empty box never reads as a missing photo. */
img[data-src]{background:#f0eee9;min-height:40px}
img.lz-loading{animation:lz-pulse 1.1s ease-in-out infinite}
img.lz-done{animation:lz-in .3s ease both}
/* A tile that gave up shows the placeholder — it must stop pulsing, or the page
   looks like it is still loading something that will never arrive. */
img.lz-failed{animation:none;background:none}
@keyframes lz-pulse{0%,100%{opacity:.55}50%{opacity:.85}}
@keyframes lz-in{from{opacity:0}to{opacity:1}}
[data-theme="dark"] img[data-src]{background:#1c2b40}
@media (prefers-reduced-motion:reduce){img.lz-loading,img.lz-done{animation:none}}
