/* ============ Tokens ============ */
:root {
  --bg: #0b0e15;
  --bg-2: #10141d;
  --surface: #151b27;
  --surface-2: #1d2433;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #f3f5fa;
  --muted: #8b93a7;
  --dim: #5b6376;
  --accent: #d9b25f;
  --accent-ink: #17120a;
  --gold: linear-gradient(135deg, #f6e1a6 0%, #d9b25f 45%, #a87b33 100%);
  --accent-soft: rgba(217, 178, 95, 0.14);
  --ok: #3ddc97;
  --warn: #ffb547;
  --danger: #ff5470;
  --info: #5cb8ff;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --font-display: 'Anton', Impact, 'Arial Narrow', sans-serif;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --holo: linear-gradient(115deg, transparent 18%, rgba(255, 236, 180, 0.38) 34%, rgba(217, 178, 95, 0.32) 46%, rgba(150, 190, 255, 0.22) 57%, rgba(255, 220, 150, 0.25) 64%, transparent 78%);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --top-h: 60px;
  color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 520px at 90% -10%, rgba(217, 178, 95, 0.07), transparent 60%),
    radial-gradient(800px 480px at -15% 8%, rgba(80, 110, 190, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
code { font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; }

/* ============ Top bar ============ */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 12, 16, 0.72);
  backdrop-filter: saturate(1.5) blur(16px);
  -webkit-backdrop-filter: saturate(1.5) blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: var(--top-h); }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 21px; letter-spacing: 0.04em; text-transform: uppercase; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo > span:last-child { white-space: nowrap; }
.logo.small { font-size: 18px; }
.logo.big { font-size: 28px; justify-content: center; margin-bottom: 8px; }
.logo-mark {
  width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1.5px rgba(217, 178, 95, 0.55), 0 4px 14px rgba(0, 0, 0, 0.45);
}
.logo.small .logo-mark { width: 30px; height: 30px; }
.brand-emblem {
  display: block; width: 168px; height: 168px; margin: 0 auto 6px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(217, 178, 95, 0.5), 0 24px 60px -12px rgba(217, 178, 95, 0.35);
}
.hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.hero-emblem {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover; align-self: start; margin-top: 8px;
  box-shadow: 0 0 0 1.5px rgba(217, 178, 95, 0.5), 0 18px 40px -10px rgba(217, 178, 95, 0.4);
  animation: float 6s ease-in-out infinite;
}
@media (min-width: 760px) { .hero-emblem { width: 168px; height: 168px; } }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--line-2); background: var(--surface-2); }
.cart-count {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); font-size: 12px; font-weight: 800;
}
.cart-count.bump { animation: bump 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }
.admin-pill { font-size: 11px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }

