:root{
  /* Core brand palette — grounded in the workshop itself:
     ink = the navy of a finished suit, paper = pattern-paper cream,
     brass = button and trim hardware, thread = the red spool on the machine. */
  --ink:#171E28; --ink-2:#212B37; --ink-3:#2C3846;
  --paper:#EFE9DC; --paper-2:#F7F4EC;
  --brass:#A87C3E; --brass-light:#D8AE72; --brass-deep:#7E5C2C;
  --thread:#8B2A2A; --charcoal:#2A2A2A;
  --line: rgba(23,30,40,0.14); --line-light: rgba(239,233,220,0.18);
  --success:#3a6e56; --ok-text:#5fa583;

  /* semantic theme tokens — dark is default */
  --bg: var(--ink);
  --bg-elevated: var(--ink-2);
  --bg-raised: var(--ink-3);
  --text: var(--paper-2);
  --text-70: rgba(247,244,236,0.76);
  --text-60: rgba(247,244,236,0.68);
  --text-55: rgba(247,244,236,0.63);
  --text-50: rgba(247,244,236,0.58);
  --text-40: rgba(247,244,236,0.52);
  --hairline: var(--line-light);
  --nav-bg: rgba(23,30,40,0.92);
  --accent: var(--brass-light);
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.20);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.26);
  --shadow-lg: 0 14px 40px rgba(0,0,0,0.34);
}
[data-theme="light"]{
  --ok-text:#2c6a4c;
  --bg:#F7F4EC; --bg-elevated:#FFFFFF; --bg-raised:#EFE9DC; --text:#171E28;
  --text-70: rgba(23,30,40,0.82); --text-60: rgba(23,30,40,0.74);
  --text-55: rgba(23,30,40,0.7); --text-50: rgba(23,30,40,0.66); --text-40: rgba(23,30,40,0.64);
  --hairline: rgba(23,30,40,0.13);
  --nav-bg: rgba(247,244,236,0.92);
  --accent: var(--brass-deep);
  --shadow-sm: 0 1px 2px rgba(23,30,40,0.06);
  --shadow-md: 0 4px 16px rgba(23,30,40,0.08);
  --shadow-lg: 0 14px 40px rgba(23,30,40,0.12);
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  background:var(--bg); color:var(--text);
  font-family:'Work Sans',Arial,sans-serif; margin:0; line-height:1.6;
  transition:background .2s ease, color .2s ease;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,.display{font-family:'Fraunces',Georgia,serif; font-weight:600; line-height:1.18; margin:0;}
h1{font-size:clamp(30px,4.2vw,50px); letter-spacing:-0.01em;}
h2{font-size:clamp(23px,2.8vw,33px); letter-spacing:-0.005em;}
h3{font-size:19px;}
p{margin:0 0 1em;}
.mono{font-family:'IBM Plex Mono',monospace;}
a{color:inherit;}
:focus-visible{outline:2px solid var(--accent); outline-offset:3px; border-radius:2px;}
.wrap{max-width:1140px; margin:0 auto; padding:0 24px;}
.mobile-hide{display:flex;}
@media(max-width:880px){.mobile-hide{display:none !important;}}
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important;}
}

