:root{
  --ink:#0F1319;
  --panel:#171D26;
  --panel-2:#1E2733;
  --paper:#F4EFE4;
  --paper-line:#DCD3BE;
  --text:#F0EDE5;
  --text-dim:#8E96A3;
  --yellow:#FFC72C;
  --red:#E6483A;
  --green:#3E7C5A;
  --radius:10px;
  --sticker-shadow: 0 10px 22px -8px rgba(0,0,0,.55);
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
.hidden{ display:none !important; }
body{
  margin:0;
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.05) 1.5px, transparent 1.5px) 0 0/22px 22px,
    var(--ink);
  color:var(--text);
  font-family:'Inter',system-ui,sans-serif;
  -webkit-font-smoothing:antialiased;
  padding-bottom:60px;
}

h1,h2{font-family:'Anton',sans-serif; font-weight:400; letter-spacing:.02em; margin:0;}

/* ---------- topbar ---------- */
.topbar{
  position:sticky; top:0; z-index:30;
  display:flex; align-items:center; justify-content:space-between;
  padding:18px 22px;
  background:rgba(15,19,25,.85);
  backdrop-filter:blur(8px);
  border-bottom:1px solid rgba(255,255,255,.07);
}
.brand{
  font-family:'Anton',sans-serif;
  font-size:26px;
  letter-spacing:.03em;
}
.brand .dot{color:var(--red); font-size:14px; vertical-align:middle;}
.cart-toggle{
  position:relative;
  background:var(--panel-2);
  border:1px solid rgba(255,255,255,.1);
  color:var(--text);
  border-radius:999px;
  padding:10px 16px;
  font-size:18px;
  cursor:pointer;
  display:flex; align-items:center; gap:8px;
  transition:transform .15s ease, background .15s ease;
}
.cart-toggle:hover{ background:#252F3D; transform:translateY(-1px); }
.cart-badge{
  background:var(--red);
  color:#fff;
  font-family:'Space Mono',monospace;
  font-size:12px;
  font-weight:700;
  min-width:20px; height:20px;
  border-radius:999px;
  display:flex; align-items:center; justify-content:center;
  padding:0 5px;
}

/* ---------- promo strip ---------- */
.promo-strip{
  display:flex;
  gap:2px;
  margin:22px auto 0;
  max-width:760px;
  padding:0 16px;
}
.promo-item{
  flex:1;
  background:var(--panel);
  border:1px solid rgba(255,255,255,.08);
  border-radius:var(--radius);
  padding:12px 10px;
  text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:2px;
}
.promo-item + .promo-item{ margin-left:-1px; }
.promo-item:first-child{ border-top-right-radius:0; border-bottom-right-radius:0; }
.promo-item:last-child{ border-top-left-radius:0; border-bottom-left-radius:0; }
.promo-item:not(:first-child):not(:last-child){ border-radius:0; }
.promo-num{
  font-family:'Anton',sans-serif;
  font-size:13px;
  color:var(--text-dim);
  letter-spacing:.08em;
}
.promo-txt{ font-size:11px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.06em; }
.promo-price{ font-family:'Space Mono',monospace; font-weight:700; font-size:17px; }
.promo-price em{ font-style:normal; font-size:11px; color:var(--text-dim); }
.is-tier{ background:#1B2A22; border-color:rgba(62,124,90,.4); }
.is-tier .promo-price{ color:var(--green); }
.is-best{ background:#2A2011; border-color:rgba(255,199,44,.4); }
.is-best .promo-price{ color:var(--yellow); }

/* ---------- category tabs ---------- */
.cat-tabs{
  display:flex;
  gap:8px;
  overflow-x:auto;
  padding:26px 16px 10px;
  max-width:900px;
  margin:0 auto;
  scrollbar-width:none;
}
.cat-tabs::-webkit-scrollbar{ display:none; }
.tab{
  flex:none;
  background:var(--panel);
  color:var(--text-dim);
  border:1px solid rgba(255,255,255,.08);
  border-bottom-width:3px;
  padding:10px 18px;
  border-radius:8px 8px 4px 4px;
  font-family:'Anton',sans-serif;
  font-size:14px;
  letter-spacing:.04em;
  text-transform:uppercase;
  cursor:pointer;
  transition:all .15s ease;
}
.tab:hover{ color:var(--text); }
.tab.active{
  background:var(--paper);
  color:var(--ink);
  border-color:var(--paper);
  border-bottom-color:var(--red);
  transform:translateY(-2px);
}

/* ---------- grid ---------- */
main{ max-width:960px; margin:0 auto; padding:20px 24px 40px; }

.sticker-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(140px,1fr));
  gap:26px 20px;
  padding-top:16px;
}

.sticker-card{
  position:relative;
  background:var(--paper);
  border-radius:14px;
  padding:14px;
  aspect-ratio:1/1;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  border:none;
  box-shadow:var(--sticker-shadow);
  transition:transform .18s ease, box-shadow .18s ease;
}
.sticker-card img{
  max-width:100%; max-height:100%; object-fit:contain;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.25));
  pointer-events:none;
}
.rot-0{ transform:rotate(-4deg); }
.rot-1{ transform:rotate(3deg); }
.rot-2{ transform:rotate(-2deg); }
.rot-3{ transform:rotate(4deg); }
.rot-4{ transform:rotate(-1deg); }
.sticker-card:hover, .sticker-card:focus-visible{
  transform:rotate(0deg) scale(1.06) translateY(-4px);
  box-shadow:0 16px 30px -8px rgba(0,0,0,.6);
  z-index:2;
}
.sticker-card .sticker-label{
  position:absolute; bottom:-10px; left:50%; transform:translateX(-50%) rotate(-2deg);
  background:var(--ink);
  color:var(--text);
  font-size:10.5px;
  padding:3px 9px;
  border-radius:5px;
  white-space:nowrap;
  max-width:92%;
  overflow:hidden; text-overflow:ellipsis;
}

