/* QuantaCart storefront. Theme variables are set from the store's API data
   (public/js/lib/theme.js); the values below are only the pre-load defaults. */
:root {
  --primary: #0b3d2e;
  --accent: #39ff88;
  --bg: #02110b;
  --panel: #04221a;
  --line: #2a5a49;
  --text: #ecfff5;
  --dim: #a5c7b6;
  --warn: #ffd166;
  --bad: #ff9d9d;
  --r: 14px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p { margin: 0 0 .6em; }
ul, ol { margin: 0; padding: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--accent); color: #000; padding: 10px 14px; border-radius: 8px; z-index: 50; font-weight: 600; }
.skip:focus { top: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px 48px; }
.nojs { padding: 16px; }
.dim { color: var(--dim); }

/* header */
.top { position: relative; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { max-width: 1240px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.brandmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.bar nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.bar nav a { color: var(--text); text-decoration: none; padding: 8px 2px; border-bottom: 2px solid transparent; min-height: 44px; display: inline-flex; align-items: center; }
.bar nav a:hover, .bar nav a[aria-current] { border-bottom-color: var(--accent); }
.search { margin-left: auto; display: flex; gap: 6px; flex: 1 1 220px; max-width: 380px; }
.search input { flex: 1; min-width: 0; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; min-height: 44px; }
.search button, .btn { background: var(--accent); color: #001a0e; border: 0; border-radius: 10px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; min-height: 44px; text-decoration: none; display: inline-flex; align-items: center; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.search button:hover, .btn:hover { filter: brightness(1.1); }
.banner { background: #2b2100; color: #ffe9a8; border-bottom: 1px solid #6b5300; padding: 10px 16px; text-align: center; font-size: .95rem; }
.banner strong { color: #fff; }
@media (min-width: 700px) { .top { position: sticky; } }

/* hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--panel); }
.heroart { position: absolute; inset: 0; opacity: .75; }
.heroart svg { width: 100%; height: 100%; display: block; animation: drift 40s ease-in-out infinite alternate; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 55%, transparent 100%); }
.herotext { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 64px; max-width: 1240px; }
.page { font-size: clamp(1.8rem, 5vw, 3.2rem); line-height: 1.1; letter-spacing: -.02em; }
.lede { font-size: 1.1rem; color: var(--dim); max-width: 60ch; }
.hero .lede { color: var(--text); }

/* category strip */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 320px); gap: 14px; margin: -34px 0 34px; position: relative; z-index: 2; overflow-x: auto; padding: 4px 2px 10px; }
.catcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text); display: flex; flex-direction: column; transition: transform .25s, border-color .25s; }
.catcard:hover { transform: translateY(-3px); border-color: var(--accent); }
.catart { aspect-ratio: 16 / 7; overflow: hidden; }
.catart svg { width: 100%; height: 100%; display: block; }
.catname { font-weight: 700; padding: 10px 14px 0; }
.catn { color: var(--dim); padding: 0 14px 12px; font-size: .9rem; }

/* sections */
.block { margin-top: 38px; }
.blockhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sec { font-size: 1.5rem; letter-spacing: -.01em; }
.sub { font-size: 1.05rem; margin-top: 14px; }
.crumbs { color: var(--dim); font-size: .95rem; margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.pill { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; text-decoration: none; color: var(--text); min-height: 40px; display: inline-flex; align-items: center; }
.pill:hover { border-color: var(--accent); color: var(--accent); }
.empty, .notice { color: var(--dim); padding: 14px 0; }
.notice { border-left: 4px solid var(--warn); padding: 10px 14px; background: var(--panel); border-radius: 8px; color: var(--text); margin: 14px 0; }
.notice.err { border-color: var(--bad); }

/* product grid */
.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; margin-top: 16px; }
.grid.small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
@media (min-width: 900px) {
  .grid.featured { grid-template-columns: repeat(4, 1fr); }
  .grid.featured .feature { grid-column: span 2; grid-row: span 2; }
  .grid.featured .feature .cardlink { height: 100%; }
}
.card { display: block; }
.cardlink { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--text); height: 100%; transition: transform .25s, border-color .25s, box-shadow .25s; }
.cardlink:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 30px -12px var(--accent); }
.cardbody { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 16px; }
.cardbody .brand, .brand { color: var(--dim); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.cardbody .title { font-weight: 650; line-height: 1.3; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-top: 6px; }
.price { font-weight: 700; }
.chip { display: inline-block; font-size: .8rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--dim); background: var(--bg); }
.chip.stock.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.chip.stock.out { color: var(--bad); border-color: var(--bad); }
.chip.stock.unknown { color: var(--warn); border-color: var(--warn); }

