:root {
  --bg: #ffffff;
  --bg-soft: #f7f6fa;
  --ink: #15121c;
  --muted: #6d6a78;
  --border: #ecebf1;
  --pink: #ea1258;
  --pink-dark: #c40e49;
  --pink-tint: #ffe3ec;
  --gold: #c8952e;
  --gold-tint: #fbf0da;
  --mint: #0f9d5c;
  --mint-tint: #e3f7ec;
  --danger: #d13a3a;
  --font-display: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }

/* ---------- top strip + header ---------- */
.top-strip {
  background: var(--ink);
  color: #fff;
  text-align: center;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 7px 14px;
}
.top-strip span { color: var(--gold); }

header.main {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 2px;
  flex-shrink: 0;
}
.brand .dot { color: var(--pink); }

form.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 6px 4px 16px;
  color: var(--muted);
  font-size: 0.92rem;
  max-width: 520px;
}
form.search svg { flex-shrink: 0; opacity: 0.6; }
form.search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.92rem;
  font-family: inherit;
  flex: 1;
  padding: 8px 0;
  color: var(--ink);
}
form.search button {
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
  flex-shrink: 0;
}

.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink);
  position: relative;
}
.action svg { width: 21px; height: 21px; }

.badge-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--pink);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.cat-nav {
  display: flex;
  gap: 30px;
  padding: 13px 0;
  overflow-x: auto;
  font-weight: 700;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
}
.cat-nav a { white-space: nowrap; padding-bottom: 3px; border-bottom: 2px solid transparent; color: var(--ink); }
.cat-nav a.active, .cat-nav a:hover { color: var(--pink); border-color: var(--pink); }

/* ---------- hero ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  padding: 22px 0;
}
.hero-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, #2a1030 0%, #611444 48%, var(--pink) 100%);
  min-height: 300px;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 4vw, 56px);
}
.hero-main::after {
  content: "";
  position: absolute;
  right: -60px; top: 50%;
  transform: translateY(-50%);
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 24px solid rgba(255,255,255,0.14);
}
.hero-main::before {
  content: "";
  position: absolute;
  right: 50px; top: 50%;
  transform: translateY(-50%);
  width: 170px; height: 170px;
  border-radius: 50%;
  border: 14px solid var(--gold);
  opacity: 0.85;
}
.hero-copy { position: relative; z-index: 2; color: #fff; max-width: 420px; }
.hero-copy .tag {
  display: inline-block;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.4);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.2vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 12px;
  text-wrap: balance;
}
.hero-copy p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(255,255,255,0.82);
  margin: 0 0 20px;
  max-width: 34ch;
}
.btn-white {
  background: #fff;
  color: var(--ink);
  border: none;
  padding: 13px 26px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.15s ease;
  display: inline-block;
}
.btn-white:hover { transform: translateY(-2px); }

.side-stack { display: flex; flex-direction: column; gap: 18px; }
.side-card {
  border-radius: 16px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.side-card.a { background: linear-gradient(135deg, #0f7a52, var(--mint)); }
.side-card.b { background: linear-gradient(135deg, #9c5a08, var(--gold)); }
.side-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; margin: 0 0 6px; }
.side-card p { margin: 0; font-size: 0.8rem; opacity: 0.9; }
.side-card::after {
  content: ""; position: absolute; right: -20px; bottom: -20px;
  width: 100px; height: 100px; border-radius: 50%;
  border: 14px solid rgba(255,255,255,0.18);
}

/* ---------- category circles ---------- */
.cat-circles {
  display: flex;
  gap: 30px;
  padding: 26px 0 8px;
  overflow-x: auto;
}
.cat-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  width: 88px;
  text-align: center;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}