/* ---------- Nav ---------- */
nav:not(.drawer-links){position:sticky; top:0; z-index:50; background:var(--nav-bg); border-bottom:1px solid var(--hairline); backdrop-filter:blur(10px); box-shadow:0 1px 0 rgba(0,0,0,0.02), var(--shadow-sm);}
nav:not(.drawer-links) .wrap{display:flex; align-items:center; justify-content:space-between; height:70px; gap:20px;}
.logo-text{font-family:'Fraunces',serif; font-size:18px; color:var(--text); text-decoration:none; letter-spacing:-0.01em;}
.logo-text b{color:var(--accent); font-weight:600;}
.nav-links{display:flex; gap:24px; font-size:14px;}
.nav-links a{opacity:0.82; text-decoration:none; position:relative; padding:4px 0; transition:opacity .15s ease;}
.nav-links a:hover{opacity:1;}
.nav-links a::after{
  content:''; position:absolute; left:0; right:0; bottom:0; height:1.5px;
  background:var(--accent); transform:scaleX(0); transform-origin:left; transition:transform .2s ease;
}
.nav-links a:hover::after{transform:scaleX(1);}
.nav-controls{display:flex; align-items:center; gap:12px;}
.nav-divider{width:1px; height:22px; background:var(--hairline); flex-shrink:0;}
.icon-btn{
  width:34px; height:34px; border-radius:50%; border:none; background:transparent;
  color:var(--text-60); font-size:15px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  transition:color .15s ease, background .15s ease;
}
.icon-btn:hover{color:var(--accent); background:rgba(168,124,62,0.1);}
.cart-badge{
  position:absolute; top:-4px; right:-4px; background:var(--thread); color:#fff;
  font-size:10px; font-weight:700; min-width:16px; height:16px; border-radius:8px;
  display:flex; align-items:center; justify-content:center; padding:0 3px; font-family:'Work Sans',sans-serif;
}
.lang-select{border:1px solid var(--hairline); background:transparent; color:var(--text); border-radius:20px; padding:7px 10px; font-size:12.5px; cursor:pointer;}
.lang-select option{color:#000;}
.nav-cta{border:1px solid var(--accent); color:var(--accent); padding:8px 16px; border-radius:2px; font-size:13px; text-decoration:none; transition:background .15s ease, color .15s ease;}
.nav-cta:hover{background:var(--accent); color:var(--ink);}
[data-theme="light"] .nav-cta:hover{color:#fff;}

/* ---------- Hamburger + drawer ---------- */
.hamburger{display:none; flex-direction:column; justify-content:center; align-items:flex-end; gap:5px; width:34px; height:34px; background:none; border:none; cursor:pointer; padding:0; flex-shrink:0;}
.hamburger span{display:block; width:100%; height:2px; background:var(--text); border-radius:1px; transition:transform .25s ease, opacity .2s ease, width .2s ease;}
.hamburger span:nth-child(2){width:70%;}
.hamburger.active span{width:100%;}
.hamburger.active span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.hamburger.active span:nth-child(2){opacity:0;}
.hamburger.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
@media(max-width:880px){.hamburger{display:flex;}}

.site-drawer{
  position:fixed; top:0; right:0; height:100vh; width:290px; max-width:84vw; z-index:80;
  background:var(--bg-elevated); border-left:1px solid var(--hairline);
  transform:translateX(100%); transition:transform .28s ease; overflow-y:auto;
  box-shadow:var(--shadow-lg);
  display:flex; flex-direction:column;
}
.site-drawer.open{transform:translateX(0);}
.site-drawer-header{display:flex; align-items:center; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--hairline);}
.site-drawer-close{background:none; border:none; color:var(--text); font-size:22px; line-height:1; cursor:pointer; padding:4px 8px;}
.site-drawer-controls{display:flex; gap:10px; padding:16px 20px; border-bottom:1px solid var(--hairline);}
.site-drawer nav.drawer-links{display:flex; flex-direction:column; padding:8px 0;}
.site-drawer nav.drawer-links a{padding:14px 20px; font-size:15px; text-decoration:none; color:var(--text); opacity:0.85; border-bottom:1px solid var(--hairline);}
.site-drawer nav.drawer-links a:active, .site-drawer nav.drawer-links a:hover{opacity:1; background:rgba(168,124,62,0.1);}
.site-drawer .drawer-cta{margin:16px 20px; text-align:center;}
.site-overlay{display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:75;}
.site-overlay.open{display:block;}
@media(min-width:881px){.site-drawer, .site-overlay{display:none !important;}}

/* ---------- Buttons ---------- */
.btn{
  font-size:14px; padding:13px 24px; border-radius:2px; border:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; gap:8px; text-decoration:none;
  font-weight:500; transition:transform .12s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary{background:var(--brass-light); color:var(--ink); font-weight:600; box-shadow:var(--shadow-sm);}
.btn-primary:hover{background:var(--brass); color:var(--paper-2); box-shadow:var(--shadow-md); transform:translateY(-1px);}
.btn-ghost{border:1px solid var(--hairline); color:var(--text); background:transparent;}
.btn-ghost:hover{border-color:var(--accent); background:rgba(168,124,62,0.08);}
.btn-danger{background:var(--thread); color:#fff;}
.card .btn-ghost, .stat-card .btn-ghost{color:var(--ink); border-color:rgba(23,30,40,0.22);}
.card .btn-ghost:hover{border-color:var(--brass); background:rgba(168,124,62,0.1);}
.btn:disabled{opacity:0.5; cursor:not-allowed; transform:none;}

/* ---------- Cards & sections ---------- */
.card .error-msg{color:var(--thread);}
.card:not(.on-dark), .stat-card{
  --text:#171E28; --text-70:rgba(23,30,40,.82); --text-60:rgba(23,30,40,.74); --text-55:rgba(23,30,40,.7); --text-50:rgba(23,30,40,.66); --text-40:rgba(23,30,40,.6);
  --accent:var(--brass-deep); --hairline:rgba(23,30,40,0.14);
}
.card{background:var(--paper); color:var(--ink); border-radius:5px; padding:26px; box-shadow:var(--shadow-sm);}
.panel{background:var(--bg-elevated); color:var(--text); border:1px solid var(--hairline); border-radius:5px; padding:26px; box-shadow:var(--shadow-sm);}
.eyebrow{font-size:12px; letter-spacing:0.04em; color:var(--accent); font-weight:600; margin-bottom:6px; display:block;}
section{padding:64px 0;}
.section-intro{color:var(--text-60); max-width:56ch; margin:0 0 34px; font-size:15.5px;}
.grid-4{display:grid; grid-template-columns:repeat(4,1fr); gap:20px;}
.grid-3{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:20px;}
@media(max-width:900px){.grid-4{grid-template-columns:repeat(2,1fr);} .grid-3{grid-template-columns:1fr;} .grid-2{grid-template-columns:1fr;}}
@media(max-width:560px){.grid-4{grid-template-columns:1fr;}}

/* ---------- Hero ---------- */
.hero{padding:0 0 64px;}
.hero-grid{display:grid; grid-template-columns:1.05fr 0.95fr; gap:54px; align-items:center; padding-top:56px;}
@media(max-width:880px){.hero-grid{grid-template-columns:1fr; gap:34px; padding-top:34px;}}
.hero-copy p{color:var(--text-70); max-width:46ch; font-size:16px; margin-bottom:28px;}
.hero-actions{display:flex; gap:14px; flex-wrap:wrap;}
@media(max-width:480px){.hero-actions{flex-direction:column;} .hero-actions .btn{width:100%;}}

/* Hero carousel — the workshop's own work, rotating */
.carousel{position:relative; border-radius:6px; overflow:hidden; box-shadow:var(--shadow-lg); background:var(--bg-raised);}
.carousel-track{position:relative; aspect-ratio:4/5; width:100%;}
@media(max-width:880px){.carousel-track{aspect-ratio:16/11;}}
.carousel-slide{
  position:absolute; inset:0; opacity:0; transition:opacity .7s ease;
  background-size:cover; background-position:center;
}
.carousel-slide.active{opacity:1;}
.carousel-slide::after{
  content:''; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(23,30,40,0.82) 0%, rgba(23,30,40,0.18) 46%, rgba(23,30,40,0) 70%);
}
.carousel-caption{
  position:absolute; left:0; right:0; bottom:0; padding:26px 26px 22px; z-index:2; color:#F7F4EC;
}
.carousel-caption h3{font-size:21px; margin-bottom:4px; color:#F7F4EC;}
.carousel-caption p{font-size:13.5px; color:rgba(247,244,236,0.78); margin:0;}
.carousel-dots{position:absolute; top:18px; right:18px; z-index:3; display:flex; gap:7px;}
.carousel-dot{
  width:7px; height:7px; border-radius:50%; border:none; padding:0; cursor:pointer;
  background:rgba(247,244,236,0.42); transition:background .2s ease, width .2s ease;
}
.carousel-dot.active{background:var(--brass-light); width:20px; border-radius:4px;}

/* Track-order side card on hero */
.hero-track{background:var(--bg-elevated); border:1px solid var(--hairline); border-radius:5px; padding:24px; box-shadow:var(--shadow-sm);}

/* ---------- Garment & product cards with real imagery ---------- */
.tile{
  display:block; text-decoration:none; border-radius:5px; overflow:hidden;
  background:var(--bg-elevated); border:1px solid var(--hairline);
  box-shadow:var(--shadow-sm); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tile:hover{transform:translateY(-3px); box-shadow:var(--shadow-md); border-color:rgba(168,124,62,0.4);}
.tile-img{
  aspect-ratio:3/4; background-size:cover; background-position:center;
  background-color:var(--bg-raised); position:relative;
}
.tile-img::after{content:''; position:absolute; inset:0; background:linear-gradient(to top, rgba(23,30,40,0.55), rgba(23,30,40,0) 55%);}
.tile-img--wide{aspect-ratio:4/3;}
.tile-body{padding:16px 18px 18px;}
.tile-body h3, .tile-body h4{margin-bottom:4px;}
.tile-price{color:var(--accent); font-weight:600; font-size:15px;}
.tile-meta{font-size:12px; color:var(--text-50); margin-bottom:6px;}
.tile-badge{
  position:absolute; top:12px; left:12px; z-index:2;
  background:rgba(23,30,40,0.78); color:#F7F4EC; backdrop-filter:blur(4px);
  font-size:11px; padding:4px 10px; border-radius:20px;
}

/* ---------- Partner CTA band ---------- */
.partner-band{
  display:grid; grid-template-columns:1.4fr 1fr; gap:34px; align-items:center;
  background:linear-gradient(135deg, var(--ink-2), var(--ink-3));
  border:1px solid rgba(168,124,62,0.28); border-radius:6px; padding:38px;
  color:var(--paper-2); box-shadow:var(--shadow-md);
}
@media(max-width:800px){.partner-band{grid-template-columns:1fr; gap:22px; padding:28px;}}
.partner-band h2{color:var(--paper-2);}
.partner-band p{color:rgba(247,244,236,0.72); margin:10px 0 0; font-size:15px;}

/* ---------- Forms ---------- */
.field{margin-bottom:16px;}
.field label{display:block; font-size:13px; color:var(--text-60); margin-bottom:6px;}
.field input, .field select, .field textarea{
  width:100%; padding:12px 13px; border:1px solid var(--hairline); border-radius:3px;
  background:var(--bg-elevated); font-family:inherit; font-size:14px; color:var(--text);
  transition:border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus{border-color:var(--brass); outline:none;}
.card:not(.on-dark) .field label, .lib-dialog .field label{color:rgba(42,42,42,0.68);}
.card .field input, .card .field select, .card .field textarea, .lib-dialog .field input, .lib-dialog .field select, .lib-dialog .field textarea{background:#fff; color:var(--charcoal); border-color:var(--line);}
.panel .field label, .on-dark .field label{color:var(--text-60);}
.panel .field input, .panel .field select, .panel .field textarea, .on-dark .field input, .on-dark .field select, .on-dark .field textarea{background:var(--bg); color:var(--text); border-color:var(--hairline);}
.swatch{width:46px; height:46px; border-radius:3px; cursor:pointer; border:2px solid transparent; display:inline-block;}
.swatch.selected{border-color:var(--thread);}

table{width:100%; border-collapse:collapse; font-size:13.5px;}
table th, table td{padding:11px 12px; border-bottom:1px solid var(--line); text-align:left;}
.panel table th, .panel table td{border-bottom:1px solid var(--hairline);}
table.on-dark th, table.on-dark td{border-bottom:1px solid var(--line-light);}
.pill{font-weight:600; font-size:10.5px; text-transform:uppercase; padding:3px 9px; border-radius:20px; letter-spacing:0.04em; display:inline-block;}
.pill.pending{background:rgba(168,124,62,0.2); color:var(--brass-light);}
.pill.paid, .pill.confirmed, .pill.delivered{background:rgba(58,110,86,0.2); color:#5fa583;}
.pill.placed{background:var(--bg-raised); color:var(--text);}
.pill.cancelled, .pill.rejected{background:rgba(139,42,42,0.2); color:#c96b6b;}
.card .pill.pending, .stat-card .pill.pending{background:rgba(168,124,62,0.18); color:var(--brass-deep);}
.card .pill.paid, .card .pill.confirmed, .card .pill.delivered{background:rgba(58,110,86,0.16); color:#2c6a4c;}
.card .pill.placed, .card .pill.cutting, .card .pill.stitching, .card .pill.quality_check, .card .pill.ready{background:rgba(23,30,40,0.09); color:var(--ink);}
.card .pill.cancelled, .card .pill.rejected{background:rgba(139,42,42,0.12); color:var(--thread);}
.error-msg{color:#c96b6b; font-size:13.5px; margin-top:8px;}
.success-msg{color:#5fa583; font-size:13.5px; margin-top:8px;}

/* ---------- Footer ---------- */
footer{border-top:1px solid var(--hairline); padding:52px 0 28px; background:var(--bg-elevated);}
.footer-grid{display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr; gap:38px; margin-bottom:34px;}
@media(max-width:800px){.footer-grid{grid-template-columns:1fr 1fr; gap:28px;}}
@media(max-width:480px){.footer-grid{grid-template-columns:1fr;}}
.footer-grid h5{font-size:12.5px; letter-spacing:0.04em; color:var(--accent); margin:0 0 14px; font-weight:600;}
.footer-grid a, .footer-grid p{font-size:13.5px; color:var(--text-60); display:block; margin-bottom:9px; text-decoration:none;}
.footer-grid a:hover{color:var(--accent);}
.social-row{display:flex; gap:10px; margin-top:16px;}
.social-link{
  width:34px; height:34px; border-radius:50%; border:none; background:transparent;
  display:flex; align-items:center; justify-content:center; color:var(--text-50);
  transition:color .15s ease, background .15s ease;
}
.social-link:hover{color:var(--accent); background:rgba(168,124,62,0.1);}
.social-link svg{width:16px; height:16px; fill:currentColor;}
.footer-bottom{
  border-top:1px solid var(--hairline); padding-top:22px;
  display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap;
  font-size:12.5px; color:var(--text-40); margin:0;
}
.footer-bottom a{color:var(--text-55); text-decoration:none;}
.footer-bottom a:hover{color:var(--accent);}
.dev-credit{display:flex; align-items:center; gap:7px; flex-wrap:wrap;}

/* ---------- Interactive guided tour ---------- */
.tour-fab{
  position:fixed; right:20px; bottom:20px; z-index:70;
  background:var(--brass-light); color:var(--ink); border:none; cursor:pointer;
  border-radius:30px; padding:12px 18px; font-family:inherit; font-size:13.5px; font-weight:600;
  box-shadow:var(--shadow-md); display:flex; align-items:center; gap:8px;
}
.tour-fab:hover{background:var(--brass); color:var(--paper-2);}
@media(max-width:560px){.tour-fab{right:14px; bottom:14px; padding:11px 15px; font-size:13px;}}
.tour-backdrop{display:none; position:fixed; inset:0; background:rgba(0,0,0,0.62); z-index:90;}
.tour-backdrop.open{display:block;}
.tour-box{
  position:fixed; z-index:95; background:var(--bg-elevated); color:var(--text);
  border:1px solid var(--hairline); border-radius:6px; padding:24px; max-width:380px; width:calc(100vw - 40px);
  box-shadow:var(--shadow-lg); display:none;
  left:50%; top:50%; transform:translate(-50%,-50%);
}
.tour-box.open{display:block;}
.tour-step-count{font-size:12px; color:var(--accent); font-weight:600; margin-bottom:8px;}
.tour-box h3{margin-bottom:10px; font-size:20px;}
.tour-box p{color:var(--text-70); font-size:14.5px; margin-bottom:20px;}
.tour-actions{display:flex; gap:10px; justify-content:space-between; align-items:center;}
.tour-skip{background:none; border:none; color:var(--text-50); font-family:inherit; font-size:13px; cursor:pointer; text-decoration:underline; padding:0;}
.tour-next{background:var(--brass-light); color:var(--ink); border:none; border-radius:3px; padding:10px 20px; font-family:inherit; font-size:13.5px; font-weight:600; cursor:pointer;}
.tour-next:hover{background:var(--brass); color:var(--paper-2);}
.tour-highlight{position:relative; z-index:92; box-shadow:0 0 0 4px var(--brass-light), 0 0 0 100vmax rgba(0,0,0,0.62); border-radius:6px;}

/* ---------- Admin shell ---------- */
.admin-shell{display:grid; grid-template-columns:230px 1fr; min-height:100vh;}
.admin-sidebar{background:var(--bg-elevated); padding:24px 0; border-right:1px solid var(--hairline); color:var(--text); transition:background .2s ease;}
.admin-sidebar a{display:block; padding:11px 24px; font-size:14px; text-decoration:none; opacity:0.8; color:var(--text); border-left:2px solid transparent;}
.admin-sidebar a:hover, .admin-sidebar a.active{opacity:1; background:rgba(168,124,62,0.14); border-left-color:var(--accent);}
.admin-sidebar .admin-section-label{color:var(--text-50);}
.admin-main{padding:34px; overflow-x:auto;}
.stat-card{background:var(--paper); color:var(--ink); border-radius:5px; padding:20px; box-shadow:var(--shadow-sm);}
.stat-card h3{font-size:29px; color:var(--thread); margin-bottom:2px;}
.stat-card span{font-size:12.5px; color:rgba(42,42,42,0.7);}

.admin-topbar{display:none;}
@media(max-width:880px){
  .admin-shell{display:block;}
  .admin-topbar{
    display:flex; align-items:center; justify-content:space-between; padding:14px 20px;
    background:var(--nav-bg); border-bottom:1px solid var(--hairline); position:sticky; top:0; z-index:60;
  }
  .admin-sidebar{
    position:fixed; top:0; left:0; height:100vh; width:260px; z-index:70;
    transform:translateX(-100%); transition:transform .25s ease; overflow-y:auto;
    box-shadow:var(--shadow-lg);
  }
  .admin-sidebar.open{transform:translateX(0);}
  .admin-overlay{display:none; position:fixed; inset:0; background:rgba(0,0,0,0.5); z-index:65;}
  .admin-overlay.open{display:block;}
  .admin-main{padding:20px;}
}

/* ---------- Content pages ---------- */
.about-grid{display:grid; grid-template-columns:1fr 1fr; gap:50px; align-items:center;}
@media(max-width:880px){.about-grid{grid-template-columns:1fr; gap:30px;}}
.about-photo{height:380px; border-radius:6px; background-size:cover; background-position:center; box-shadow:var(--shadow-md);}
@media(max-width:880px){.about-photo{height:250px;}}
.about-copy p{color:var(--text-70); font-size:15.5px; margin-bottom:16px;}
.about-stats{display:flex; gap:34px; margin-top:24px; flex-wrap:wrap;}
.about-stats div h3{font-size:27px; color:var(--accent);}
.about-stats div span{font-size:12.5px; color:var(--text-55);}

.mv-grid{display:grid; grid-template-columns:1fr 1fr; gap:22px;}
@media(max-width:700px){.mv-grid{grid-template-columns:1fr;}}
.mv-card{border:1px solid var(--hairline); border-radius:5px; padding:30px; background:var(--bg-elevated); box-shadow:var(--shadow-sm);}
.mv-card .mono{font-size:12px; color:var(--accent); letter-spacing:0.04em; margin-bottom:10px; display:block; font-family:inherit; font-weight:600;}
.mv-card p{color:var(--text-70); font-size:14.5px; line-height:1.7; margin:0;}

.resource-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
@media(max-width:900px){.resource-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:520px){.resource-grid{grid-template-columns:1fr;}}
.resource-card{border:1px solid var(--hairline); border-radius:5px; padding:24px; background:var(--bg-elevated); box-shadow:var(--shadow-sm); transition:transform .18s ease, box-shadow .18s ease;}
.resource-card:hover{transform:translateY(-2px); box-shadow:var(--shadow-md);}
.resource-card .mono{font-size:12px; color:var(--accent); margin-bottom:12px; display:block; font-family:inherit; font-weight:600;}
.resource-card p{font-size:13.5px; color:var(--text-60); margin-bottom:14px;}
.resource-card a{font-size:13px; color:var(--accent); text-decoration:none; font-weight:500;}
.resource-card a:hover{text-decoration:underline;}

.faq-list{max-width:780px;}
.faq-item{border-bottom:1px solid var(--hairline);}
.faq-item summary{padding:19px 4px; cursor:pointer; font-size:15.5px; font-weight:500; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:16px;}
.faq-item summary::-webkit-details-marker{display:none;}
.faq-item summary::after{content:'+'; font-family:'Fraunces',serif; font-size:21px; color:var(--accent); flex-shrink:0; transition:transform .2s ease;}
.faq-item[open] summary::after{transform:rotate(45deg);}
.faq-item p{padding:0 4px 20px; color:var(--text-60); font-size:14.5px; max-width:68ch;}

.contact-grid{display:grid; grid-template-columns:0.85fr 1.15fr; gap:46px;}
@media(max-width:880px){.contact-grid{grid-template-columns:1fr; gap:30px;}}
.contact-info-row{display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--hairline); font-size:14px;}
.contact-info-row .mono{font-size:12.5px; color:var(--accent); min-width:92px; font-family:inherit; font-weight:600;}

.star-row{display:flex; gap:8px; margin:16px 0 20px;}
.star{font-size:29px; color:var(--hairline); cursor:pointer; user-select:none; transition:color .12s ease;}
.star.active{color:var(--accent);}

/* =====================================================================
   v2 additions — shared small components, attribute-library admin,
   visual configurator, PO sheet, payment step
   ===================================================================== */
.btn-sm{padding:8px 14px; font-size:13px;}
.muted{color:rgba(42,42,42,0.58); font-size:14px;}
.panel .muted{color:var(--text-60);}
.hint{font-size:12px; color:rgba(42,42,42,0.55); margin:6px 0 0;}
.note-ok{font-size:13px; color:#2c6a4c; margin:0 0 14px;}
.note-warn{background:rgba(168,124,62,0.14); border-left:3px solid var(--brass); padding:12px 14px; font-size:13.5px; border-radius:2px;}
.page-head{display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom:22px;}
.table-scroll{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.table-card{padding:0; overflow:hidden;}
.table-card table{min-width:560px;}
.row-off{opacity:.5;}
.row-actions{white-space:nowrap; text-align:right;}
.row-actions .btn + .btn{margin-left:6px;}
.swatch-dot{display:inline-block; width:12px; height:12px; border-radius:50%; vertical-align:-1px; border:1px solid rgba(0,0,0,.2);}
.thumb{display:inline-flex; width:46px; height:46px; border-radius:4px; object-fit:cover; background:var(--paper-2); border:1px solid var(--line); align-items:center; justify-content:center; vertical-align:middle;}
.thumb-empty{color:rgba(42,42,42,.35); font-size:20px; border-style:dashed;}
.coverage{margin-bottom:18px; padding:16px 20px;}
.meter{height:7px; background:var(--hairline); border-radius:4px; overflow:hidden;}
.meter span{display:block; height:100%; background:var(--brass-light); border-radius:4px;}

dialog.lib-dialog{border:0; padding:0; border-radius:8px; width:min(640px, calc(100vw - 24px)); max-height:calc(100vh - 24px); background:var(--paper); color:var(--ink); box-shadow:var(--shadow-lg);}
dialog.lib-dialog::backdrop{background:rgba(10,14,20,.66);}
.lib-dialog form{padding:22px 24px 20px; overflow-y:auto; max-height:calc(100vh - 24px);}
.dlg-head{display:flex; justify-content:space-between; align-items:center; margin-bottom:16px;}
.dlg-head .icon-btn{color:rgba(42,42,42,.7);}
.dlg-grid{display:grid; grid-template-columns:1fr 1fr; gap:0 16px;}
@media(max-width:560px){.dlg-grid{grid-template-columns:1fr;}}
.dlg-foot{display:flex; justify-content:flex-end; gap:10px; margin-top:8px;}
.dlg-foot .btn-ghost{color:var(--ink); border-color:var(--line);}
.img-drop{display:flex; gap:16px; align-items:center; padding:14px; margin-bottom:16px; border:1.5px dashed rgba(42,42,42,.28); border-radius:6px; background:rgba(255,255,255,.5);}
.img-drop .btn-ghost{color:var(--ink); border-color:var(--line);}
.img-preview{width:96px; height:96px; flex:none; border-radius:6px; overflow:hidden; background:var(--paper-2); display:flex; align-items:center; justify-content:center; color:rgba(42,42,42,.4); font-size:12px;}
.img-preview img{width:100%; height:100%; object-fit:cover;}

/* ---------- Configurator ---------- */
.cfg-section{padding:36px 0 96px;}
.cfg-head{display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px;}
.cfg-title{font-size:clamp(26px,3.4vw,38px); margin:8px 0 4px;}
.cfg-intro{color:var(--text-60); margin:0; font-size:14px;}
.cfg-stepper{list-style:none; margin:0 0 18px; padding:0 0 6px; display:flex; gap:6px; overflow-x:auto; scrollbar-width:thin; position:relative;}
.cfg-stepper li{flex:none;}
.cfg-stepper button{display:flex; align-items:center; gap:8px; padding:8px 14px 8px 8px; border-radius:30px; border:1px solid var(--hairline); background:transparent; color:var(--text-60); font:inherit; font-size:13px; cursor:pointer; white-space:nowrap;}
.cfg-stepper button:disabled{opacity:.45; cursor:not-allowed;}
.cfg-stepper b{width:24px; height:24px; border-radius:50%; background:var(--bg-raised); color:var(--text); display:inline-flex; align-items:center; justify-content:center; font-size:12px;}
.cfg-stepper .is-done button{color:var(--text);}
.cfg-stepper .is-done b{background:var(--success); color:#fff;}
.cfg-stepper .is-cur button{border-color:var(--accent); color:var(--text); background:rgba(168,124,62,.12);}
.cfg-stepper .is-cur b{background:var(--brass-light); color:var(--ink);}
@media(max-width:560px){.cfg-stepper button span{display:none;} .cfg-stepper .is-cur button span{display:inline;} .cfg-stepper button{padding:6px;}}
.cfg-draftnote{font-size:13px; color:var(--accent); margin:-6px 0 14px;}
.cfg-layout{display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:26px; align-items:start;}
.cfg-main{min-width:0;}
.cfg-card{min-height:340px;}
.cfg-actions{display:flex; justify-content:space-between; gap:12px; margin-top:16px;}
@media(max-width:560px){.cfg-actions .btn{flex:1;} .cfg-actions #btn-back{flex:0 0 auto;}}
.step-head{margin-bottom:18px;} .step-head h2{font-size:24px;} .step-head p{margin:6px 0 0; color:rgba(42,42,42,.7); font-size:14px;}
.grp{font-size:13px; letter-spacing:.04em; color:var(--thread); font-family:'Work Sans',sans-serif; font-weight:600; margin:22px 0 10px; text-transform:uppercase;}
.opt-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:12px;}
@media(max-width:420px){.opt-grid{grid-template-columns:1fr 1fr; gap:10px;}}
.opt{position:relative; display:flex; flex-direction:column; text-align:left; padding:0; font:inherit; color:var(--ink); background:#fff; border:1.5px solid var(--line); border-radius:6px; overflow:hidden; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .12s;}
.opt:hover:not(:disabled){border-color:var(--brass); box-shadow:var(--shadow-sm); transform:translateY(-1px);}
.opt.is-sel{border-color:var(--thread); box-shadow:0 0 0 2px rgba(139,42,42,.18);}
.opt:disabled{opacity:.5; cursor:not-allowed;}
.opt-body{display:flex; flex-direction:column; gap:3px; padding:10px 12px 12px;}
.opt-name{font-weight:600; font-size:14px; line-height:1.3;} .opt-name em{font-style:normal; font-weight:400; font-size:12px; color:rgba(42,42,42,.68);}
.opt-desc{font-size:12px; color:rgba(42,42,42,.7); line-height:1.4;}
.opt-note{font-size:11.5px; color:var(--thread);}
.opt-price{font-size:12px; color:rgba(42,42,42,.7);}
.opt-check{position:absolute; top:8px; right:8px; width:24px; height:24px; border-radius:50%; background:var(--thread); color:#fff; font-size:13px; display:none; align-items:center; justify-content:center; box-shadow:var(--shadow-sm);}
.opt.is-sel .opt-check{display:flex;}
.th{position:relative; display:block; overflow:hidden; background:var(--paper-2); color:rgba(42,42,42,.42);}
.th img{width:100%; height:100%; object-fit:cover; display:block;}
.th-card{width:100%; aspect-ratio:4/3;}
.th-sm{width:38px; height:38px; border-radius:4px; flex:none;}
.th-po{width:54px; height:54px; border-radius:4px; flex:none;}
.ph{display:flex; width:100%; height:100%; align-items:center; justify-content:center;}
.ph svg{width:44%; height:44%; max-width:48px; max-height:48px;}
.th-sm .ph svg, .th-po .ph svg{width:60%; height:60%;}
.th-weave{background-color:var(--tone,#B8894A); background-image:repeating-linear-gradient(45deg, rgba(255,255,255,.14) 0 2px, transparent 2px 5px), repeating-linear-gradient(-45deg, rgba(0,0,0,.12) 0 2px, transparent 2px 5px);}
.col-layout{display:grid; grid-template-columns:minmax(0,1fr) 220px; gap:18px; align-items:start;}
@media(max-width:700px){.col-layout{grid-template-columns:1fr;} .fab-prev{position:static; aspect-ratio:16/7;}}
.col-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:10px;}
.col{display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px 4px; font:inherit; background:#fff; border:1.5px solid var(--line); border-radius:6px; cursor:pointer; color:var(--ink);}
.col.is-sel{border-color:var(--thread); box-shadow:0 0 0 2px rgba(139,42,42,.18);}
.col-sw{width:48px; height:48px; border-radius:50%; overflow:hidden; border:1px solid rgba(0,0,0,.15); display:block;}
.col-sw img{width:100%; height:100%; object-fit:cover;}
.col-n{font-size:11.5px; text-align:center; line-height:1.25;}
.fab-prev{margin:0; position:sticky; top:96px; aspect-ratio:1; border-radius:8px; background-size:cover; background-position:center; border:1px solid var(--line); display:flex; align-items:flex-end; overflow:hidden; box-shadow:var(--shadow-sm);}
.fab-prev figcaption{width:100%; padding:20px 12px 10px; font-size:12.5px; color:#fff; background:linear-gradient(to top, rgba(0,0,0,.65), transparent);}
.check-row{display:flex; gap:12px; align-items:flex-start; margin-top:18px; padding:14px; border:1px solid var(--line); border-radius:6px; background:rgba(255,255,255,.55); cursor:pointer;}
.check-row input{margin-top:4px; width:18px; height:18px; flex:none;}
.check-row small{display:block; color:rgba(42,42,42,.7); font-size:12.5px;}
.meas-grid.is-off{opacity:.45;}
.saved-row{margin-bottom:14px; display:flex; gap:10px; align-items:center; font-size:12.5px;}
.saved-row .btn-ghost{color:var(--ink); border-color:var(--line);}

.cfg-aside{position:sticky; top:90px;}
.cfg-summary{padding:0; overflow:hidden;}
.cfg-preview{aspect-ratio:16/10; background-size:cover; background-position:center; position:relative; background-color:var(--bg-raised);}
.cfg-preview span{position:absolute; left:0; right:0; bottom:0; padding:22px 16px 10px; color:#fff; font-family:'Fraunces',serif; font-size:18px; background:linear-gradient(to top, rgba(10,14,20,.75), transparent);}
.cfg-picks{list-style:none; margin:0; padding:10px 14px; max-height:300px; overflow-y:auto;}
.cfg-picks li{display:flex; align-items:center; gap:10px; padding:7px 0; border-bottom:1px solid var(--hairline); font-size:13px;}
.cfg-picks .pk-t{flex:1; min-width:0; line-height:1.3;} .cfg-picks .pk-t small{display:block; color:var(--text-55); font-size:11px;}
.cfg-picks .pk-p{font-size:12px; color:var(--text-60);}
.cfg-picks .pk-empty{color:var(--text-55); border:0; font-size:13px;}
.cfg-picks .th:not(.th-weave){background:var(--bg-raised); color:var(--text-50);}
.cfg-total{padding:12px 16px 16px; background:var(--bg-raised);}
.tot-row{display:flex; justify-content:space-between; font-size:13px; color:var(--text-60); padding:2px 0;}
.tot-main{font-size:15px; color:var(--text); margin-top:6px; padding-top:8px; border-top:1px solid var(--hairline);} .tot-main strong{font-size:20px; color:var(--accent);}

.cfg-bar{display:none;}
@media(max-width:960px){
  .cfg-layout{grid-template-columns:1fr;}
  .cfg-aside{position:fixed; left:0; right:0; bottom:58px; top:auto; z-index:58; transform:translateY(110%); visibility:hidden; transition:transform .25s ease, visibility .25s; padding:0 10px; max-height:70vh; overflow-y:auto;}
  .cfg-aside.is-open{transform:none; visibility:visible;}
  .cfg-bar{display:flex; position:fixed; left:0; right:0; bottom:0; z-index:59; justify-content:space-between; align-items:center; padding:10px 16px; background:var(--nav-bg); border-top:1px solid var(--hairline); backdrop-filter:blur(10px); height:58px;}
  .cfg-bar-label{font-size:12px; color:var(--text-60); margin-right:6px;}
  .cfg-bar strong{color:var(--accent); font-size:17px;}
  body:has(.cfg-bar) .tour-fab{bottom:74px;}
  footer{padding-bottom:70px;}
}

/* PO sheet */
.po-sheet{background:#fff; border:1px solid var(--line); border-radius:4px; padding:24px; box-shadow:var(--shadow-sm); color:var(--ink);}
.po-head{display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap; border-bottom:2px solid var(--ink); padding-bottom:12px;}
.po-brand{font-family:'Fraunces',serif; font-size:22px; font-weight:600;} .po-sub{font-size:13px; color:rgba(42,42,42,.65);}
.po-stamp{text-align:right; font-size:12px;} .po-stamp b{display:block; color:var(--thread); letter-spacing:.04em;} .po-stamp small{color:rgba(42,42,42,.7);}
.po-refnote{font-size:12px; color:rgba(42,42,42,.7); margin:10px 0 14px;}
.po-cols{display:grid; grid-template-columns:1.2fr 1.4fr .6fr; gap:14px; font-size:13.5px;}
@media(max-width:600px){.po-cols{grid-template-columns:1fr 1fr;}}
.po-cols small, .po-notes small{display:block; font-size:11px; color:rgba(42,42,42,.68); text-transform:uppercase; letter-spacing:.05em;}
.po-cols b{display:block;} .po-cols span{display:block; color:rgba(42,42,42,.75);}
.po-h{font-family:'Work Sans',sans-serif; font-size:12px; text-transform:uppercase; letter-spacing:.06em; color:var(--thread); margin:20px 0 8px; font-weight:600; display:flex; gap:10px; align-items:center;}
.po-spec{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:1fr 1fr; gap:8px 18px;}
@media(max-width:600px){.po-spec{grid-template-columns:1fr;}}
.po-spec li{display:flex; gap:10px; align-items:center; padding:6px 0; border-bottom:1px solid var(--line); font-size:13.5px;}
.po-spec li > span{flex:1; min-width:0;} .po-spec small{display:block; font-size:11px; color:rgba(42,42,42,.68);} .po-spec b{font-weight:600;}
.po-edit{background:none; border:none; color:var(--thread); font:inherit; font-size:12px; text-decoration:underline; cursor:pointer; padding:2px 4px; text-transform:none; letter-spacing:0;}
.po-meas{display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:8px;}
.po-meas div{border:1px solid var(--line); border-radius:4px; padding:6px 10px; font-size:13px;} .po-meas small{display:block; font-size:11px; color:rgba(42,42,42,.68);}
.po-price td{padding:7px 4px; font-size:13.5px;} .po-price td:last-child{text-align:right;}
.po-total td{border-top:2px solid var(--ink); font-weight:700; font-size:16px;} .po-total td:last-child{color:var(--thread);}
.po-notes{font-size:13.5px; margin-top:14px;}
.po-note{font-size:12px; color:rgba(42,42,42,.7); margin:14px 0 0;}
.po-actions{margin-top:12px; display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap;} .po-capture .po-edit{display:none !important;} .po-actions .btn-ghost{color:var(--ink); border-color:var(--line);}

/* Payment */
.pay-total{display:flex; justify-content:space-between; align-items:baseline; padding:14px 16px; background:var(--ink); color:var(--paper-2); border-radius:6px; margin-bottom:16px;}
.pay-total strong{font-size:26px; color:var(--brass-light);}
.pay-opts{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:18px;}
@media(max-width:560px){.pay-opts{grid-template-columns:1fr;}}
.pay-opt{display:flex; gap:12px; padding:14px; border:1.5px solid var(--line); border-radius:6px; cursor:pointer; background:#fff; align-items:flex-start;}
.pay-opt.is-sel{border-color:var(--thread); box-shadow:0 0 0 2px rgba(139,42,42,.15);}
.pay-opt input{margin-top:4px;} .pay-opt small{display:block; color:rgba(42,42,42,.7); font-size:12.5px;}
.pay-upi{display:grid; grid-template-columns:200px 1fr; gap:22px; align-items:start;}
@media(max-width:600px){.pay-upi{grid-template-columns:1fr; justify-items:center;} .pay-upi-side{width:100%;}}
.pay-qr{border:1px solid var(--line); border-radius:8px; background:#fff;}
.pay-id{font-size:16px; margin-bottom:10px; word-break:break-all;}
.pay-btns{display:flex; gap:8px; flex-wrap:wrap; margin-bottom:16px;} .pay-btns .btn-ghost{color:var(--ink); border-color:var(--line);}
.pay-cod{padding:14px; background:rgba(255,255,255,.6); border-radius:6px; border:1px solid var(--line);}

/* print: only the PO sheet */
@media print{
  body.printing-po nav, body.printing-po footer, body.printing-po .cfg-head, body.printing-po .cfg-stepper, body.printing-po .cfg-aside,
  body.printing-po .cfg-actions, body.printing-po .cfg-bar, body.printing-po .po-actions, body.printing-po .tour-fab, body.printing-po .po-edit, body.printing-po .site-drawer{display:none !important;}
  body.printing-po{background:#fff; color:#000;} body.printing-po .card{box-shadow:none; padding:0;} body.printing-po .po-sheet{border:0; box-shadow:none;}
  body.printing-po .step-head{display:none;} body.printing-po .cfg-layout{display:block;}
}

.bulk-table{width:100%; font-size:13px;} .bulk-table td{padding:6px 8px;} .bulk-table select{max-width:220px; width:100%; padding:6px; border:1px solid var(--line); border-radius:3px; background:#fff;}
.bulk-ok{color:#2c6a4c;} .bulk-miss{color:var(--thread);}

/* admin: wide tables scroll inside their card instead of being clipped on phones */
.admin-main .card{overflow-x:auto; -webkit-overflow-scrolling:touch;}
.admin-main .card table:has(th:nth-child(5)){min-width:680px;}
.admin-main .card table td .btn{white-space:nowrap;}

/* =====================================================================
   Help module (in-app user manual)
   ===================================================================== */
.help-hero{padding:48px 0 18px;}
.help-search input{width:100%; max-width:620px; padding:14px 16px 14px 44px; border-radius:30px; border:1px solid var(--hairline); background:var(--bg-elevated) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M21 21l-4.3-4.3'/%3E%3C/svg%3E") no-repeat 16px center; color:var(--text); font:inherit; font-size:15px;}
.help-search input:focus{outline:none; border-color:var(--accent);}
.help-chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:16px;}
.chip{border:1px solid var(--hairline); background:transparent; color:var(--text-70); border-radius:20px; padding:7px 14px; font:inherit; font-size:13px; cursor:pointer;}
.chip.is-on{background:var(--brass-light); color:var(--ink); border-color:var(--brass-light); font-weight:600;}
.help-list{padding:20px 0 70px;}
.help-group{margin-bottom:34px;} .help-group[hidden], .help-card[hidden]{display:none;}
.help-group-title{font-size:15px; font-family:'Work Sans',sans-serif; text-transform:uppercase; letter-spacing:.06em; color:var(--accent); margin-bottom:14px;}
.help-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:14px;}
.help-card{display:flex; gap:14px; padding:18px; border:1px solid var(--hairline); border-radius:6px; background:var(--bg-elevated); text-decoration:none; color:var(--text); box-shadow:var(--shadow-sm); transition:transform .15s, border-color .15s, box-shadow .15s;}
.help-card:hover{transform:translateY(-2px); border-color:var(--accent); box-shadow:var(--shadow-md);}
.help-ico{flex:none; width:44px; height:44px; border-radius:10px; background:rgba(168,124,62,.16); display:flex; align-items:center; justify-content:center; font-size:22px;}
.help-ico-lg{width:60px; height:60px; font-size:30px; border-radius:14px;}
.help-card-body{display:flex; flex-direction:column; gap:4px; min-width:0;} .help-card-body span{font-size:13.5px; color:var(--text-60);} .help-card-body small{font-size:12px; color:var(--text-50);}
.help-none{color:var(--text-60); padding:30px 0;}
.help-guide{padding:34px 0 80px;}
.help-back{font-size:13.5px; color:var(--accent); text-decoration:none;}
.help-head{display:flex; gap:18px; align-items:flex-start; margin:14px 0 28px;} .help-head h1{font-size:clamp(26px,3.4vw,38px);} .help-head p{color:var(--text-60); margin:8px 0 14px; max-width:60ch;}
.help-actions{display:flex; gap:10px; flex-wrap:wrap;}
.help-layout{display:grid; grid-template-columns:260px minmax(0,1fr); gap:34px; align-items:start;}
@media(max-width:860px){.help-layout{grid-template-columns:1fr;} .help-toc{position:static !important;}}
.help-toc{position:sticky; top:90px; padding:16px; border:1px solid var(--hairline); border-radius:6px; background:var(--bg-elevated);}
.help-prog{display:flex; justify-content:space-between; font-size:12.5px; color:var(--text-60); margin-bottom:8px;}
.help-toc ol{list-style:none; margin:14px 0 0; padding:0;} .help-toc li a{display:flex; gap:10px; align-items:flex-start; padding:7px 4px; font-size:13.5px; text-decoration:none; color:var(--text-70); border-radius:4px;}
.help-toc li a.is-cur{color:var(--text); background:rgba(168,124,62,.14);} .help-toc li a.is-done{color:var(--text-50);}
.tick{flex:none; width:16px; height:16px; margin-top:2px; border-radius:50%; border:1.5px solid var(--text-50);} .is-done .tick{background:var(--success); border-color:var(--success); box-shadow:inset 0 0 0 3px var(--bg-elevated);}
.hstep{padding:22px; border:1px solid var(--hairline); border-radius:8px; background:var(--bg-elevated); margin-bottom:18px; scroll-margin-top:90px;}
.hstep.is-done{opacity:.72;}
.hstep-head{display:flex; align-items:center; gap:12px; margin-bottom:10px;} .hstep-head h2{font-size:20px; flex:1;}
.hnum{flex:none; width:32px; height:32px; border-radius:50%; background:var(--brass-light); color:var(--ink); font-weight:700; display:flex; align-items:center; justify-content:center;}
.hdone{font-size:12.5px; color:var(--text-60); display:flex; gap:6px; align-items:center; cursor:pointer;}
.hstep-text{color:var(--text-70); font-size:15px; line-height:1.7; max-width:68ch;}
.hwarn{margin:12px 0; padding:11px 14px; border-left:3px solid var(--thread); background:rgba(139,42,42,.12); font-size:13.5px; border-radius:2px; color:var(--text);}
.hshot{margin:16px 0 0;} .hshot img{display:block; width:100%; height:auto; border-radius:6px; border:1px solid var(--hairline); cursor:zoom-in; background:var(--bg-raised);}
.hshot figcaption{margin-top:10px;} .hlegend{list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:6px 18px; font-size:13px; color:var(--text-70);}
.hlegend b{display:inline-flex; width:20px; height:20px; border-radius:50%; background:#d6336c; color:#fff; font-size:11.5px; align-items:center; justify-content:center; margin-right:4px;}
.hnote{display:block; font-size:12px; color:var(--text-50); margin-top:6px;}
.help-pn{display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:26px;} .help-pn a{display:block; padding:14px 16px; border:1px solid var(--hairline); border-radius:6px; text-decoration:none; color:var(--text); background:var(--bg-elevated);} .help-pn small{display:block; color:var(--accent); font-size:12px; margin-bottom:2px;}
.help-lightbox{position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.86); display:flex; align-items:center; justify-content:center; padding:20px; cursor:zoom-out;} .help-lightbox[hidden]{display:none;} .help-lightbox img{max-width:100%; max-height:100%; border-radius:6px;} .help-lightbox button{position:absolute; top:14px; right:18px; background:none; border:0; color:#fff; font-size:26px; cursor:pointer;}
.help-link-btn{width:34px; height:34px; border-radius:50%; text-decoration:none; font-weight:700; font-size:14px; border:1.5px solid var(--text-50) !important; color:var(--text-60);}
@media print{
  nav, footer, .tour-fab, .help-toc, .help-actions, .help-pn, .hdone, .help-back, .site-drawer, .admin-sidebar, .admin-topbar{display:none !important;}
  body{background:#fff; color:#000;} .hstep{border:1px solid #bbb; box-shadow:none; break-inside:avoid; background:#fff; opacity:1;} .hstep-text, .help-head p{color:#222;} .admin-shell{display:block;}
}

/* ===== v3: storefront product page, catalog tiles, admin product photos ===== */
.chip-row{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:30px;}
@media(max-width:640px){.chip-row{flex-wrap:nowrap; overflow-x:auto; margin-inline:-16px; padding:0 16px 6px; scrollbar-width:none;} .chip-row::-webkit-scrollbar{display:none;} .chip-row .btn{white-space:nowrap; flex:0 0 auto;}}
.tile-img--tall{aspect-ratio:3/4;}
.tile-badge.is-out{background:rgba(150,60,60,0.9);}
.tile-foot{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:4px;}
.tile-dots{display:flex; align-items:center; gap:4px;}
.tile-dots i{width:14px; height:14px; border-radius:50%; border:1px solid rgba(128,128,128,.55); display:inline-block;}
.tile-dots em{font-style:normal; font-size:11px; color:var(--text-60);}

.crumbs{font-size:12.5px; color:var(--text-60); margin-bottom:22px; display:flex; gap:8px; flex-wrap:wrap;}
.crumbs a{color:var(--text-60);} .crumbs a:hover{color:var(--accent);}
.pd-grid{display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,1fr); gap:48px; align-items:start;}
@media(max-width:900px){.pd-grid{grid-template-columns:1fr; gap:26px;}}
.pd-gallery{position:sticky; top:84px;}
@media(max-width:900px){.pd-gallery{position:static;}}
.pd-stage{position:relative; aspect-ratio:3/4; border-radius:10px; overflow:hidden; background:var(--bg-raised); box-shadow:var(--shadow-md);}
.pd-stage img{width:100%; height:100%; object-fit:cover; display:block;}
.pd-nav{position:absolute; top:50%; transform:translateY(-50%); width:38px; height:38px; border-radius:50%; border:0; background:rgba(23,30,40,.62); color:#fff; font-size:22px; line-height:1; cursor:pointer;}
.pd-nav[hidden]{display:none;} .pd-prev{left:10px;} .pd-next{right:10px;}
.pd-zoom{position:absolute; right:10px; top:10px; width:36px; height:36px; border-radius:50%; border:0; background:rgba(23,30,40,.62); color:#fff; font-size:17px; cursor:pointer;}
.pd-count{position:absolute; left:10px; bottom:10px; background:rgba(23,30,40,.7); color:#fff; font-size:11.5px; padding:3px 9px; border-radius:20px;} .pd-count:empty{display:none;}
.pd-thumbs{display:flex; gap:8px; margin-top:12px; overflow-x:auto; padding-bottom:4px;}
.pd-thumbs button{flex:0 0 64px; height:80px; padding:0; border:2px solid transparent; border-radius:6px; overflow:hidden; background:var(--bg-raised); cursor:pointer; opacity:.75;}
.pd-thumbs button.on{border-color:var(--accent); opacity:1;}
.pd-thumbs img{width:100%; height:100%; object-fit:cover; display:block;}
.pd-info h1{margin:10px 0 8px; font-size:clamp(26px,4vw,38px);}
.pd-rating{display:inline-block; color:var(--accent); margin-bottom:8px; font-size:14px;} .pd-rating span{color:var(--text-60); font-size:12.5px; margin-left:6px;}
.pd-price{font-size:26px; color:var(--accent); margin:6px 0 12px;}
.pd-lead{color:var(--text-70, var(--text-60)); font-size:14.5px; margin-bottom:18px;}
.pd-opt{margin:18px 0;}
.pd-opt-h{font-size:13px; color:var(--text-60); margin-bottom:9px; display:flex; gap:6px; align-items:baseline; flex-wrap:wrap;}
.pd-opt-h b{color:var(--text); font-weight:600;}
.pd-sizeguide{margin-left:auto; font-size:12px; color:var(--accent); text-decoration:underline;}
.pd-swatches,.pd-sizes{display:flex; gap:10px; flex-wrap:wrap;}
.sw{display:flex; flex-direction:column; align-items:center; gap:5px; background:none; border:0; padding:3px; cursor:pointer; color:var(--text-60); font-size:11px; max-width:70px;}
.sw i{width:38px; height:38px; border-radius:50%; border:2px solid var(--hairline); box-shadow:0 0 0 2px transparent; transition:box-shadow .15s, border-color .15s; display:block;}
.sw.on i{border-color:var(--bg); box-shadow:0 0 0 2px var(--accent);}
.sw.on{color:var(--text);} .sw.dim{opacity:.45;}
.sz{min-width:48px; padding:10px 14px; border:1px solid var(--hairline); border-radius:6px; background:var(--bg-elevated); color:var(--text); font:inherit; font-size:14px; cursor:pointer;}
.sz:hover{border-color:var(--accent);} .sz.on{background:var(--accent); border-color:var(--accent); color:#fff;}
.sz.out{opacity:.45; text-decoration:line-through; cursor:not-allowed;}
.pd-stock{font-size:13px; margin:4px 0 16px;} .pd-stock.ok{color:var(--ok-text, #5fa583);} .pd-stock.warn{color:var(--accent);} .pd-stock.bad{color:#c96b6b;}
.pd-buy{display:flex; gap:12px; flex-wrap:wrap; align-items:stretch;}
.pd-qty{display:flex; border:1px solid var(--hairline); border-radius:6px; overflow:hidden; background:var(--bg-elevated);}
.pd-qty button{width:40px; border:0; background:none; color:var(--text); font-size:18px; cursor:pointer;}
.pd-qty input{width:48px; text-align:center; border:0; background:none; color:var(--text); font:inherit; -moz-appearance:textfield;}
.pd-qty input::-webkit-outer-spin-button,.pd-qty input::-webkit-inner-spin-button{-webkit-appearance:none;}
.pd-add{flex:1 1 160px; justify-content:center;} .pd-add:disabled{opacity:.5; cursor:not-allowed;}
@media(max-width:560px){.pd-buy .btn-ghost{flex:1 1 100%; justify-content:center;}}
.pd-msg{margin-top:10px; font-size:13.5px; min-height:1em;} .pd-msg.ok{color:var(--ok-text, #5fa583);} .pd-msg.bad{color:#c96b6b;}
.pd-acc{margin-top:26px; border-top:1px solid var(--hairline);}
.pd-acc details{border-bottom:1px solid var(--hairline);}
.pd-acc summary{cursor:pointer; padding:15px 2px; font-weight:600; font-size:14.5px; list-style:none; display:flex; justify-content:space-between;}
.pd-acc summary::-webkit-details-marker{display:none;} .pd-acc summary::after{content:'+'; color:var(--accent); font-size:18px;} .pd-acc details[open] summary::after{content:'−';}
.rich{padding:0 2px 16px; font-size:14.5px; color:var(--text-70, var(--text-60));} .rich p{margin:0 0 10px;} .rich ul{margin:0 0 10px; padding-left:20px;} .rich li{margin-bottom:4px;}
.pd-lightbox{position:fixed; inset:0; z-index:9999; background:rgba(8,10,14,.92); display:flex; align-items:center; justify-content:center; padding:20px;}
.pd-lightbox[hidden]{display:none;} .pd-lightbox img{max-width:100%; max-height:100%; object-fit:contain; border-radius:6px;}
.pd-lightbox button{position:absolute; top:16px; right:16px; width:42px; height:42px; border-radius:50%; border:0; background:rgba(255,255,255,.16); color:#fff; font-size:18px; cursor:pointer;}

/* admin product form: photo manager + variant helpers */
.ph-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:10px; margin:10px 0;}
.ph-item{position:relative; aspect-ratio:3/4; border-radius:6px; overflow:hidden; border:2px solid var(--hairline); background:var(--bg-raised);}
.ph-item.cover{border-color:var(--accent);}
.ph-item img{width:100%; height:100%; object-fit:cover; display:block;}
.ph-item .ph-tag{position:absolute; left:4px; top:4px; background:var(--accent); color:#fff; font-size:10px; padding:2px 6px; border-radius:10px;}
.ph-item .ph-bar{position:absolute; left:0; right:0; bottom:0; display:flex; background:rgba(23,30,40,.82);}
.ph-item .ph-bar button{flex:1; border:0; background:none; color:#fff; font-size:11px; padding:6px 2px; cursor:pointer;}
.ph-add{aspect-ratio:3/4; border:2px dashed var(--hairline); border-radius:6px; display:flex; align-items:center; justify-content:center; text-align:center; font-size:12px; color:var(--text-60); cursor:pointer; background:none;}
.ph-add:hover{border-color:var(--accent); color:var(--accent);}
.ph-item .ph-new{position:absolute; right:4px; top:4px; background:#3f7d5f; color:#fff; font-size:10px; padding:2px 6px; border-radius:10px;}
.var-chips{display:flex; gap:6px; flex-wrap:wrap; margin-top:6px;} .var-chips a{font-size:12px; padding:3px 9px; border:1px solid var(--hairline); border-radius:20px;}
.pf-grid{align-items:start;} .pf-side{position:sticky; top:84px;} @media(max-width:900px){.pf-side{position:static;}}
.card .lbl{display:block; font-size:13px; color:var(--text-60); margin-bottom:6px;}
.hint{display:block; font-size:12px; color:var(--text-60); margin-top:6px;}
.notice-line{background:var(--bg-raised); border-left:3px solid var(--accent); padding:10px 14px; border-radius:4px; font-size:13px; margin-bottom:18px;}
.dot{display:inline-block; width:11px; height:11px; border-radius:50%; border:1px solid rgba(128,128,128,.6); margin:0 5px 0 2px; vertical-align:-1px;}
@media(max-width:560px){
  .shop-grid{grid-template-columns:repeat(2,1fr); gap:12px;}
  .shop-grid .tile-body{padding:10px 11px 12px;} .shop-grid .tile-body h4{font-size:14px !important; line-height:1.25;}
  .shop-grid .tile-meta{font-size:11px;} .shop-grid .tile-badge{font-size:10px; padding:3px 8px; top:8px; left:8px;}
  .shop-grid .tile-dots i{width:11px; height:11px;} .shop-grid .tile-price{font-size:14px;}
}
.admin-sidebar a.icon-btn{padding:0 !important; width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border-radius:50%; margin:0; border:0;}
input[type=color]{height:42px; cursor:pointer; border-radius:6px; background:var(--bg-elevated, #fff);}