.sticker-card .qty-pill{
  position:absolute; top:-12px; right:-10px;
  background:var(--ink);
  border:2px solid var(--red);
  border-radius:999px;
  display:flex; align-items:center; gap:6px;
  padding:3px 6px;
  transform:rotate(6deg);
  z-index:3;
}
.sticker-card .qty-pill span{
  font-family:'Space Mono',monospace; font-weight:700; font-size:12.5px; color:#fff;
  min-width:12px; text-align:center;
}
.sticker-card .qty-pill button{
  width:20px; height:20px;
  border-radius:50%;
  border:none;
  background:var(--panel-2);
  color:#fff;
  font-size:13px;
  line-height:1;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition:background .15s ease;
}
.sticker-card .qty-pill button:hover{ background:var(--red); }

.sticker-card .zoom-btn{
  position:absolute; bottom:-10px; left:-8px;
  width:32px; height:32px;
  border-radius:50%;
  border:2px solid var(--ink);
  background:var(--paper);
  font-size:14px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transform:rotate(-8deg);
  box-shadow:0 4px 10px -3px rgba(0,0,0,.5);
  transition:transform .15s ease;
  z-index:3;
}
.sticker-card .zoom-btn:hover{ transform:rotate(0deg) scale(1.08); }

.cat-empty{
  grid-column:1/-1;
  text-align:center;
  padding:60px 20px;
  color:var(--text-dim);
  border:1.5px dashed rgba(255,255,255,.15);
  border-radius:14px;
}
.cat-empty strong{ display:block; font-family:'Anton',sans-serif; color:var(--text); font-size:20px; margin-bottom:6px; letter-spacing:.02em; }

.custom-banner{
  max-width:640px;
  margin:26px auto 0;
  padding:16px 22px;
  background:var(--panel);
  border:1px dashed rgba(255,255,255,.18);
  border-radius:12px;
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  flex-wrap:wrap;
}
.custom-banner-text{ display:flex; flex-direction:column; gap:3px; }
.custom-banner-text strong{ font-family:'Anton',sans-serif; font-size:14px; letter-spacing:.02em; }
.custom-banner-text span{ color:var(--text-dim); font-size:12.5px; max-width:360px; line-height:1.4; }
.custom-banner-controls{ display:flex; align-items:center; gap:10px; flex:none; }
.custom-banner-controls > span{ font-family:'Space Mono',monospace; font-weight:700; font-size:14px; }
.custom-banner-controls button{
  border:none; border-radius:8px; cursor:pointer;
  font-family:'Inter',sans-serif; transition:transform .12s ease;
}
.custom-banner-controls .custom-minus{
  width:28px; height:28px; border-radius:50%;
  background:var(--panel-2); color:var(--text); font-size:15px;
}
.custom-banner-controls .custom-minus:hover{ background:var(--red); }
.custom-banner-controls .custom-plus{
  background:var(--yellow); color:var(--ink);
  padding:10px 16px;
  font-family:'Anton',sans-serif; font-size:12.5px; letter-spacing:.03em; text-transform:uppercase;
  white-space:nowrap;
}
.custom-banner-controls .custom-plus:hover{ transform:translateY(-2px); }

.custom-sticker-mock{
  font-size:40px;
  width:84px; height:84px; margin:0 auto 18px;
  background:var(--paper);
  border-radius:14px;
  display:flex; align-items:center; justify-content:center;
  transform:rotate(-4deg);
  box-shadow:var(--sticker-shadow);
}