.cat-circle .ring {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.cat-circle:hover .ring, .cat-circle.active .ring { border-color: var(--pink); transform: translateY(-3px); }
.cat-circle .ring svg { width: 40px; height: 40px; }
.cat-circle span { font-size: 0.78rem; font-weight: 700; color: var(--ink); }

/* ---------- section head ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 40px 0 20px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  margin: 0;
}
.section-head a { font-size: 0.84rem; font-weight: 700; color: var(--pink); }

.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-select {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.card:hover { box-shadow: 0 14px 30px rgba(21,18,28,0.1); border-color: transparent; }

.card-media {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.card-media a { position: absolute; inset: 0; z-index: 1; }
.card-media img, .card-media svg { width: 62%; height: 62%; object-fit: contain; transition: transform 0.4s ease; }
.card:hover .card-media img, .card:hover .card-media svg { transform: scale(1.08) rotate(2deg); }

.badge-sale {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  padding: 4px 9px;
  border-radius: 5px;
  text-transform: uppercase;
}
.badge-sale.bestseller { background: var(--gold); color: #2a1a00; }
.badge-sale.low-stock { background: var(--danger); }

.wishlist {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(21,18,28,0.14);
}
.wishlist svg { width: 16px; height: 16px; stroke: var(--ink); fill: none; transition: fill 0.15s ease, stroke 0.15s ease; }
.wishlist.active svg { fill: var(--pink); stroke: var(--pink); }

.quick-add {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  text-align: center;
  padding: 11px 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.22s ease, background 0.15s ease;
  cursor: pointer;
  border: none;
  width: 100%;
}
.card:hover .quick-add { transform: translateY(0); }
.quick-add:disabled { background: var(--muted); cursor: not-allowed; }
.quick-add.out-of-stock { transform: translateY(0); background: var(--muted); }

.card-body { padding: 12px 14px 15px; }
.card-body .cat-label { font-size: 0.72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 3px; }
.card-body h3 { font-size: 0.92rem; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.card-body h3 a { color: var(--ink); }

.rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--gold-tint);
  color: #7a5b12;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 5px;
  margin-bottom: 9px;
}
.rating svg { width: 10px; height: 10px; fill: var(--gold); }

.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-now { font-family: var(--font-mono); font-weight: 700; font-size: 0.98rem; font-variant-numeric: tabular-nums; }
.price-was { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.price-off { font-size: 0.78rem; font-weight: 800; color: var(--mint); }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}
.empty-state h2 { font-family: var(--font-display); color: var(--ink); margin-bottom: 8px; }

/* ---------- product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 30px 0 60px;
  align-items: start;
}
.pd-media {
  position: relative;
  background: var(--bg-soft);
  border-radius: 16px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pd-media img, .pd-media svg { width: 56%; height: 56%; object-fit: contain; }
.pd-info .breadcrumb { font-size: 0.8rem; color: var(--muted); margin-bottom: 14px; }
.pd-info .breadcrumb a:hover { color: var(--pink); }
.pd-info h1 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 800; margin: 0 0 10px; }
.pd-info .price-row { margin: 14px 0 4px; font-size: 1.1rem; }
.pd-info .price-now { font-size: 1.5rem; }
.pd-info .desc { color: var(--muted); line-height: 1.65; margin: 22px 0; }

.stock-note { font-size: 0.86rem; font-weight: 700; margin: 10px 0 20px; }
.stock-note.low { color: var(--danger); }
.stock-note.ok { color: var(--mint); }

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.qty-input {
  width: 70px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--pink);
  color: #fff;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.btn-primary:hover { background: var(--pink-dark); }
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 13px 24px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.btn-outline.wish-btn.active { border-color: var(--pink); color: var(--pink); }

.pd-actions { display: flex; gap: 12px; margin-bottom: 26px; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 6px;
}
.trust-item { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.trust-item strong { color: var(--ink); font-size: 0.85rem; }
.trust-item svg { width: 20px; height: 20px; color: var(--mint); margin-bottom: 4px; }

/* ---------- cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 30px 0 60px; align-items: start; }
.cart-line {
  display: grid;
  grid-template-columns: 76px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}
.cart-line img, .cart-line svg { width: 76px; height: 76px; border-radius: 10px; background: var(--bg-soft); object-fit: contain; padding: 6px; }
.cart-line h4 { margin: 0 0 4px; font-size: 0.94rem; font-weight: 700; }
.cart-line .cat-label { font-size: 0.74rem; color: var(--muted); }
.cart-line .qty-form { display: flex; gap: 8px; align-items: center; }
.cart-line .qty-form input { width: 54px; padding: 7px; border-radius: 7px; border: 1px solid var(--border); font-family: inherit; }
.cart-line .qty-form button { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 7px; padding: 7px 10px; font-weight: 700; cursor: pointer; font-size: 0.78rem; }
.cart-line .line-total { font-family: var(--font-mono); font-weight: 700; }
.cart-line .remove-btn { background: none; border: none; color: var(--muted); font-size: 0.78rem; cursor: pointer; text-decoration: underline; padding: 0; margin-top: 4px; }
.cart-line .remove-btn:hover { color: var(--danger); }

.summary-box {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 22px 22px 24px;
  position: sticky;
  top: 100px;
}
.summary-box h3 { font-family: var(--font-display); margin: 0 0 16px; font-size: 1.05rem; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 6px 0; color: var(--muted); }
.summary-row.total { color: var(--ink); font-weight: 800; font-size: 1.05rem; border-top: 1px solid var(--border); margin-top: 10px; padding-top: 14px; }
.summary-row .val { font-family: var(--font-mono); }
.summary-box .btn-primary { width: 100%; margin-top: 16px; text-align: center; }
.free-ship-note { font-size: 0.78rem; color: var(--mint); font-weight: 700; margin-top: 10px; }

/* ---------- checkout ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; padding: 30px 0 60px; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 9px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.94rem;
  background: #fff;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--pink); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
}
.payment-option.selected { border-color: var(--pink); background: var(--pink-tint); }
.payment-option input { margin-top: 3px; }
.payment-option strong { display: block; font-size: 0.9rem; }
.payment-option span.desc { font-size: 0.8rem; color: var(--muted); }
.payment-option.disabled { opacity: 0.55; cursor: not-allowed; }
.recommended-chip {
  display: inline-block;
  background: var(--mint-tint);
  color: var(--mint);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 8px;
  text-transform: uppercase;
}

.order-line { display: flex; justify-content: space-between; font-size: 0.86rem; padding: 5px 0; color: var(--muted); }
.order-line .name { color: var(--ink); }

.secure-note { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); margin-top: 14px; }
.secure-note svg { width: 16px; height: 16px; color: var(--mint); }

/* ---------- confirmation ---------- */
.confirmation-box { text-align: center; padding: 60px 20px 70px; max-width: 560px; margin: 0 auto; }
.confirmation-box .check-circle {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--mint-tint); color: var(--mint);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.confirmation-box h1 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 8px; }
.confirmation-box .order-id { font-family: var(--font-mono); color: var(--muted); margin-bottom: 24px; }
.status-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-pill.reserved { background: var(--mint-tint); color: var(--mint); }
.status-pill.pending { background: var(--gold-tint); color: #7a5b12; }
.confirm-summary { text-align: left; background: var(--bg-soft); border-radius: 14px; padding: 20px 22px; margin-bottom: 26px; }

/* ---------- info pages ---------- */
.info-page { padding-top: 40px; padding-bottom: 70px; }
.info-page h1 { font-family: var(--font-display); font-size: 1.9rem; margin: 0 0 14px; }
.info-page .intro { font-size: 1.02rem; color: var(--muted); max-width: 62ch; line-height: 1.6; margin-bottom: 36px; }
.info-section { border-top: 1px solid var(--border); padding: 22px 0; }
.info-section h3 { font-family: var(--font-display); font-size: 1.08rem; margin: 0 0 8px; }
.info-section p { color: var(--muted); line-height: 1.65; margin: 0; max-width: 68ch; }

/* ---------- trust footer strip ---------- */
.trust-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 30px 0;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}
.trust-footer-item { display: flex; align-items: center; gap: 10px; font-size: 0.82rem; font-weight: 600; }
.trust-footer-item svg { width: 26px; height: 26px; color: var(--pink); flex-shrink: 0; }

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 0 30px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  font-size: 0.84rem;
}
footer.site-footer h5 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 12px; color: var(--muted); }
footer.site-footer a { display: block; margin-bottom: 8px; color: var(--ink); }
footer.site-footer a:hover { color: var(--pink); }
.footer-bottom { text-align: center; font-size: 0.78rem; color: var(--muted); padding: 20px 0 36px; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  bottom: 26px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }

