/* Hybrid Artisan Quotes — shared design system for storefront + admin */

:root{
  --ink:#111113; --ink-soft:#54575d; --muted:#7a7d83;
  --paper:#f5f4f1; --surface:#ffffff; --surface-2:#eeece7; --border:#e2dfd8;
  --accent:#ee9d17; --accent-hover:#d98a0a; --accent-ink:#4a2f04; --accent-soft:#fbe6bd;
  --steel-1:#eef0f2; --steel-2:#c7cbd1; --steel-3:#8b8f97;
  --status-new:#2f5fc4; --status-new-soft:#e3ecfc;
  --status-quoted:#a86c07; --status-quoted-soft:#fae9c8;
  --status-closed:#1f7a50; --status-closed-soft:#dff2e9;
  --danger:#c0392b; --danger-soft:#fbe3e0;
  --shadow-s:0 1px 2px rgba(17,17,19,.05), 0 3px 10px -4px rgba(17,17,19,.15);
  --shadow-l:0 2px 4px rgba(17,17,19,.06), 0 20px 44px -18px rgba(17,17,19,.32);
  --r-s:8px; --r-m:14px; --r-l:22px;
  --font-display:'Oswald',"Arial Narrow",sans-serif;
  --font-body:'Inter',system-ui,sans-serif;
  --font-mono:'JetBrains Mono',ui-monospace,Menlo,monospace;
}
@media (prefers-color-scheme: dark){
  :root{
    --ink:#f1f0ee; --ink-soft:#c6c4c0; --muted:#94918c;
    --paper:#131315; --surface:#1b1c1f; --surface-2:#202226; --border:#333338;
    --accent:#f2a71b; --accent-hover:#ffb840; --accent-ink:#2c1c02; --accent-soft:#3c2c0b;
    --steel-1:#232427; --steel-2:#3a3c41; --steel-3:#8b8f97;
    --status-new:#7ea3ec; --status-new-soft:#1c2a48;
    --status-quoted:#e3b565; --status-quoted-soft:#3a2c0e;
    --status-closed:#7bd0a7; --status-closed-soft:#12301f;
    --danger:#e8776a; --danger-soft:#3a1815;
    --shadow-s:0 1px 2px rgba(0,0,0,.3), 0 3px 10px -4px rgba(0,0,0,.5);
    --shadow-l:0 2px 4px rgba(0,0,0,.4), 0 20px 44px -18px rgba(0,0,0,.7);
  }
}