/* ============ Hero & catalog ============ */
.demo-note { margin-top: 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px; color: var(--warn); background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.25); }
.hero { padding: 32px 0 6px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2s infinite; flex: none; }
.display {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: clamp(44px, 12vw, 104px); line-height: 0.92; letter-spacing: 0.005em; margin: 10px 0 12px;
}
.holo-text {
  background: linear-gradient(90deg, #f6e1a6, #c99a45, #fff3cf, #b5893b, #f6e1a6);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shift 9s linear infinite;
}
.hero-sub { color: var(--muted); max-width: 52ch; font-size: 15px; }

.toolbar {
  position: sticky; top: var(--top-h); z-index: 30;
  display: flex; gap: 10px; padding: 12px 0 10px; margin-top: 18px;
  background: linear-gradient(var(--bg) 75%, transparent);
}
.search {
  flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0;
  height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: border-color 0.2s;
}
.search:focus-within { border-color: var(--accent); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--dim); }
.select-sm { height: 48px; padding: 0 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.admin-main .search { margin-bottom: 12px; }

.chips {
  display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 16px; padding: 2px 16px;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 36px; padding: 0 15px; border-radius: 999px;
  border: 1px solid var(--line-2); color: var(--muted); font-size: 14px; font-weight: 700; white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { color: var(--text); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.result-count { margin-left: auto; flex: none; font-size: 13px; color: var(--dim); font-weight: 600; padding-left: 8px; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding-bottom: 96px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.grid-empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 48px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); }

.tile {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--r); background: var(--surface); border: 1px solid var(--line);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.25s, box-shadow 0.25s;
  animation: rise 0.5s backwards; animation-delay: calc(var(--i, 0) * 40ms);
}
.tile:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8); }
.tile:active { transform: scale(0.98); }
.tile-media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: radial-gradient(circle at 50% 30%, #232a3b, #0d1017); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tile:hover .tile-media img { transform: scale(1.05); }
.noimg { display: grid; place-items: center; width: 100%; height: 100%; color: var(--dim); font-size: 13px; }
.foil {
  position: absolute; inset: 0; pointer-events: none;
  background: var(--holo); background-size: 250% 250%;
  background-position: var(--fx, 100%) var(--fy, 0%);
  mix-blend-mode: color-dodge; opacity: 0; transition: opacity 0.35s;
}
.tile:hover .foil { opacity: 0.85; }
@media (hover: none) {
  .tile .foil { opacity: 0.4; animation: sweep 5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.6s); }
}
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink);
}
.badge.hot { background: var(--danger); color: #fff; }
.tile-body { display: flex; flex-direction: column; gap: 3px; flex: 1; padding: 10px 12px 12px; }
.tile-meta { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile h3 { font-size: 14px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-row { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.price { font-size: 16px; font-weight: 800; }
.grade { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--line-2); white-space: nowrap; }

.sk { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; }
.sk-tile { animation: none; }
.sk-line { display: block; height: 12px; border-radius: 6px; margin: 4px 0; }
.sk-line.short { width: 55%; }

.float-cart {
  position: fixed; z-index: 35; left: 16px; right: 16px; bottom: calc(14px + var(--safe-b));
  max-width: 520px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 56px; padding: 0 20px; border-radius: 18px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 15px;
  box-shadow: 0 16px 40px -10px rgba(217, 178, 95, 0.45), 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: rise 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
body[data-view='card'] .float-cart { display: none; }

/* ============ Detail ============ */
.back { display: inline-flex; align-items: center; gap: 4px; height: 44px; margin-top: 8px; color: var(--muted); font-weight: 700; font-size: 14px; }
.back:hover { color: var(--text); }
.detail { display: grid; gap: 22px; padding-bottom: 130px; }
@media (min-width: 900px) {
  .detail { grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; padding-bottom: 60px; }
  .gallery { position: sticky; top: calc(var(--top-h) + 20px); }
}
.gallery-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--r-lg); border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 35%, #252d40, #0b0e14 75%);
}
.gallery-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; display: grid; place-items: center; padding: 28px 24px; perspective: 1000px; }
.card3d {
  position: relative; width: min(100%, 420px); aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.2s ease-out;
  box-shadow: 0 40px 70px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.06);
  animation: float 6s ease-in-out infinite;
}
.card3d img { width: 100%; height: 100%; object-fit: contain; background: #0d1017; }
.card3d .foil { opacity: 0.55; }
.card3d:hover .foil { opacity: 0.9; }
@media (hover: none) { .card3d .foil { animation: sweep 4s ease-in-out infinite; } }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.dot { width: 28px; height: 28px; display: grid; place-items: center; }
.dot::after { content: ''; width: 8px; height: 8px; border-radius: 4px; background: var(--line-2); transition: width 0.25s, background 0.25s; }
.dot.on::after { width: 22px; background: var(--accent); }

.meta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 7vw, 50px); line-height: 1; letter-spacing: 0.01em; margin: 12px 0 0; }
.price-xl { font-size: 34px; font-weight: 800; margin: 14px 0 2px; letter-spacing: -0.01em; }
.stock { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--ok); }
.stock.low { color: var(--warn); }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 22px 0; overflow: hidden; border-radius: var(--r); background: var(--line); border: 1px solid var(--line); }
.specs div { background: var(--surface); padding: 12px 14px; }
.specs dt { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.specs dd { font-weight: 700; word-break: break-word; }
.desc { color: #c6ccd9; white-space: pre-line; }
.assure { list-style: none; display: grid; gap: 8px; margin-top: 20px; color: var(--muted); font-size: 14px; font-weight: 600; }
.assure li { display: flex; align-items: center; gap: 10px; }
.assure svg { color: var(--accent); flex: none; width: 18px; height: 18px; }

.buy-bar {
  position: fixed; z-index: 35; left: 0; right: 0; bottom: 0;
  display: flex; gap: 10px; padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(10, 12, 16, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
@media (min-width: 900px) {
  .buy-bar { position: static; padding: 0; margin-top: 24px; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ============ Buttons & inputs ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 20px; border-radius: 14px; white-space: nowrap;
  font-size: 15px; font-weight: 800; border: 1px solid var(--line-2); background: var(--surface-2);
  transition: transform 0.12s, background 0.2s, filter 0.2s, opacity 0.2s;
}
.btn:hover { background: #242a3b; }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; box-shadow: 0 10px 30px -10px rgba(217, 178, 95, 0.6); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); }
.btn-lg { height: 56px; font-size: 16px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 56px; padding: 0; flex: none; }
.buy-bar .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 84, 112, 0.35); }
.btn-danger:hover { background: rgba(255, 84, 112, 0.08); }
.link { color: var(--accent); font-weight: 700; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.link[disabled] { color: var(--dim); text-decoration: none; cursor: default; }

.stepper { display: inline-flex; align-items: center; height: 56px; flex: none; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); }
.stepper button { width: 44px; height: 100%; font-size: 20px; font-weight: 700; color: var(--muted); }
.stepper button:hover { color: var(--text); }
.stepper button[disabled] { opacity: 0.3; pointer-events: none; }
.stepper span, .stepper input { min-width: 28px; text-align: center; font-weight: 800; }
.stepper input { width: 100%; min-width: 0; flex: 1; background: none; border: 0; outline: 0; font-size: 18px; }
.stepper.sm { height: 38px; border-radius: 11px; }
.stepper.sm button { width: 36px; font-size: 18px; }
.stepper.wide { display: flex; height: 56px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; color: var(--muted); }
.opt { color: var(--dim); font-weight: 600; }
.hint { font-size: 13px; color: var(--dim); }
.input {
  width: 100%; height: 52px; padding: 0 14px; border-radius: 14px; font-size: 16px; outline: 0;
  background: var(--bg-2); border: 1px solid var(--line-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.invalid { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 84, 112, 0.12); }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238b93a7' stroke-width='2'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.input-xl { font-size: 24px; font-weight: 800; height: 56px; }
.prefix { display: flex; }
.prefix span { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-right: 0; border-radius: 14px 0 0 14px; background: var(--surface-2); color: var(--muted); font-weight: 700; }
.prefix .input { border-radius: 0 14px 14px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .input { flex: 1; min-width: 0; }
.row.between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.otp { height: 64px; text-align: center; font-size: 28px; font-weight: 800; letter-spacing: 0.4em; padding-left: 0.4em; }
.otp-step { animation: rise 0.3s; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }

/* ============ Panels, cart & checkout ============ */
.page-title { font-family: var(--font-display); font-weight: 400; text-transform: uppercase; font-size: clamp(36px, 9vw, 60px); line-height: 1; letter-spacing: 0.01em; margin: 18px 0 18px; display: flex; align-items: center; gap: 12px; }
.count-pill { font-family: var(--font); font-size: 15px; font-weight: 800; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.panel + .panel { margin-top: 14px; }
.panel h2 { font-size: 19px; font-weight: 800; }
.panel.narrow { max-width: 560px; margin: 0 auto 48px; }
.sub-h { margin: 8px 0 14px; }
#bill .field + .field, #bill .grid-2 + .field, #bill .field + .grid-2 { margin-top: 16px; }

.split { display: grid; gap: 16px; padding-bottom: 130px; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: start; padding-bottom: 64px; }
  .split .summary { position: sticky; top: calc(var(--top-h) + 16px); }
}
.desktop-only { display: none !important; }
@media (min-width: 900px) { .desktop-only { display: flex !important; } }

.lines { display: grid; gap: 10px; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.line img { width: 72px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.line-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.line-title { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-sub { font-size: 13px; color: var(--muted); }
.remove { align-self: flex-start; font-size: 13px; color: var(--dim); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.remove:hover { color: var(--danger); }
.line-end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.summary { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.summary h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.sum-row { display: flex; justify-content: space-between; color: var(--muted); font-weight: 600; }
.sum-row.total { color: var(--text); font-size: 20px; font-weight: 800; padding-top: 12px; margin-top: 2px; border-top: 1px dashed var(--line-2); }
.free { color: var(--ok); }
.nudge { font-size: 13px; color: var(--muted); padding: 12px; border-radius: 12px; background: var(--bg-2); }
.nudge b { color: var(--accent); }
.bar { height: 6px; margin-top: 8px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, #a87b33, var(--accent)); transition: width 0.4s; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; font-size: 12px; color: var(--dim); font-weight: 600; }
.summary .buy-bar { margin-top: 6px; }

.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.step { flex: 1; display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 3px solid var(--surface-2); font-size: 13px; font-weight: 800; color: var(--dim); text-align: left; }
.step i { font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); font-size: 12px; }
.step.on { color: var(--text); border-color: var(--accent); }
.step.on i { background: var(--accent); color: var(--accent-ink); }
.step.done { color: var(--muted); border-color: rgba(217, 178, 95, 0.45); cursor: pointer; }
.step.done i { background: var(--accent-soft); color: var(--accent); }
.step[disabled] { cursor: default; }

.verified { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(61, 220, 151, 0.08); border: 1px solid rgba(61, 220, 151, 0.3); color: var(--ok); font-weight: 800; }
.verified small { color: var(--muted); font-weight: 600; font-size: 13px; }
.verified .link { margin-left: auto; }
.mini-line { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.mini-line img { width: 44px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.mini-line span { font-weight: 600; line-height: 1.3; }
.review-lines { display: grid; gap: 10px; }
.addr-box { padding: 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.addr-box p { color: var(--muted); margin-top: 4px; line-height: 1.55; }
.addr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.totals { display: grid; gap: 8px; }

/* ============ Orders ============ */
.signed-as { margin: -8px 0 18px; font-size: 14px; }
.order-list { display: grid; gap: 10px; padding-bottom: 60px; }
.order-row { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.order-row > div:nth-child(2) { display: flex; flex-direction: column; }
.order-row .end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.thumbs { display: flex; }
.thumbs img { width: 36px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 5px; border: 2px solid var(--surface); background: var(--surface-2); }
.thumbs img + img { margin-left: -14px; }
.status { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.status.live, .status.delivered { background: rgba(61, 220, 151, 0.14); color: var(--ok); }
.status.paid { background: rgba(255, 181, 71, 0.14); color: var(--warn); }
.status.shipped { background: rgba(92, 184, 255, 0.14); color: var(--info); }
.status.sold, .status.refund_needed, .status.cancelled { background: rgba(255, 84, 112, 0.14); color: var(--danger); }

.order-hero { text-align: center; padding: 36px 0 10px; }
.order-hero .page-title { justify-content: center; margin: 8px 0; }
.order-hero p { max-width: 46ch; margin: 0 auto 24px; }
.tick { width: 84px; height: 84px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 36px; font-weight: 800; animation: pop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1); box-shadow: 0 0 0 10px var(--accent-soft), 0 20px 60px -10px rgba(217, 178, 95, 0.6); }
.tick svg { width: 40px; height: 40px; }
.order-hero.warn .tick { background: var(--warn); box-shadow: 0 0 0 10px rgba(255, 181, 71, 0.12); }

/* ============ Empty / loading / toast / overlay ============ */
.empty { text-align: center; padding: 56px 0 80px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty .page-title { margin: 16px 0 4px; }
.empty .btn { margin-top: 18px; }
.empty-art { position: relative; width: 120px; height: 110px; }
.empty-art span { position: absolute; left: 38px; top: 6px; width: 46px; height: 64px; border-radius: 7px; border: 2px solid var(--line-2); background: var(--surface); }
.empty-art span:nth-child(1) { transform: rotate(-16deg) translateX(-26px); }
.empty-art span:nth-child(3) { transform: rotate(16deg) translateX(26px); }
.empty-art span:nth-child(2) { background: var(--gold); background-size: 200% 200%; border: 0; animation: shift 6s infinite, float 5s ease-in-out infinite; z-index: 1; }
.center-load { display: grid; place-items: center; gap: 14px; min-height: 50vh; color: var(--muted); text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; margin: 0 auto; }

.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(92px + var(--safe-b)); width: min(calc(100vw - 32px), 420px); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: none; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700; box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.7); animation: toastIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2); transition: opacity 0.3s, transform 0.3s; }
.toast.ok { background: var(--accent); color: var(--accent-ink); }
.toast.error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
.toast a { pointer-events: auto; margin-left: auto; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; text-align: center; background: rgba(10, 12, 16, 0.86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-weight: 700; }
.overlay p { margin-top: 14px; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); padding: 28px 0 calc(110px + var(--safe-b)); color: var(--muted); font-size: 13px; }
.footer .wrap { display: flex; flex-direction: column; gap: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer nav a { min-height: 32px; display: inline-flex; align-items: center; }
.footer nav a:hover { color: var(--text); }
@media (min-width: 900px) { .footer { padding-bottom: 32px; } }

/* ============ Owner dashboard ============ */
.admin-main { padding-bottom: calc(150px + var(--safe-b)); max-width: 720px; }
.login { max-width: 460px; padding-top: 12vh; padding-bottom: 40px; }
.login .page-title { justify-content: center; }
.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding-bottom: var(--safe-b);
  background: rgba(15, 18, 24, 0.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar button { height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 800; color: var(--dim); }
.tabbar button.on { color: var(--accent); }
.tabbar .plus { width: 46px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: var(--accent); color: var(--accent-ink); }
.tabbar .add-tab.on { color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.stat { padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font-family: var(--font-display); font-weight: 400; font-size: 24px; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat span { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.inv-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px; margin-bottom: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.inv-open { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; text-align: left; min-width: 0; }
.inv-thumb { width: 52px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 8px; background: var(--surface-2); }
.inv-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.inv-title { font-weight: 700; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inv-sub { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.form { padding-bottom: 20px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ph { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); cursor: pointer; animation: pop 0.3s; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 20px; line-height: 1; }
.cover-tag { position: absolute; left: 6px; bottom: 6px; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; border-radius: var(--r); border: 2px dashed var(--line-2); color: var(--muted); text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.photo-empty:hover { border-color: var(--accent); background: var(--accent-soft); }
.photo-empty svg { width: 36px; height: 36px; color: var(--accent); }
.photo-empty b { color: var(--text); }
.photo-empty span { font-size: 13px; }
.photo-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; }
.photo-actions .btn { cursor: pointer; }
.save-bar { position: fixed; z-index: 35; left: 0; right: 0; bottom: calc(66px + var(--safe-b)); padding: 18px 16px 10px; background: linear-gradient(transparent, var(--bg) 35%); }
.save-bar .btn { max-width: 688px; margin: 0 auto; display: flex; }

.order-card { margin-bottom: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.order-card[open] { border-color: var(--line-2); }
.order-card summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; cursor: pointer; }
.order-card summary::-webkit-details-marker { display: none; }
.order-body { display: flex; flex-direction: column; gap: 12px; padding: 0 14px 14px; }
.contact-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contact-row .btn { height: 42px; padding: 0 10px; font-size: 14px; }
.ship-form { display: grid; gap: 10px; }
.warn-box { padding: 12px; border-radius: 12px; font-size: 13px; color: var(--warn); background: rgba(255, 181, 71, 0.08); border: 1px solid rgba(255, 181, 71, 0.25); }

/* ============ Tags, slides, descriptions ============ */
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.tag-row.lg { gap: 6px; margin-top: 12px; }
.tag-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em; white-space: nowrap;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(217, 178, 95, 0.25);
}
.tag-row.lg .tag-badge { font-size: 13px; padding: 4px 11px; }
.tag-badge.editable { font-size: 13px; padding: 4px 4px 4px 11px; }
.tag-badge button { width: 22px; height: 22px; border-radius: 50%; color: var(--accent); font-size: 16px; line-height: 1; }
.tag-badge button:hover { background: rgba(217, 178, 95, 0.2); }

.tile-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.tile-track::-webkit-scrollbar { display: none; }
.tile-track > img, .tile-track > .noimg { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.tile:hover .tile-track > img { transform: none; }
.tile-dots { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 1; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.tile-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); transition: width 0.2s, background 0.2s; }
.tile-dots i.on { width: 14px; background: #fff; }
.tile-nav {
  position: absolute; top: 50%; z-index: 2; width: 30px; height: 30px; margin-top: -15px; border-radius: 50%;
  background: rgba(10, 12, 16, 0.65); color: #fff; font-size: 20px; line-height: 1; opacity: 0; transition: opacity 0.2s;
}
.tile-nav.prev { left: 6px; }
.tile-nav.next { right: 6px; }
@media (hover: hover) { .tile:hover .tile-nav { opacity: 1; } }

.thumbs-row { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.thumb { flex: none; width: 56px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: 0.6; transition: opacity 0.2s, border-color 0.2s; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.on { border-color: var(--accent); opacity: 1; }
.short-desc { color: var(--muted); font-size: 16px; font-weight: 600; margin-top: 8px; }
.long-desc { margin-top: 22px; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.long-desc h2 { font-size: 13px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.long-desc p { color: #c6ccd9; white-space: pre-line; }

/* ============ Checkout: shipping + coupon ============ */
.req { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); margin-left: 4px; }
.ship-opts { display: grid; gap: 10px; }
.ship-opt {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 16px; cursor: pointer;
  background: var(--bg-2); border: 1.5px solid var(--line-2); transition: border-color 0.2s, background 0.2s;
}
.ship-opt input { position: absolute; opacity: 0; pointer-events: none; }
.ship-opt .radio { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; }
.ship-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.ship-opt.on .radio { border-color: var(--accent); }
.ship-opt.on .radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.ship-opt:focus-within { box-shadow: 0 0 0 4px var(--accent-soft); }
.ship-text { display: flex; flex-direction: column; flex: 1; }
.ship-text small { color: var(--muted); font-size: 13px; }
.ship-price { font-size: 17px; }
.invalid-panel { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 84, 112, 0.12); }
.coupon-box { display: flex; flex-direction: column; gap: 8px; }
.coupon-box > label { font-size: 13px; font-weight: 700; color: var(--muted); }
.coupon-input { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.coupon-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(61, 220, 151, 0.08); border: 1px dashed rgba(61, 220, 151, 0.45); color: var(--ok); font-weight: 600; }
.sum-row.discount { color: var(--ok); }

/* ============ Admin: category, tags, photo editor, coupons ============ */
.btn-icon-sm { width: 52px; height: 52px; padding: 0; flex: none; border-radius: 14px; }
.row > select.input { flex: 1; min-width: 0; }
.cat-new { margin-top: 8px; animation: rise 0.25s; }
.tag-input {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 52px; padding: 8px 10px;
  border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line-2); cursor: text;
}
.tag-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.tag-input #tag-chips { display: contents; }
.tag-input input { flex: 1; min-width: 140px; height: 34px; background: none; border: 0; outline: 0; font-size: 16px; }
.ph .ed { position: absolute; top: 6px; left: 6px; width: 32px; height: 32px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 15px; }
.slide-tag { position: absolute; left: 6px; bottom: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 10px; font-weight: 800; text-transform: uppercase; }

.editor { position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column; background: #05070a; padding-bottom: var(--safe-b); }
.editor-top { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 10px; }
.editor-stage { flex: 1; min-height: 0; padding: 0 12px; }
.editor-stage img { display: block; max-width: 100%; max-height: 100%; }
.editor-tools { display: flex; justify-content: center; gap: 6px; padding: 12px 12px 4px; overflow-x: auto; }
.editor-tools button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 60px; padding: 8px 6px; border-radius: 12px;
  font-size: 20px; color: var(--muted); border: 1px solid transparent;
}
.editor-tools button span { font-size: 11px; font-weight: 800; }
.editor-tools button.on { color: var(--accent); border-color: rgba(217, 178, 95, 0.35); background: var(--accent-soft); }
.editor-actions { display: grid; grid-template-columns: auto 1fr 1.3fr; gap: 8px; padding: 10px 12px 14px; }
.editor-actions .btn { padding: 0 12px; }
.editor .cropper-view-box { outline: 2px solid var(--accent); outline-color: rgba(217, 178, 95, 0.9); }
.editor .cropper-line, .editor .cropper-point { background-color: var(--accent); }

.coupon-list { display: grid; gap: 10px; margin-top: 16px; }
.coupon-row { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.coupon-row.off { opacity: 0.55; }
.coupon-main { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.coupon-code { align-self: flex-start; font-family: ui-monospace, Menlo, monospace; font-weight: 800; font-size: 15px; letter-spacing: 0.06em; padding: 3px 10px; border-radius: 8px; border: 1.5px dashed var(--accent); color: var(--accent); }
.coupon-main .bar { margin-top: 4px; }
.coupon-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn.sm { width: 40px; height: 40px; }
.switch { position: relative; width: 48px; height: 28px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); transition: background 0.2s; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.2s, background 0.2s; }
.switch input:checked + span { background: var(--accent-soft); border-color: var(--accent); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--accent); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============ Policies page ============ */
.policy { max-width: 760px; padding-bottom: 60px; }
.policy section { padding: 22px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--top-h) + 10px); }
.policy h2 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.policy p, .policy li { color: #c6ccd9; margin-bottom: 8px; }
.policy ul { padding-left: 20px; }

/* ============ Motion ============ */
@keyframes shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes sweep { 0%, 100% { background-position: 100% 0%; } 50% { background-position: 0% 100%; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { from { transform: scale(0.6); opacity: 0; } }
@keyframes bump { 50% { transform: scale(1.4); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sk { to { background-position: -200% 0; } }
@keyframes float { 50% { translate: 0 -6px; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