/* ---------- admin ---------- */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.admin-nav {
  background: var(--ink);
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-nav .brand { color: #fff; margin-bottom: 24px; }
.admin-nav .brand .dot { color: var(--gold); }
.admin-nav a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
}
.admin-nav a:hover, .admin-nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.admin-nav form { margin-top: auto; }
.admin-nav .logout-btn {
  width: 100%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}

.admin-main { padding: 32px clamp(20px, 3vw, 44px) 60px; background: var(--bg-soft); min-height: 100vh; }
.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.admin-header h1 { font-family: var(--font-display); font-size: 1.5rem; margin: 0; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.stat-card .num { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; }
.stat-card .label { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.stat-card.warn .num { color: var(--danger); }

.admin-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; overflow-x: auto; margin-bottom: 32px; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 640px; }
table.admin-table th { text-align: left; padding: 12px 16px; background: var(--bg-soft); font-weight: 700; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
table.admin-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
table.admin-table img { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; background: var(--bg-soft); }
table.admin-table .row-actions { display: flex; gap: 10px; }
table.admin-table .row-actions a, table.admin-table .row-actions button { font-size: 0.8rem; font-weight: 700; color: var(--pink); background: none; border: none; cursor: pointer; padding: 0; }
table.admin-table .row-actions .danger { color: var(--danger); }

.status-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; }
.status-tag.reserved { background: var(--mint-tint); color: var(--mint); }
.status-tag.pending_payment { background: var(--gold-tint); color: #7a5b12; }
.status-tag.shipped { background: #e3ecf7; color: #2255a4; }
.status-tag.delivered { background: var(--mint-tint); color: var(--mint); }
.status-tag.cancelled { background: #fbe4e4; color: var(--danger); }

.admin-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 26px 28px; max-width: 640px; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form .form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-form label { display: block; font-size: 0.82rem; font-weight: 700; margin-bottom: 6px; }
.admin-form input[type=text], .admin-form input[type=number], .admin-form input[type=color], .admin-form textarea, .admin-form select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
}
.admin-form .checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.86rem; }
.admin-form .current-image { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.admin-form .current-image img { width: 56px; height: 56px; border-radius: 8px; background: var(--bg-soft); object-fit: contain; padding: 4px; }
.admin-form .hint { font-size: 0.76rem; color: var(--muted); }

/* ---------- image editor ---------- */
.image-editor { border: 1px dashed var(--border); border-radius: 12px; padding: 18px; background: var(--bg-soft); }
.editor-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.editor-panel { display: flex; flex-direction: column; gap: 16px; }
.editor-stage { display: flex; gap: 20px; flex-wrap: wrap; }

.editor-viewport {
  width: 320px;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
  background: #14121c;
  position: relative;
  cursor: grab;
  touch-action: none;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.editor-viewport:active { cursor: grabbing; }
.editor-viewport img {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  max-width: none;
  user-select: none;
  -webkit-user-drag: none;
}

.editor-controls { display: flex; flex-direction: column; gap: 12px; min-width: 220px; flex: 1; }
.editor-slider-label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.editor-slider-label input[type=range] { accent-color: var(--pink); width: 100%; }
.editor-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.editor-btn-row .btn-outline { padding: 8px 12px; font-size: 0.78rem; }

.editor-result { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); padding-top: 14px; }
.editor-preview-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }

@media (max-width: 700px) {
  .editor-viewport { width: 100%; max-width: 320px; }
}

.auth-wrap { display: flex; justify-content: center; padding: 50px 0 80px; }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 400px; }
.auth-card h1 { font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 22px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-switch { text-align: center; font-size: 0.86rem; color: var(--muted); margin: 18px 0 0; }
.auth-switch a { color: var(--pink); font-weight: 700; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg-soft); }
.login-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 40px 36px; width: 100%; max-width: 380px; }
.login-card .brand { justify-content: center; margin-bottom: 22px; font-size: 1.6rem; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }
.login-error { background: #fbe4e4; color: var(--danger); padding: 10px 14px; border-radius: 8px; font-size: 0.84rem; margin-bottom: 14px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  form.search { display: none; }
  footer.site-footer { grid-template-columns: repeat(2, 1fr); }
  .product-detail { grid-template-columns: 1fr; gap: 24px; }
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .summary-box { position: static; }
  .trust-footer { grid-template-columns: repeat(2, 1fr); }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-nav { flex-direction: row; overflow-x: auto; padding: 14px; }
  .admin-nav .brand { margin-bottom: 0; }
  .admin-nav form { margin-top: 0; margin-left: auto; }
  .stat-row { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 60px 1fr; }
  .cart-line .qty-form, .cart-line .line-total { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .card, .card-media img, .card-media svg, .quick-add, .wishlist svg, .btn-white { transition: none; }
}
