:root{
  --bg:#0b0f17;
  --panel:#0f172a;
  --card:#111c33;
  --muted:#9aa4b2;
  --text:#e7eefc;
  --border:rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --r:16px;
  --accent: rgba(99,102,241,.9);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  background:
    radial-gradient(1200px 800px at 20% -10%, rgba(99,102,241,.25), transparent 60%),
    radial-gradient(1000px 700px at 90% 10%, rgba(16,185,129,.18), transparent 55%),
    var(--bg);
  color:var(--text);
}

a{color:inherit; text-decoration:none}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible{
  outline:2px solid rgba(99,102,241,.7);
  outline-offset:2px;
  border-radius:12px;
}

header{
  padding:28px 16px 12px;
  max-width:1100px;
  margin:0 auto;
}
.topbar{
  display:flex;
  gap:14px;
  align-items:flex-start;
  justify-content:space-between;
  flex-wrap:wrap;
}
h1{
  font-size:20px;
  margin:0 0 6px 0;
  letter-spacing:.2px;
}
.sub{
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
}

.badge{
  display:inline-flex;
  gap:8px;
  align-items:center;
  font-size:12px;
  color:var(--muted);
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  padding:10px 12px;
  border-radius:999px;
  box-shadow: var(--shadow);
  white-space:nowrap;
}
.dot{
  width:8px;height:8px;border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 0 4px rgba(34,197,94,.18);
}

main{
  max-width:1100px;
  margin:0 auto;
  padding: 0 16px 42px;
}

.controls{
  margin-top:14px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  box-shadow: var(--shadow);
}
.controls input, .controls select, .controls button{
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(15,23,42,.75);
  color: var(--text);
  padding:10px 12px;
  font-size:13px;
}
.controls input{
  flex:1 1 260px;
  min-width:220px;
}
.controls select{ flex:0 0 190px; }
.controls button{
  cursor:pointer;
  transition:.15s transform ease, .15s opacity ease;
}
.controls button:hover{ opacity:.92; }
.controls button:active{ transform: scale(.98); }
.controls .hint{
  margin-left:auto;
  color:var(--muted);
  font-size:12px;
  padding: 0 6px;
  flex: 1 1 180px;
  text-align:right;
  min-width:180px;
}

.grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:12px;
}
.card{
  grid-column: span 12;
  background: rgba(17,28,51,.72);
  border:1px solid var(--border);
  border-radius: var(--r);
  padding:14px;
  box-shadow: var(--shadow);
  overflow:hidden;
  position:relative;
}
@media (min-width:760px){ .card{ grid-column: span 6; } }
@media (min-width:1020px){ .card{ grid-column: span 4; } }

.card-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:10px;
}
.title{
  font-weight:650;
  font-size:14px;
  margin:0;
  line-height:1.25;
}
.meta{
  margin-top:6px;
  color:var(--muted);
  font-size:12px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.pill{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  white-space:nowrap;
}

.status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  white-space:nowrap;
}
.status .s-dot{ width:8px;height:8px;border-radius:50%; }
.ok .s-dot{ background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.16); }
.low .s-dot{ background:#f59e0b; box-shadow:0 0 0 4px rgba(245,158,11,.16); }
.out .s-dot{ background:#ef4444; box-shadow:0 0 0 4px rgba(239,68,68,.16); }

/* ===== Photos + carousel ===== */
.media{
  margin-bottom:12px;
}
.media a{
  display:block;
}
.carousel{
  width:100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  position:relative;
  user-select:none;
}
.carousel .imgwrap{display:none;}
.carousel img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition: transform .35s ease;
}
.card:hover 
.carousel button{
  position:absolute;
  top:50%;
  transform: translateY(-50%);
  border:1px solid var(--border);
  background: rgba(10,14,24,.55);
  color: var(--text);
  width:38px;
  height:38px;
  border-radius:12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.0;
  transition: opacity .15s ease, transform .15s ease;
}
.carousel button:hover{ opacity:1; }
.carousel button:active{ transform: translateY(-50%) scale(.98); }
.carousel:hover button{ opacity:.92; }
.carousel .prev{ left:10px; }
.carousel .next{ right:10px; }

.thumbs{
  margin-top:8px;
  display:flex;
  gap:8px;
  overflow:auto;
  padding-bottom:2px;
}
.thumb{
  flex:0 0 auto;
  width:46px;
  height:46px;
  border-radius:12px;
  border:1px solid var(--border);
  background: rgba(15,23,42,.55);
  overflow:hidden;
  cursor:pointer;
  position:relative;
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  opacity:.92;
}
.thumb[aria-current="true"]{
  outline:2px solid rgba(99,102,241,.75);
  outline-offset:2px;
}
.thumb:active{ transform: scale(.98); }

/* Sold out overlay */
.soldout{
  position:absolute;
  inset:14px 14px auto 14px;
  pointer-events:none;
}
.soldout .tag{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(239,68,68,.22);
  color: #ffd1d1;
  font-size:12px;
  backdrop-filter: blur(8px);
}
.soldout .tag .mini{
  width:8px;height:8px;border-radius:50%;
  background:#ef4444;
  box-shadow:0 0 0 4px rgba(239,68,68,.18);
}

/* ===== Sizes ===== */
.sizes{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:8px;
  margin-top:10px;
}
.size{
  background: rgba(15,23,42,.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding:10px 10px;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height:58px;
}
.size strong{
  font-size:11px;
  letter-spacing:.6px;
  color: var(--muted);
}
.qty{
  font-size:14px;
  font-weight:700;
}

/* ===== Color swatches ===== */
.swatches{
  display:flex;
  gap:8px;
  align-items:center;
  margin-top:10px;
  flex-wrap:wrap;
}
.swatch{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size:12px;
}
.swatch .chip{
  width:14px;height:14px;border-radius:999px;
  border:1px solid rgba(255,255,255,.25);
  background: var(--c, #888);
}

.note{
  color: var(--muted);
  font-size:12px;
  margin-top:10px;
  line-height:1.35;
}
.footer{
  margin-top:18px;
  color:var(--muted);
  font-size:12px;
  text-align:center;
  opacity:.9;
}
.empty{
  grid-column:span 12;
  padding:26px 16px;
  border-radius: var(--r);
  border:1px dashed rgba(255,255,255,.16);
  color: var(--muted);
  text-align:center;
  background: rgba(255,255,255,.02);
}

/* ===== Nicer hover / feel ===== */
.card{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover{
  transform: translateY(-4px);
  border-color: rgba(99,102,241,.22);
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
}
.pill, .status, .swatch, .size{
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.size:hover{
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.16);
  background: rgba(15,23,42,.68);
}
.controls button:hover{
  border-color: rgba(99,102,241,.35);
}
.thumb{
  transition: transform .12s ease, border-color .12s ease, opacity .12s ease;
}
.thumb:hover{
  transform: translateY(-1px);
  border-color: rgba(99,102,241,.35);
  opacity: .98;
}
.carousel button{
  transition: opacity .15s ease, transform .15s ease, border-color .15s ease, background .15s ease;
}
.carousel button:hover{
  border-color: rgba(255,255,255,.18);
  background: rgba(10,14,24,.7);
}
