:root {
  --bg: #13151D; --panel: #1C1F2A; --panel2: #242838; --line: #2E3346; --text: #F5EEE4; --muted: #A9ACB8;
  --ink: #111827; --accent: #FACC15; --ok: #4ADE80; --bad: #F43F5E;
  --r: 14px; --font: 'Rubik', 'Arial Rounded MT Bold', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; }
main { flex: 1; padding-bottom: 60px; }

/* header */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(19, 21, 29, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 14px; padding: 10px 0; flex-wrap: wrap; }
.logo { display: flex; gap: 3px; text-decoration: none; }
.logo span { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--ink); font-weight: 900; font-size: 13px; }
.logo span:nth-child(odd) { transform: rotate(-4deg); } .logo span:nth-child(even) { transform: rotate(4deg); }
.search { flex: 1; min-width: 180px; display: flex; }
.search input { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; outline: none; }
.search input:focus { border-color: var(--accent); }
nav.main { display: flex; gap: 6px; flex-wrap: wrap; }
nav.main a, .btn { text-decoration: none; padding: 8px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
nav.main a:hover, .btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.btn.big { padding: 13px 22px; font-size: 16px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill { font-family: var(--mono); background: var(--accent); color: var(--ink); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 700; }
.demo-banner { background: #3b2f0b; color: #ffe8a3; text-align: center; font-size: 13px; padding: 6px 12px; }

/* hero */
.hero { padding: 48px 0 26px; position: relative; overflow: hidden; }
.hero h1 { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.hero h1 span { width: clamp(38px, 8vw, 70px); height: clamp(38px, 8vw, 70px); border-radius: 14px; display: grid; place-items: center; color: var(--ink); font-size: clamp(22px, 5vw, 42px); font-weight: 900; }
.hero p { color: var(--muted); max-width: 640px; font-size: 18px; line-height: 1.5; }
.stripes { position: absolute; right: -40px; top: 30px; width: 320px; opacity: .5; pointer-events: none; }
.stripes i { display: block; height: 14px; border-radius: 8px; margin: 10px 0; transform: rotate(-14deg); }

h2 { font-size: 26px; margin: 34px 0 14px; } h3 { margin: 18px 0 8px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--mono); }

/* sections + chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: 14px; cursor: pointer; }
.chip i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chip.on { background: var(--text); color: var(--ink); }
.section-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.section-tiles a { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; text-decoration: none; font-weight: 700; border-left: 6px solid; }
.section-tiles a small { display: block; color: var(--muted); font-weight: 400; margin-top: 4px; }

/* product grid */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; max-width: 100%; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .15s; }
.card:hover { transform: translateY(-3px); border-color: #444a63; }
.card .thumb { aspect-ratio: 4/3; background: radial-gradient(circle at 50% 40%, #2b3045, #191c27); display: grid; place-items: center; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .spin { width: 26px; height: 26px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card .body { padding: 12px 14px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.card .name { font-weight: 700; } .card .sec { color: var(--muted); font-size: 12px; margin-top: 3px; }
.price { font-family: var(--mono); font-weight: 700; white-space: nowrap; }

/* product page */
.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; margin-top: 22px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }
.stage { background: radial-gradient(circle at 50% 35%, #2b3045, #161922); border: 1px solid var(--line); border-radius: 18px; aspect-ratio: 1/1; position: relative; overflow: hidden; touch-action: none; }
.stage canvas { width: 100%; height: 100%; display: block; }
.stage .hint { position: absolute; left: 12px; bottom: 10px; font-size: 12px; color: var(--muted); background: rgba(0, 0, 0, .35); padding: 4px 9px; border-radius: 999px; }
.stage .tools { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.stage .tools button { background: rgba(0, 0, 0, .45); border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; cursor: pointer; font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.panel h3:first-child { margin-top: 0; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 600; }
.tabs button.on { background: var(--accent); color: var(--ink); border-color: var(--accent); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 6px; max-height: 210px; overflow: auto; padding: 2px; }
.sw { aspect-ratio: 1; border-radius: 8px; border: 2px solid rgba(255, 255, 255, .15); cursor: pointer; padding: 0; }
.sw.on { outline: 3px solid var(--accent); outline-offset: 1px; }
.partlist { display: grid; gap: 8px; }
.partrow { display: grid; grid-template-columns: 22px 1fr minmax(0, 1.4fr); gap: 8px; align-items: center; }
.partrow i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .2); }
.partrow.on { background: var(--panel2); border-radius: 8px; }
.bigprice { font-family: var(--mono); font-size: 30px; font-weight: 800; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.warn { color: #ffcf6b; font-size: 13px; }
.err { color: var(--bad); font-size: 13px; }
.okmsg { color: var(--ok); }
.gallery { display: flex; gap: 8px; overflow-x: auto; }
.gallery img { height: 90px; border-radius: 10px; border: 1px solid var(--line); }

/* forms */
form.stack, .stack { display: grid; gap: 12px; }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
label.f span.req::after { content: ' *'; color: var(--bad); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .two, .three { grid-template-columns: 1fr; } }
.drop { border: 2px dashed #4b5272; border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; background: var(--panel2); }
.drop.over { border-color: var(--accent); background: #2b2a1c; }
.files { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.files .f { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; font-size: 12px; display: flex; gap: 6px; align-items: center; }
.files img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; }

/* basket */
table.lines { width: 100%; border-collapse: collapse; }
table.lines td, table.lines th { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.lines th { color: var(--muted); font-weight: 600; font-size: 13px; }
.dots { display: inline-flex; gap: 3px; } .dots i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; border: 1px solid rgba(255,255,255,.2); }
.qty { display: inline-flex; align-items: center; gap: 6px; } .qty button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; }
.postopt { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.postopt.on { border-color: var(--accent); background: #2a2817; }
.totals div { display: flex; justify-content: space-between; padding: 4px 0; } .totals .grand { font-size: 20px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* kids */
.kids-hero { background: linear-gradient(135deg, #3b1d5e, #12355c); border-radius: 18px; padding: 24px; margin-top: 20px; }
.optgroup { display: flex; gap: 8px; flex-wrap: wrap; }
.optgroup button { border-radius: 12px; padding: 10px 14px; border: 2px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 700; }
.optgroup button.on { border-color: var(--accent); background: #3a3618; }

footer { border-top: 1px solid var(--line); padding: 22px 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--text); color: var(--ink); padding: 10px 18px; border-radius: 999px; font-weight: 700; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.empty { text-align: center; padding: 50px 10px; color: var(--muted); }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 60; padding: 16px; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; width: min(440px, 100%); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* style chips on the colour picker (Standard, Matte, Silk, Rainbow…) */
.finish-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.finish-chips .chip { padding: 5px 11px; font-size: 13px; color: inherit; font-family: inherit; }
.finish-chips .chip.on { color: var(--ink); }

/* illustration-only note on the 3D preview (bottom right) */
.stage .disclaim { position: absolute; right: 10px; bottom: 10px; max-width: 46%; font-size: 10.5px; line-height: 1.3; text-align: right; color: var(--muted); background: rgba(0, 0, 0, .35); padding: 4px 9px; border-radius: 10px; pointer-events: none; }
@media (max-width: 560px) { .stage .hint { display: none; } .stage .disclaim { max-width: 70%; } }