*{box-sizing:border-box;}
html{color-scheme:light dark;}
body{background:var(--paper); color:var(--ink); font-family:var(--font-body); line-height:1.5; margin:0;}
h1,h2,h3,h4{font-family:var(--font-display); font-weight:600; text-transform:uppercase; letter-spacing:.01em; margin:0;}
p{margin:0;}
a{color:inherit;}
button{font-family:inherit;}
img{max-width:100%; display:block;}
.mono{font-family:var(--font-mono); font-variant-numeric:tabular-nums;}
.muted{color:var(--muted);}
.wrap{max-width:1180px; margin-inline:auto; padding-inline:20px;}
.visually-hidden{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
:focus-visible{outline:2px solid var(--accent); outline-offset:2px; border-radius:4px;}

/* ---------- Header ---------- */
.site-header{position:sticky; top:0; z-index:40; background:var(--surface); border-bottom:1px solid var(--border);}
.header-inner{display:flex; align-items:center; justify-content:space-between; gap:12px; padding-block:10px;}
.brand{display:flex; align-items:center; gap:10px; min-width:0; flex:1 1 auto; overflow:hidden; text-decoration:none; color:inherit;}
.brand-logo-wrap{background:#ffffff; border-radius:7px; padding:4px 6px; display:flex; align-items:center; flex-shrink:0; box-shadow:var(--shadow-s);}
.brand-logo{height:26px; width:auto; display:block; flex-shrink:0;}
.brand-text{display:flex; flex-direction:column; line-height:1.15; min-width:0; overflow:hidden;}
.brand-name{font-family:var(--font-display); font-weight:700; font-size:15px; letter-spacing:.04em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.brand-tag{font-size:10.5px; color:var(--muted); letter-spacing:.05em; text-transform:uppercase; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.main-nav{display:flex; gap:4px; background:var(--surface-2); padding:4px; border-radius:999px; flex-shrink:0;}
.nav-tab{border:none; background:transparent; padding:8px 16px; border-radius:999px; font-size:13px; font-weight:600; color:var(--ink-soft); cursor:pointer; white-space:nowrap; text-decoration:none; display:inline-block;}
.nav-tab[aria-current="page"]{background:var(--ink); color:var(--paper);}
.nav-tab .short{display:none;}

/* ---------- Buttons ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; border-radius:999px; padding:11px 22px; font-size:13.5px; font-weight:600; letter-spacing:.01em; border:1px solid transparent; cursor:pointer; text-decoration:none; transition:transform .08s ease, background .15s ease;}
.btn:active{transform:scale(.98);}
.btn-primary{background:var(--accent); color:var(--accent-ink);}
.btn-primary:hover{background:var(--accent-hover);}
.btn-dark{background:var(--ink); color:var(--paper);}
.btn-dark:hover{opacity:.88;}
.btn-ghost{background:transparent; border-color:var(--border); color:var(--ink);}
.btn-ghost:hover{background:var(--surface-2);}
.btn-sm{padding:8px 14px; font-size:12.5px;}
.btn-block{width:100%;}

/* ---------- Hero ---------- */
.hero{padding-block:56px 44px; border-bottom:1px solid var(--border); overflow:hidden;}
.hero-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:40px; align-items:center;}
.eyebrow{font-family:var(--font-mono); font-size:11.5px; letter-spacing:.09em; text-transform:uppercase; color:var(--accent-hover); background:var(--accent-soft); display:inline-block; padding:5px 10px; border-radius:6px; margin-bottom:16px;}
.hero-copy h1{font-size:clamp(28px,4.2vw,46px); line-height:1.05; margin-bottom:16px;}
.lede{font-size:16px; color:var(--ink-soft); max-width:46ch; margin-bottom:26px;}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap;}
.hero-plate{aspect-ratio:4/3; border-radius:var(--r-l); overflow:hidden; box-shadow:var(--shadow-l); border:1px solid var(--border);}
.hero-plate svg{display:block; width:100%; height:100%;}

/* ---------- Catalog ---------- */
.catalog{padding-block:48px;}
.catalog-head{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; flex-wrap:wrap; margin-bottom:22px;}
.catalog-head h2{font-size:24px;}
.filter-row{display:flex; gap:8px; flex-wrap:wrap;}
.chip{border:1px solid var(--border); background:var(--surface); padding:8px 14px; border-radius:999px; font-size:12.5px; font-weight:600; cursor:pointer; color:var(--ink-soft); text-decoration:none;}
.chip[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:var(--paper);}
.product-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
.product-card{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-m); overflow:hidden; display:flex; flex-direction:column; box-shadow:var(--shadow-s); cursor:pointer; text-align:left; text-decoration:none; color:inherit;}
.product-card:hover{border-color:var(--steel-3);}
.product-thumb{aspect-ratio:16/10; background:var(--steel-1); position:relative; overflow:hidden;}
.product-thumb img{width:100%; height:100%; object-fit:cover;}
.product-body{padding:16px 18px 18px; display:flex; flex-direction:column; gap:10px; flex:1;}
.product-sku{font-family:var(--font-mono); font-size:11px; color:var(--muted); letter-spacing:.03em;}
.product-name{font-family:var(--font-display); font-size:17px; font-weight:600; text-transform:none; letter-spacing:0;}
.product-short{font-size:13.5px; color:var(--ink-soft); flex:1;}
.product-foot{display:flex; align-items:center; justify-content:space-between; margin-top:4px;}
.price-tag{font-family:var(--font-mono); font-size:12px; color:var(--muted); text-transform:uppercase; letter-spacing:.04em;}
.cat-badge{display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:600; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-soft);}
.spec-list{margin:0 0 22px; padding-left:18px; font-size:13.5px; color:var(--ink-soft); display:flex; flex-direction:column; gap:6px;}
.product-detail-grid{display:grid; grid-template-columns:.9fr 1.1fr; gap:36px; align-items:start;}
.product-detail-grid .product-thumb{aspect-ratio:4/3;}

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--border); padding-block:34px; margin-top:20px;}
.footer-inner{display:flex; justify-content:space-between; gap:24px; flex-wrap:wrap; font-size:13px; color:var(--muted);}
.footer-inner strong{color:var(--ink); display:block; font-family:var(--font-display); font-size:13px; letter-spacing:.04em; margin-bottom:6px;}
.footer-col{display:flex; flex-direction:column; gap:2px;}

/* ---------- Forms ---------- */
.field{display:flex; flex-direction:column; gap:6px; margin-bottom:14px;}
.field label{font-size:12px; font-weight:600; letter-spacing:.02em; color:var(--ink-soft);}
.field input, .field textarea, .field select{font-family:inherit; font-size:14px; padding:11px 12px; border-radius:var(--r-s); border:1px solid var(--border); background:var(--paper); color:var(--ink); width:100%;}
.field input:focus, .field textarea:focus, .field select:focus{outline:2px solid var(--accent); outline-offset:0; border-color:var(--accent);}
.field textarea{resize:vertical; min-height:74px;}
.field-row{display:grid; grid-template-columns:1fr 1fr; gap:12px;}
.field-hint{font-size:11.5px; color:var(--muted);}
.field-error{font-size:12.5px; color:var(--danger); font-weight:600;}

/* ---------- Notices ---------- */
.notice-success{background:var(--status-closed-soft); color:var(--status-closed); border:1px solid var(--status-closed); border-radius:var(--r-s); padding:12px 14px; font-size:13.5px; margin-bottom:18px;}
.notice-error{background:var(--danger-soft); color:var(--danger); border:1px solid var(--danger); border-radius:var(--r-s); padding:12px 14px; font-size:13.5px; margin-bottom:18px;}