/* ---------- zoom modal ---------- */
.zoom-overlay{
  position:fixed; inset:0; z-index:70;
  background:rgba(5,7,10,.82);
  display:flex; align-items:center; justify-content:center;
  padding:24px;
  opacity:0; pointer-events:none;
  transition:opacity .2s ease;
}
.zoom-overlay.show{ opacity:1; pointer-events:auto; }
.zoom-modal{
  position:relative;
  background:var(--paper);
  border-radius:18px;
  padding:34px;
  max-width:min(420px,90vw);
  display:flex; flex-direction:column; align-items:center; gap:14px;
  box-shadow:0 24px 50px -10px rgba(0,0,0,.6);
}
.zoom-modal img{ max-width:100%; max-height:60vh; object-fit:contain; }
.zoom-label{ font-family:'Anton',sans-serif; color:var(--ink); font-size:16px; text-align:center; letter-spacing:.02em; }
.zoom-close{
  position:absolute; top:-14px; right:-14px;
  width:34px; height:34px; border-radius:50%;
  background:var(--red); color:#fff; border:3px solid var(--ink);
  font-size:15px; cursor:pointer;
}

/* ---------- cart drawer ---------- */
.overlay{
  position:fixed; inset:0; background:rgba(5,7,10,.6);
  opacity:0; pointer-events:none; transition:opacity .2s ease; z-index:40;
}
.overlay.show{ opacity:1; pointer-events:auto; }

.cart-drawer{
  position:fixed; top:0; right:0; height:100%;
  width:min(380px,100%);
  background:var(--panel);
  border-left:1px solid rgba(255,255,255,.08);
  z-index:50;
  display:flex; flex-direction:column;
  transform:translateX(100%);
  transition:transform .25s ease;
}
.cart-drawer.open{ transform:translateX(0); }

.cart-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.cart-header h2{ font-size:20px; }
.cart-header button{
  background:none; border:none; color:var(--text-dim); font-size:18px; cursor:pointer;
}
.cart-header-actions{ display:flex; align-items:center; gap:12px; }
.clear-cart-btn{
  background:none;
  border:1px solid rgba(255,255,255,.15);
  color:var(--text-dim);
  font-size:11.5px;
  font-family:'Inter',sans-serif;
  padding:6px 11px;
  border-radius:7px;
  cursor:pointer;
  transition:color .15s ease, border-color .15s ease;
}
.clear-cart-btn:hover{ color:var(--red); border-color:rgba(230,72,58,.4); }

.cart-items{ flex:1; overflow-y:auto; padding:16px 22px; }
.cart-empty{ color:var(--text-dim); font-size:14px; text-align:center; margin-top:30px; }

.cart-line{
  display:flex; align-items:center; gap:12px;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.cart-line img{ width:44px; height:44px; object-fit:contain; background:var(--paper); border-radius:8px; padding:5px; }
.cart-line-custom-icon{
  width:44px; height:44px; flex:none;
  background:var(--paper); border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-size:20px;
}
.cart-line-info{ flex:1; min-width:0; }
.cart-line-name{ font-size:13.5px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cart-line-cat{ font-size:11px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.04em; }
.cart-line-controls{ display:flex; align-items:center; gap:8px; }
.cart-line-controls button{
  width:22px; height:22px; border-radius:6px; border:1px solid rgba(255,255,255,.15);
  background:var(--panel-2); color:var(--text); cursor:pointer; font-size:13px; line-height:1;
}
.cart-line-controls span{ font-family:'Space Mono',monospace; font-size:13px; min-width:14px; text-align:center; }

.cart-footer{ padding:18px 22px 22px; border-top:1px solid rgba(255,255,255,.08); }
.tier-progress{ font-size:12.5px; color:var(--yellow); margin:0 0 12px; min-height:16px; }
.cart-total-row{
  display:flex; justify-content:space-between; align-items:baseline;
  font-size:14px; color:var(--text-dim); margin-bottom:16px;
}
.cart-total-row strong{ font-family:'Space Mono',monospace; color:var(--text); font-size:22px; }

.btn-confirm{
  width:100%;
  background:var(--red);
  color:#fff;
  border:none;
  padding:15px;
  border-radius:10px;
  font-family:'Anton',sans-serif;
  font-size:16px;
  letter-spacing:.03em;
  text-transform:uppercase;
  cursor:pointer;
  transition:transform .12s ease, background .12s ease;
}
.btn-confirm:hover:not(:disabled){ transform:translateY(-2px); background:#F0574A; }
.btn-confirm:disabled{ background:#3A3F47; color:var(--text-dim); cursor:not-allowed; }

@media (max-width:480px){
  .sticker-grid{ grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:22px 14px; }
  .promo-strip{ padding:0 12px; }
}

@media (prefers-reduced-motion:reduce){
  *{ transition:none !important; scroll-behavior:auto !important; }
}
