/* ===== Capital Mall — storefront ===== */
:root {
  --night: #12042e;
  --deep: #1d0650;
  --purple-900: #2a0a6b;
  --purple-800: #3a0f93;
  --purple: #4c1cc4;
  --purple-500: #6334e6;
  --purple-100: #ece6ff;
  --purple-50: #f6f3ff;
  --lime: #b6f22e;
  --lime-600: #97d40f;
  --red: #ec2a2f;
  --ink: #16122a;
  --muted: #6d6885;
  --line: #e9e6f2;
  --bg: #f4f2fa;
  --card: #ffffff;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(42, 10, 107, .08);
  --shadow-lg: 0 18px 40px rgba(42, 10, 107, .18);
  --container: 1240px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.45;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.icon { flex-shrink: 0; }
.hidden { display: none !important; }

/* ---------- Logo ---------- */
.logo { display: flex; align-items: center; gap: 8px; color: #fff; }
.logo svg { width: 46px; height: 46px; filter: drop-shadow(0 0 12px rgba(182, 242, 46, .45)); }
.logo-text { display: flex; flex-direction: column; line-height: .92; }
.logo-text b { font-size: 21px; font-weight: 900; letter-spacing: .3px; }
.logo-text b.mall { color: var(--lime); }
.logo-text small { font-size: 8.5px; font-weight: 700; letter-spacing: .6px; margin-top: 3px; text-transform: uppercase; }

/* ---------- Header ---------- */
.site-header {
  background: radial-gradient(1200px 300px at 70% -40%, #4a17b8 0%, transparent 60%), linear-gradient(180deg, var(--night), var(--deep));
  color: #fff;
  position: sticky; top: 0; z-index: 40;
}
.header-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; max-width: var(--container); margin: 0 auto; }
.icon-btn { background: none; border: 0; color: #fff; padding: 6px; position: relative; display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
.badge {
  position: absolute; top: -2px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 99px; font-size: 11px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--deep);
}
.badge.red { background: var(--red); color: #fff; }
.badge.lime { background: var(--lime); color: var(--ink); }
.search { flex: 1; display: flex; max-width: 520px; margin: 0 auto; }
.search input {
  flex: 1; min-width: 0; border: 0; border-radius: 10px 0 0 10px; padding: 12px 14px; font-size: 14px; outline: none;
}
.search button { border: 0; background: var(--purple-500); color: #fff; padding: 0 16px; border-radius: 0 10px 10px 0; }
.search button:hover { background: var(--purple); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .label { font-size: 13px; font-weight: 600; line-height: 1.15; }
.desktop-only { display: none !important; }
.mobile-search { padding: 0 16px 12px; }
.mobile-search .search { max-width: none; }

.cat-nav { background: var(--purple-800); }
.cat-nav .container { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cat-nav a { padding: 13px 14px; font-weight: 700; font-size: 14.5px; white-space: nowrap; color: #fff; opacity: .95; }
.cat-nav a:hover, .cat-nav a.active { color: var(--lime); }
.cat-nav .all { display: flex; gap: 8px; align-items: center; background: rgba(0,0,0,.18); padding: 13px 22px; margin-right: 8px; }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(10, 2, 30, .55); z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; width: min(320px, 86vw); background: #fff; z-index: 61;
  transform: translateX(-100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer.open + .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { background: linear-gradient(135deg, var(--night), var(--purple-800)); padding: 18px 16px; display: flex; justify-content: space-between; align-items: center; }
.drawer nav { overflow-y: auto; padding: 8px; }
.drawer nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-weight: 600; }
.drawer nav a:hover { background: var(--purple-50); }
.drawer nav .emoji { width: 36px; height: 36px; border-radius: 50%; background: var(--purple-50); display: grid; place-items: center; font-size: 20px; overflow: hidden; }
.drawer nav .emoji img { width: 100%; height: 100%; object-fit: cover; }
.drawer .divider { height: 1px; background: var(--line); margin: 8px 12px; }

/* ---------- Flash ---------- */
.flash-wrap { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 80; width: min(460px, calc(100% - 32px)); }
.flash {
  background: var(--ink); color: #fff; padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; animation: drop .3s ease;
  transition: opacity .3s, transform .3s;
}
.flash .icon { color: var(--lime); }
.flash.alert { background: var(--red); }
.flash.alert .icon { color: #fff; }
.flash a { color: var(--lime); margin-left: auto; white-space: nowrap; text-decoration: underline; }
.flash.hide { opacity: 0; transform: translateY(-10px); }
@keyframes drop { from { opacity: 0; transform: translateY(-12px); } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(500px 260px at 85% 20%, rgba(150, 70, 255, .55), transparent 70%),
    radial-gradient(400px 200px at 15% 110%, rgba(182, 242, 46, .18), transparent 70%),
    linear-gradient(160deg, #170540 0%, #2c0a78 55%, #1a0548 100%);
}
.hero::before { /* city lights */
  content: ""; position: absolute; inset: 0; opacity: .35;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #ffd77a 50%, transparent 51%),
    radial-gradient(2px 2px at 60% 20%, #fff 50%, transparent 51%),
    radial-gradient(2px 2px at 80% 45%, #ffd77a 50%, transparent 51%),
    radial-gradient(2px 2px at 40% 60%, #c9b5ff 50%, transparent 51%),
    radial-gradient(2px 2px at 90% 15%, #fff 50%, transparent 51%),
    repeating-linear-gradient(90deg, transparent 0 38px, rgba(255,255,255,.05) 38px 40px);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1fr; gap: 16px; padding: 26px 16px 30px; max-width: var(--container); margin: 0 auto; align-items: center; }
.hero h1 { font-size: clamp(30px, 7.6vw, 56px); line-height: 1.04; margin: 0 0 12px; font-weight: 900; letter-spacing: -.5px; }
.hero h1 em { color: var(--lime); font-style: italic; display: block; text-shadow: 0 0 22px rgba(182,242,46,.35); }
.hero p { margin: 0 0 20px; font-weight: 600; font-size: 15px; opacity: .92; max-width: 340px; }
.hero-features { display: none; }
.hero-sky { position: absolute; inset: auto 0 0 0; height: 75%; background-repeat: repeat-x; background-position: bottom center; background-size: auto 100%; opacity: .9; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40%; background: linear-gradient(0deg, rgba(18,4,46,.85), transparent); }
.hero-inner { z-index: 2; }
.hero-copy { position: relative; z-index: 3; max-width: 58%; }
.hero-show { position: absolute; z-index: 2; right: 0; top: 50%; transform: translateY(-50%); width: 46%; height: 82%; }
.hero-show .glow { position: absolute; inset: 15% 5%; background: radial-gradient(closest-side, rgba(182,242,46,.45), rgba(120,60,255,.25) 55%, transparent); filter: blur(10px); }
.show-card {
  position: absolute; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.45);
  border: 2px solid rgba(255,255,255,.7); transition: transform .2s;
}
.show-card img { width: 100%; height: 100%; object-fit: cover; }
.show-card.s0 { width: 62%; aspect-ratio: 1; left: 22%; top: 8%; z-index: 3; }
.show-card.s1 { width: 42%; aspect-ratio: 1; left: -4%; top: 34%; transform: rotate(-8deg); z-index: 2; }
.show-card.s2 { width: 42%; aspect-ratio: 1; right: -6%; top: 40%; transform: rotate(7deg); z-index: 2; }
.show-card:hover { transform: translateY(-4px) scale(1.02); }
.show-price { position: absolute; left: 6px; bottom: 6px; background: var(--purple); color: #fff; font-weight: 900; font-size: 11px; padding: 3px 7px; border-radius: 8px; }
.show-badge { position: absolute; right: 6px; top: 6px; background: var(--red); color: #fff; font-weight: 900; font-size: 11px; padding: 3px 7px; border-radius: 8px; }
.hero-custom { display: block; background: var(--deep); }
.hero-custom img { width: 100%; height: auto; display: block; max-height: 640px; object-fit: cover; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 12px;
  padding: 13px 20px; font-weight: 800; font-size: 15px; transition: transform .12s, box-shadow .12s, background .12s; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-lime { background: linear-gradient(180deg, #c8ff3f, var(--lime-600)); color: var(--ink); box-shadow: 0 8px 22px rgba(182,242,46,.35); }
.btn-lime:hover { box-shadow: 0 10px 28px rgba(182,242,46,.55); }
.btn-purple { background: linear-gradient(180deg, var(--purple-500), var(--purple)); color: #fff; box-shadow: 0 6px 16px rgba(76,28,196,.3); }
.btn-purple:hover { background: var(--purple-800); }
.btn-ghost { background: var(--purple-50); color: var(--purple); }
.btn-ghost:hover { background: var(--purple-100); }
.btn-block { width: 100%; }
.btn-lg { padding: 16px 24px; font-size: 16px; border-radius: 14px; }
.btn-pill { border-radius: 99px; padding: 14px 26px; text-transform: uppercase; letter-spacing: .3px; }

/* ---------- Feature bar ---------- */
.features {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); margin: -16px 12px 0; position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 4px;
}
.feature { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 4px; font-size: 11px; font-weight: 700; line-height: 1.2; }
.feature + .feature { border-left: 1px solid var(--line); }
.feature small { display: none; font-weight: 500; color: var(--muted); }
.feature .icon { color: var(--purple-900); }

/* ---------- Sections ---------- */
.section { padding: 22px 0 6px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 12px; }
.section-head h2 { font-size: 20px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.section-head h2 .icon { color: #ff5a1f; }
.section-head h2 .icon.gold { color: #ffb400; }
.see-all { color: var(--purple); font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.page-title { font-size: 24px; font-weight: 900; margin: 22px 0 16px; }

/* ---------- Categories row ---------- */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 18px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: 0 0 auto; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; scroll-snap-align: start; padding: 8px 4px; border-radius: 16px; font-size: 12.5px; font-weight: 600; }
.cat:hover, .cat.active { background: var(--purple-100); color: var(--purple); }
.cat-circle { width: 70px; height: 70px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; overflow: hidden; }
.cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cat-emoji { font-size: 34px; }
.cat-circle.sale { background: var(--red); color: #fff; font-size: 30px; font-weight: 900; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cat-grid .cat { width: auto; background: #fff; box-shadow: var(--shadow); padding: 16px 6px; }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  position: relative; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 4/3; background: #f7f6fb; display: block; }
.card-media img, .card-media .img-placeholder { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { display: grid; place-items: center; font-size: 54px; background: linear-gradient(135deg, var(--purple-50), #fff); }
.discount { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-weight: 800; font-size: 13px; padding: 4px 8px; border-radius: 8px; z-index: 2; }
.fav-form { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.fav-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); display: grid; place-items: center; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.fav-btn.on { color: var(--red); }
.fav-btn.on svg { fill: var(--red); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.rating { display: flex; align-items: center; gap: 1px; color: #d8d4e6; font-size: 13px; }
.rating .star.on { color: #ffb400; }
.rating .count { color: var(--muted); margin-left: 5px; }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 2px; }
.price { font-weight: 900; font-size: 19px; letter-spacing: -.3px; }
.old-price { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.card .add-form { margin: 6px 0 0; }
.card .add-full { width: 100%; padding: 10px 8px; font-size: 13px; border-radius: 10px; gap: 8px; }
.card .add-icon { display: none; width: 40px; height: 40px; padding: 0; border-radius: 10px; }
.out { color: var(--red); font-weight: 700; font-size: 13px; }

/* ---------- Promo banners ---------- */
.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.promo {
  border-radius: var(--radius); color: #fff; padding: 16px 14px; position: relative; overflow: hidden; min-height: 108px;
  display: flex; align-items: center; gap: 10px;
  background: radial-gradient(260px 120px at 100% 100%, rgba(120,60,255,.6), transparent 70%), linear-gradient(135deg, #1a0548, #3a0f93);
}
.promo.dark { background: radial-gradient(260px 120px at 100% 100%, rgba(182,242,46,.25), transparent 70%), linear-gradient(135deg, #0f0726, #2a1258); }
.promo h3 { margin: 0; font-size: 15px; line-height: 1.1; font-weight: 900; text-transform: uppercase; }
.promo h3 span { color: var(--lime); display: block; }
.promo p { margin: 4px 0 0; font-size: 12px; opacity: .85; }
.promo .big-icon { color: var(--lime); flex-shrink: 0; }

/* ---------- Product page ---------- */
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); padding: 14px 0; }
.crumbs a:hover { color: var(--purple); }
.pdp { display: grid; grid-template-columns: 1fr; gap: 18px; }
.gallery { position: relative; margin: 0 -16px; }
.gallery-stage { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #fff; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1/1; background: #fff; }
.gallery-slide img, .gallery-slide .img-placeholder, .gallery-slide video { width: 100%; height: 100%; object-fit: contain; font-size: 110px; }
.gallery-slide video { background: #000; }
.gallery .discount { z-index: 3; top: 14px; left: 14px; font-size: 15px; padding: 6px 10px; }
.dots { position: absolute; z-index: 2; pointer-events: none; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots button { pointer-events: auto; width: 8px; height: 8px; border-radius: 99px; border: 0; background: rgba(42,10,107,.25); padding: 0; transition: width .2s; }
.dots button.on { width: 22px; background: var(--purple); }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 16px 0; scrollbar-width: none; }
.thumbs button { position: relative; flex: 0 0 64px; height: 64px; border-radius: 12px; overflow: hidden; border: 2px solid transparent; padding: 0; background: #fff; }
.thumbs button.on { border-color: var(--purple); }
.thumbs img, .thumbs video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.thumbs .play { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(18,4,46,.35); }
.gallery-count { position: absolute; z-index: 3; top: 14px; right: 14px; background: rgba(18,4,46,.7); color: #fff; font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 99px; }
.gallery-nav { display: none; }

.pdp-info h1 { font-size: 22px; line-height: 1.2; margin: 0 0 8px; font-weight: 800; }
.pdp-info .rating { margin-bottom: 12px; }
.pdp-price { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.pdp-price .price { font-size: 32px; color: var(--purple-900); }
.pdp-price .old-price { font-size: 17px; }
.save-chip { background: #ffe6e7; color: var(--red); font-weight: 800; font-size: 13px; padding: 4px 10px; border-radius: 99px; }
.stock { font-weight: 700; font-size: 14px; color: #1a9c4a; display: flex; align-items: center; gap: 6px; margin: 4px 0 16px; }
.stock.no { color: var(--red); }
.buy-box { display: grid; gap: 10px; }
.qty { display: inline-flex; align-items: center; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.qty button { width: 44px; height: 46px; border: 0; background: transparent; display: grid; place-items: center; color: var(--purple); }
.qty input { width: 46px; text-align: center; border: 0; font-weight: 800; font-size: 16px; outline: none; -moz-appearance: textfield; background: transparent; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buy-row { display: flex; gap: 10px; }
.buy-row .btn { flex: 1; }
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 18px 0; }
.perk { background: #fff; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; box-shadow: var(--shadow); }
.perk .icon { color: var(--purple); }
.share-box { background: #fff; border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 18px; }
.share-box h4 { margin: 0 0 10px; font-size: 14px; }
.share-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.share-btns a, .share-btns button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; border: 0; font-weight: 700; font-size: 13px; color: #fff; }
.sh-native { background: var(--purple); }
.sh-copy { background: var(--ink); }
.sh-wa { background: #25d366; }
.sh-viber { background: #7360f2; }
.sh-fb { background: #1877f2; }
.desc { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.desc h3 { margin: 0 0 10px; font-size: 17px; }
.desc p { margin: 0 0 10px; color: #3a3550; }

.buy-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: #fff; box-shadow: 0 -6px 24px rgba(42,10,107,.12);
  display: flex; gap: 10px; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.buy-bar .price { font-size: 20px; }
.buy-bar form { flex: 1; margin: 0; }
.buy-bar .meta { display: flex; flex-direction: column; line-height: 1.1; }

/* ---------- Cart / Checkout ---------- */
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.cart-layout { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
.cart-line { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; background: #f7f6fb; }
.cart-line .thumb img, .cart-line .thumb .img-placeholder { width: 100%; height: 100%; object-fit: cover; font-size: 34px; }
.cart-line h4 { margin: 0 0 4px; font-size: 14.5px; font-weight: 700; }
.line-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.line-actions .qty button { width: 36px; height: 36px; }
.line-actions .qty span { width: 30px; text-align: center; font-weight: 800; }
.line-actions form { margin: 0; }
.remove-btn { background: none; border: 0; color: var(--muted); padding: 6px; }
.remove-btn:hover { color: var(--red); }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-weight: 600; }
.summary-row.total { font-size: 20px; font-weight: 900; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 12px; }
.free { color: #1a9c4a; font-weight: 800; }
.cod-note { display: flex; gap: 10px; align-items: center; background: var(--purple-50); border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 600; margin: 12px 0; color: var(--purple-900); }
.empty { text-align: center; padding: 50px 16px; }
.empty .big { font-size: 64px; }
.empty h2 { margin: 10px 0 6px; }
.empty p { color: var(--muted); margin: 0 0 18px; }

.form-field { margin-bottom: 14px; }
.form-field label { display: block; font-weight: 700; font-size: 13.5px; margin-bottom: 6px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; outline: none; font-size: 16px;
}
.form-field input:focus, .form-field textarea:focus, .form-field select:focus { border-color: var(--purple-500); box-shadow: 0 0 0 4px var(--purple-100); }
.errors { background: #ffe6e7; color: #a0151a; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-weight: 600; font-size: 14px; }
.errors ul { margin: 4px 0 0; padding-left: 18px; }

.thanks { text-align: center; padding: 30px 16px 10px; }
.thanks .check { width: 76px; height: 76px; border-radius: 50%; background: var(--lime); display: grid; place-items: center; margin: 0 auto 14px; color: var(--ink); box-shadow: 0 10px 30px rgba(182,242,46,.5); }
.thanks h1 { margin: 0 0 6px; font-size: 26px; }
.order-no { display: inline-block; background: var(--purple-50); color: var(--purple); font-weight: 800; padding: 6px 14px; border-radius: 99px; margin: 8px 0; }
.status { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.status-new { background: #fff3d6; color: #a86a00; }
.status-confirmed { background: var(--purple-100); color: var(--purple); }
.status-shipped { background: #dff0ff; color: #0b64b5; }
.status-delivered { background: #dcf7e5; color: #157a3a; }
.status-cancelled { background: #ffe6e7; color: var(--red); }

/* ---------- Footer & bottom nav ---------- */
.site-footer { background: linear-gradient(180deg, var(--deep), var(--night)); color: #d9d2f5; margin-top: 40px; padding: 30px 0 110px; font-size: 14px; }
.footer-grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.site-footer h4 { color: #fff; margin: 0 0 10px; }
.site-footer a { display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--lime); }
.copyright { border-top: 1px solid rgba(255,255,255,.1); margin-top: 22px; padding-top: 16px; font-size: 12.5px; opacity: .7; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; background: #fff; display: grid; grid-template-columns: repeat(5, 1fr);
  box-shadow: 0 -4px 20px rgba(42,10,107,.08); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0;
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 4px 0; position: relative; }
.tabbar a.active { color: var(--purple); }
.tabbar a.active .icon { fill: var(--purple); }
.tabbar .badge { top: -4px; right: calc(50% - 22px); border-color: #fff; }

/* ===================== Responsive ===================== */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .feature { flex-direction: row; text-align: left; font-size: 12.5px; gap: 10px; justify-content: center; }
  .feature small { display: block; font-size: 11px; }
}

@media (min-width: 768px) {
  .mobile-search { display: none; }
  .header-row .search.desktop-only { display: flex !important; }
  .promos .promo { padding: 22px 24px; min-height: 130px; }
  .promo h3 { font-size: 22px; }
  .promo p { font-size: 14px; }
  .pdp { grid-template-columns: 1.05fr 1fr; gap: 32px; padding-top: 6px; }
  .gallery { margin: 0; }
  .gallery-track { border-radius: 20px; box-shadow: var(--shadow); }
  .thumbs { padding: 12px 0 0; }
  .dots { display: none; }
  .gallery-nav { display: grid; position: absolute; z-index: 3; top: calc(50% - 22px); width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; box-shadow: var(--shadow); place-items: center; color: var(--purple); }
  .gallery-nav.prev { left: 12px; }
  .gallery-nav.next { right: 12px; }
  .pdp-info h1 { font-size: 28px; }
  .cart-layout { grid-template-columns: 1fr 360px; }
  .cart-layout .sticky { position: sticky; top: 140px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  body { font-size: 15.5px; }
  .desktop-only { display: flex !important; }
  .mobile-only { display: none !important; }
  .tabbar, .buy-bar { display: none; }
  .site-footer { padding-bottom: 30px; }
  .header-row { padding: 16px; gap: 24px; }
  .logo svg { width: 56px; height: 56px; }
  .logo-text b { font-size: 27px; }
  .logo-text small { font-size: 10px; }
  .search input { padding: 14px 16px; font-size: 15px; }
  .header-actions { gap: 14px; }
  .hero-inner { grid-template-columns: 1.1fr .8fr 1.4fr; padding: 48px 16px 56px; gap: 28px; }
  .hero p { display: none; }
  .hero-features { display: grid; gap: 22px; font-weight: 700; font-size: 15px; }
  .hero-features div { display: flex; gap: 14px; align-items: center; line-height: 1.2; }
  .hero-copy { max-width: none; }
  .hero-features { position: relative; z-index: 3; }
  .hero-show { position: relative; right: auto; top: auto; transform: none; width: auto; height: 340px; }
  .show-price, .show-badge { font-size: 14px; padding: 5px 10px; }
  .features { display: none; }
  .cats { justify-content: space-between; padding-top: 26px; }
  .cat { width: 120px; font-size: 14px; }
  .cat-circle { width: 100px; height: 100px; }
  .cat-emoji { font-size: 48px; }
  .grid { grid-template-columns: repeat(6, 1fr); gap: 16px; }
  .grid.wide { grid-template-columns: repeat(5, 1fr); }
  .card .rating { display: none; }
  .card .add-full { display: none; }
  .card .add-form { margin: 0; }
  .card .add-icon { display: inline-flex; }
  .section-head h2 { font-size: 24px; }
  .cat-grid { grid-template-columns: repeat(6, 1fr); }
}

.qty form { margin: 0; display: contents; }
.line-actions .qty button { color: var(--purple); }

/* ---------- Mobile polish ---------- */
.btn { white-space: nowrap; }
.section-head h2 { white-space: nowrap; }
@media (max-width: 559px) {
  .hero-inner { padding: 22px 16px 34px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 13px; max-width: 200px; margin-bottom: 16px; }
  .hero .btn-lg { padding: 12px 20px; font-size: 14px; }
  .section-head h2 { font-size: 18px; }
  .see-all { font-size: 13px; }
  .price { font-size: 17px; }
  .old-price { font-size: 12px; }
  .card-title { font-size: 13px; }
  .card-body { padding: 9px 10px 10px; }
  .card .add-full { font-size: 12px; padding: 10px 6px; }
  .rating .star { width: 13px; height: 13px; }
  .rating { font-size: 12px; }
}
@media (max-width: 400px) {
  .card .add-full .icon { display: none; }
}
.buy-box .qty { justify-self: start; }
.buy-bar .price { font-size: 18px; white-space: nowrap; }
.buy-bar .old-price { white-space: nowrap; }
.buy-bar .btn { padding: 13px 14px; }

/* ---------- Quick order box (product page) ---------- */
.order-box { background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); padding: 18px; border: 2px solid var(--lime); scroll-margin-top: 150px; }
.order-box-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.order-box-head .icon { color: var(--ink); background: var(--lime); border-radius: 12px; padding: 8px; width: 40px; height: 40px; }
.order-box-head b { display: block; font-size: 18px; font-weight: 900; }
.order-box-head small { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.order-box .form-field { margin-bottom: 11px; }
.order-box .form-field input, .order-box .form-field select, .order-box .form-field textarea { padding: 11px 13px; }
.order-box .qty input, .order-box .qty input:focus { width: 46px; padding: 0; border: 0; box-shadow: none; background: transparent; }
.order-sum { background: var(--purple-50); border-radius: 12px; padding: 8px 14px; margin: 6px 0 12px; }
.order-sum .summary-row { padding: 4px 0; font-size: 14px; }
.order-sum .summary-row.total { font-size: 18px; margin-top: 4px; padding-top: 8px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
.form-field select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234c1cc4' stroke-width='3'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 38px; }

@media (max-width: 559px) {
  .hero-copy { max-width: 64%; }
  .hero h1 { font-size: 28px; }
  .hero-show { width: 40%; right: 8px; height: 70%; }
  .show-card.s0 { width: 82%; left: 14%; top: 10%; }
  .show-card.s1 { width: 56%; left: -6%; top: 48%; }
  .show-card.s2 { display: none; }
  .show-card.s1 .show-price, .show-card.s1 .show-badge { display: none; }
  .show-price, .show-badge { font-size: 10px; padding: 2px 6px; }
}
.media-chip { position: absolute; left: 10px; bottom: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; background: rgba(18,4,46,.75); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }
.gallery-track { cursor: grab; user-select: none; }
.gallery-track img { -webkit-user-drag: none; }
.gallery.on-video .dots, .gallery.on-video .gallery-count { display: none; }
.thumbs .is-video .play { background: rgba(18,4,46,.55); }

/* Every photo fills the same fixed frame, whatever its original shape */
.card-media { overflow: hidden; }
.card-media > img, .card-media > .img-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-slide { position: relative; overflow: hidden; }
.gallery-slide > img, .gallery-slide > video, .gallery-slide > .img-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.cart-line .thumb, .tbl .thumb { position: relative; }
.cart-line .thumb img { position: absolute; inset: 0; }
.show-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ================= Product page v3 ================= */
.pdp { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "media" "info" "details"; }
.pdp-media { grid-area: media; min-width: 0; }
.pdp-info { grid-area: info; min-width: 0; }
.pdp-details { grid-area: details; min-width: 0; display: grid; gap: 14px; align-content: start; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) saturate(1.2); transform: scale(1.25); opacity: .55; }
.gallery-slide > .slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cat-chip { display: inline-block; background: var(--purple-50); color: var(--purple); font-weight: 800; font-size: 12px; padding: 5px 11px; border-radius: 99px; margin-bottom: 8px; }
.cat-chip:hover { background: var(--purple-100); }
.pdp-info h1 { margin-bottom: 6px; }
.pdp-info .rating { margin-bottom: 14px; }
.pdp-info .rating .count b { color: var(--ink); }
.price-card { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 16px; }
.price-card .pdp-price { margin: 0; gap: 10px; }
.price-card .price { font-size: 34px; color: var(--purple-900); line-height: 1; }
.pct { background: var(--red); color: #fff; font-weight: 900; font-size: 14px; padding: 4px 9px; border-radius: 8px; }
.save-line { color: var(--red); font-weight: 700; font-size: 14px; margin-top: 8px; display: flex; gap: 6px; align-items: center; }
.meta-lines { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 10px; display: grid; gap: 6px; }
.meta-lines .stock { margin: 0; }
.stock.low { color: #d4570a; }
.ship-line { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; color: #3a3550; }
.ship-line .icon { color: var(--purple); }
.order-box { padding: 18px 18px 14px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.qty-row label { font-weight: 700; font-size: 13.5px; }
.qty button:disabled { opacity: .3; cursor: not-allowed; }
.qty-max { color: #d4570a; font-weight: 700; font-size: 12.5px; }
.fields-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
.fields-grid > .errors { grid-column: 1 / -1; }
.summary-row.saving { color: #1a9c4a; }
.add-cart-btn { margin-top: 10px; }
.order-box form.button_to { margin: 0; }
.trust-line { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 12px; }
.trust-line .icon { color: #1a9c4a; }
.soldout-box { background: #fff; border-radius: 20px; box-shadow: var(--shadow); padding: 24px 18px; text-align: center; border: 2px dashed #f2c3c5; }
.soldout-box .big { font-size: 42px; }
.soldout-box b { display: block; font-size: 20px; color: var(--red); margin: 4px 0; }
.soldout-box p { color: var(--muted); margin: 0 0 14px; }
.pdp-details .perks { margin: 0; }
.perk span { display: flex; flex-direction: column; line-height: 1.25; }
.perk small { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.pdp-details .share-box { margin: 0; }
.muted { color: var(--muted); }
.desc { line-height: 1.6; }

@media (min-width: 900px) {
  .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "media info" "details info"; column-gap: 32px; row-gap: 20px; align-items: start; }
  .fields-grid { grid-template-columns: 1fr 1fr; }
  .fields-grid > .form-field:last-child { grid-column: 1 / -1; }
  .order-box { position: relative; }
}
.city-hint { font-size: 12px; margin-top: 5px; color: var(--muted); font-weight: 600; }
.city-hint.ok { color: #1a9c4a; }
.city-hint.warn { color: #d4570a; }

/* ---------- cards: stock states ---------- */
.stock-tag { position: absolute; right: 10px; bottom: 10px; z-index: 2; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 99px; }
.stock-tag.low { background: #fff1e6; color: #d4570a; }
.stock-tag.out { background: var(--ink); color: #fff; }
.card.is-soldout .card-media img { filter: grayscale(.8); opacity: .7; }
.card.is-soldout .price { color: var(--muted); }

/* ---------- cart / checkout ---------- */
.line-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pct.sm { font-size: 11px; padding: 2px 6px; border-radius: 6px; }
.line-note { color: #d4570a; font-size: 12px; font-weight: 700; margin-top: 4px; }
.line-actions .qty button:disabled { opacity: .3; cursor: not-allowed; }
.you-save { background: #e7f8ee; color: #157a3a; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-top: 10px; text-align: center; }
.divider-line { border-top: 1px solid var(--line); margin: 8px 0; }

/* ---------- listing toolbar & category header ---------- */
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.list-toolbar .count { color: var(--muted); font-weight: 600; font-size: 14px; }
.list-toolbar .count b { color: var(--ink); }
.sort-form { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; margin: 0; }
.sort-form select { border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-weight: 700; color: var(--purple-900); }
.cat-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--deep), var(--purple-800)); color: #fff; border-radius: 20px; padding: 18px; margin: 18px 0 16px; }
.cat-hero .cat-circle { width: 74px; height: 74px; flex-shrink: 0; }
.cat-hero h1 { margin: 0 0 4px; font-size: 24px; font-weight: 900; }
.cat-hero p { margin: 0; opacity: .8; font-size: 13.5px; font-weight: 600; }
@media (min-width: 768px) { .cat-hero { padding: 24px 28px; } .cat-hero h1 { font-size: 30px; } .cat-hero .cat-circle { width: 96px; height: 96px; } }
.summary-row span:last-child { white-space: nowrap; }
.summary-row.total span:first-child { font-size: .85em; }

/* ---------- sale countdown & sold count ---------- */
.countdown { margin-top: 12px; background: linear-gradient(135deg, #2a0a6b, #4c1cc4); color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cd-title { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13.5px; }
.cd-title .icon { color: var(--lime); }
.cd-boxes { display: flex; gap: 6px; }
.cd-unit { background: rgba(255,255,255,.12); border-radius: 10px; min-width: 50px; padding: 5px 6px; text-align: center; display: flex; flex-direction: column; line-height: 1.05; }
.cd-unit b { font-size: 20px; font-weight: 900; color: var(--lime); font-variant-numeric: tabular-nums; }
.cd-unit small { font-size: 10px; font-weight: 700; opacity: .8; }
.sold-line { display: flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; color: #d4570a; }
.card-timer { position: absolute; left: 10px; top: 42px; z-index: 2; display: inline-flex; align-items: center; gap: 3px; background: var(--purple-900); color: var(--lime); font-weight: 800; font-size: 11px; padding: 3px 8px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.ship-line { display: block; }
.ship-line .icon { vertical-align: -4px; margin-right: 4px; }
.sold-line b { margin: 0 2px; }

/* Category circles: on computers all categories fit in tidy rows */
@media (min-width: 1024px) {
  .cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px 4px; overflow: visible; }
  .cats .cat { width: auto; font-size: 13px; }
  .cats .cat-circle { width: 84px; height: 84px; }
  .cat-nav a { padding: 13px 12px; font-size: 14px; }
}

/* Line icons in place of emoji */
.cat-emoji { display: grid; place-items: center; color: var(--purple); }
.cat-emoji .icon { width: 36px; height: 36px; }
.drawer nav .emoji { color: var(--purple); }
.img-placeholder { color: var(--purple); }
.img-placeholder .icon { width: 34%; height: 34%; max-width: 110px; max-height: 110px; opacity: .55; }
.empty .big, .soldout-box .big { color: var(--purple); line-height: 0; }
.empty .big .icon { width: 64px; height: 64px; }
.soldout-box .big .icon { width: 44px; height: 44px; }
.you-save { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.site-footer a.with-icon { display: flex; align-items: center; gap: 8px; }