/* visuals: fixed 4:3 so nothing shifts while images load */
.visual { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); }
.visual img, .visual svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.visual.is-ph { background: radial-gradient(120% 90% at 18% 8%, color-mix(in srgb, var(--primary) 85%, #000) 0%, var(--bg) 100%); }
.cardlink:hover .visual img, .cardlink:hover .visual svg { transform: scale(1.06); }
.phbg { fill: transparent; }
.ph .ga { stroke: var(--accent); }
.ph .gm { stroke: var(--accent); stroke-opacity: .42; }
.ph .gf { fill: var(--accent); stroke: none; }
.ph .gsoft { fill-opacity: .16; }
.ph .gf:not(.gsoft) { animation: pulse 4s ease-in-out infinite; }
.phtag { position: absolute; left: 10px; bottom: 8px; right: 10px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); text-shadow: 0 1px 6px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visual.large .phtag { font-size: 1rem; white-space: normal; }
.vlabel { position: absolute; top: 10px; right: 10px; background: rgba(0, 0, 0, .7); color: var(--text); border-color: var(--line); }

/* product page */
.pgrid { display: grid; gap: 28px; margin-top: 12px; }
@media (min-width: 900px) { .pgrid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; } .pvisual { position: sticky; top: 90px; } }
.pvisual .visual { border-radius: var(--r); border: 1px solid var(--line); }
.bigprice { font-size: 2rem; font-weight: 800; margin-bottom: .2em; }
.desc { white-space: pre-line; max-width: 62ch; }
.agent, .compliance, .urlbox, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin: 18px 0; }
.compliance.attest { border-color: var(--warn); }
.compliance .sub { margin-top: 0; }
blockquote { margin: 8px 0; padding: 8px 14px; border-left: 4px solid var(--warn); background: var(--bg); }
.copyarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
.specs { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--r); overflow: hidden; }
.specs th, .specs td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs tbody th { width: 38%; color: var(--dim); font-weight: 500; }
.facets { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.facets dt { color: var(--dim); }
.facets dd { margin: 0; }
.notes { color: var(--dim); font-size: .92rem; margin: 6px 0 0 18px; }

/* kits */
.kitlines { list-style: none; display: grid; gap: 22px; margin-top: 22px; }
.kitline { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.kithead { display: flex; justify-content: space-between; color: var(--dim); font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px; }
.kitprod { display: grid; grid-template-columns: minmax(110px, 200px) 1fr; gap: 16px; align-items: center; }
.kitprod .visual { border-radius: 10px; }
.kitinfo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.kitinfo .title { font-weight: 650; font-size: 1.05rem; }
.kitprod.flagged .visual { opacity: .55; }
.reason { color: var(--dim); margin: 10px 0 0; max-width: 70ch; }
.alts { margin-top: 14px; padding-top: 4px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.kitprod.alt { grid-template-columns: minmax(90px, 140px) 1fr; }
.total { font-size: 1.25rem; font-weight: 700; margin-top: 24px; }

/* shop with your AI */
.two { display: grid; gap: 16px; }
@media (min-width: 800px) { .two { grid-template-columns: 1fr 1fr; } }
.panel ol { padding-left: 1.3em; }
.panel li { margin: 6px 0; }
.urlbox code { font-size: clamp(1rem, 4vw, 1.4rem); color: var(--accent); word-break: break-all; }
.tryit { padding-left: 1.3em; }

.foot { border-top: 1px solid var(--line); padding: 22px 16px 40px; text-align: center; color: var(--dim); }
.fine { font-size: .85rem; }

@keyframes drift { from { transform: scale(1.05) translateX(-2%); } to { transform: scale(1.12) translateX(2%); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cardlink:hover, .catcard:hover { transform: none; }
  .cardlink:hover .visual img, .cardlink:hover .visual svg { transform: none; }
}
@media (max-width: 560px) {
  .herotext { padding-top: 44px; padding-bottom: 54px; }
  .kitprod, .kitprod.alt { grid-template-columns: 96px 1fr; gap: 12px; }
  .strip { grid-auto-columns: 62%; }
  .search { max-width: none; flex-basis: 100%; margin-left: 0; }
  .specs tbody th { width: 44%; }
}