/* ---------- Badges / status ---------- */
.status-pill{display:inline-flex; align-items:center; gap:6px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; padding:5px 10px; border-radius:999px;}
.status-new{background:var(--status-new-soft); color:var(--status-new);}
.status-quoted{background:var(--status-quoted-soft); color:var(--status-quoted);}
.status-closed{background:var(--status-closed-soft); color:var(--status-closed);}
.dot{width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0;}

/* ---------- Admin: login ---------- */
.admin-login{min-height:60vh; display:flex; align-items:center; justify-content:center; padding-block:40px;}
.login-card{width:100%; max-width:380px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-l); padding:30px 28px; box-shadow:var(--shadow-s);}
.login-card h2{font-size:20px; margin-bottom:6px;}
.login-sub{font-size:13px; color:var(--muted); margin-bottom:22px;}

/* ---------- Admin: dashboard ---------- */
.admin-shell{padding-block:32px 60px;}
.admin-topbar{display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px;}
.admin-topbar h2{font-size:24px; margin-bottom:4px;}
.admin-topbar-actions{display:flex; gap:10px;}
.stat-row{display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:24px;}
.stat-tile{background:var(--surface); border:1px solid var(--border); border-radius:var(--r-m); padding:16px 18px;}
.stat-num{font-family:var(--font-mono); font-size:26px; font-weight:600;}
.stat-label{font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-top:2px;}
.status-tabs{display:flex; gap:6px; border-bottom:1px solid var(--border); margin-bottom:18px; flex-wrap:wrap;}
.status-tab{border:none; background:transparent; padding:10px 6px; margin-right:14px; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer; border-bottom:2px solid transparent; margin-bottom:-1px; text-decoration:none;}
.status-tab[aria-selected="true"]{color:var(--ink); border-color:var(--ink);}
.quote-list{display:flex; flex-direction:column; gap:10px;}
.quote-row{display:grid; grid-template-columns:auto 1.4fr 1fr auto auto; align-items:center; gap:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-m); padding:14px 18px; cursor:pointer; text-align:left; width:100%; text-decoration:none; color:inherit;}
.quote-row:hover{border-color:var(--steel-3);}
.quote-ref{font-family:var(--font-mono); font-size:12px; color:var(--muted);}
.quote-main strong{display:block; font-size:14.5px; font-weight:600;}
.quote-main span{font-size:12.5px; color:var(--muted);}
.quote-product{font-size:12.5px; color:var(--ink-soft);}
.quote-date{font-size:11.5px; color:var(--muted); text-align:right; white-space:nowrap;}
.empty-state{padding:48px 20px; text-align:center; color:var(--muted); font-size:14px; border:1px dashed var(--border); border-radius:var(--r-m);}

/* ---------- Admin: products / categories ---------- */
.product-admin-list{display:flex; flex-direction:column; gap:10px;}
.product-admin-row{display:grid; grid-template-columns:auto 1.6fr 1fr auto; align-items:center; gap:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--r-m); padding:12px 16px;}
.swatch{width:44px; height:44px; border-radius:var(--r-s); flex-shrink:0; overflow:hidden; background:var(--steel-1);}
.swatch img{width:100%; height:100%; object-fit:cover;}
.product-admin-row .row-actions{display:flex; gap:6px;}

/* ---------- Quote detail ---------- */
.detail-grid{display:flex; flex-direction:column; gap:2px; margin:16px 0 20px;}
.detail-line{display:flex; justify-content:space-between; gap:16px; padding:9px 0; border-bottom:1px solid var(--border); font-size:13.5px;}
.detail-line span:first-child{color:var(--muted);}
.detail-line span:last-child{text-align:right; font-weight:500;}
.detail-message{background:var(--surface-2); border-radius:var(--r-s); padding:13px 14px; font-size:13.5px; color:var(--ink-soft); margin-bottom:18px; white-space:pre-wrap;}
.reply-actions{display:flex; gap:10px; flex-wrap:wrap; margin-top:16px;}
.section-label{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); margin-bottom:10px;}

@media (max-width:860px){
  .hero-grid{grid-template-columns:1fr;}
  .hero-plate{order:-1; aspect-ratio:16/9;}
  .product-grid{grid-template-columns:repeat(2,1fr);}
  .stat-row{grid-template-columns:repeat(2,1fr);}
  .product-detail-grid{grid-template-columns:1fr;}
}
@media (max-width:620px){
  .product-grid{grid-template-columns:1fr;}
  .field-row{grid-template-columns:1fr;}
  .quote-row{grid-template-columns:1fr; text-align:left;}
  .quote-date{text-align:left;}
  .product-admin-row{grid-template-columns:auto 1fr; row-gap:10px;}
  .product-admin-row .row-actions{grid-column:1 / -1;}
  .brand-tag{display:none;}
  .stat-row{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:480px){
  .nav-tab .full{display:none;}
  .nav-tab .short{display:inline;}
  .nav-tab{padding:8px 12px;}
  .brand-name{font-size:13px;}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none !important; animation:none !important;}
}
