/* GCSTORE — Rainbow gradient theme (same UI, colorful) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --green: #16a34a;
  --green-light: #22c55e;
  --red: #ef4444;
  --yellow: #eab308;
  --pink: #ec4899;
  --blue: #3b82f6;
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #22c55e;
  --primary-soft: rgba(22, 163, 74, 0.12);
  --primary-border: rgba(22, 163, 74, 0.35);
  --grad-main: linear-gradient(135deg, #16a34a 0%, #3b82f6 35%, #ec4899 65%, #eab308 100%);
  --grad-btn: linear-gradient(135deg, #16a34a, #22c55e);
  --grad-hero: linear-gradient(135deg, #3b82f6 0%, #ec4899 40%, #ef4444 70%, #eab308 100%);
  --grad-warm: linear-gradient(135deg, #ef4444, #ec4899, #eab308);
  --grad-cool: linear-gradient(135deg, #16a34a, #3b82f6);
  --bg: #f4f7ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --danger: #ef4444;
  --success: #16a34a;
  --brand: #16a34a;
  --shadow: 0 8px 28px rgba(59, 130, 246, 0.1);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --header-h: 56px;
  --header-total: calc(var(--header-h) + 2px);
  --header-red: #e53935;
  --header-red-dark: #c62828;
  --header-black: #0a0a0a;
  --header-shell: #111111;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --content-max: 1280px;
  --gutter: clamp(12px, 3.5vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: linear-gradient(160deg, #eff6ff 0%, #fdf2f8 35%, #fefce8 70%, #f0fdf4 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; height: auto; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: 16px; }
.container {
  width: min(100% - (var(--gutter) * 2), var(--content-max));
  margin-inline: auto;
}
.container-fluid {
  width: 100%;
  padding-inline: var(--gutter);
}
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

/* ── Header (dark premium) ── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10003;
  padding: 0;
  background: var(--header-black);
  border: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.header-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  background: linear-gradient(180deg, #141414 0%, var(--header-black) 100%);
  border-radius: 0;
  border: none;
  border-bottom: 2px solid var(--header-red);
  box-shadow: 0 3px 16px rgba(229, 57, 53, 0.18);
}
body.menu-open .top-bar { z-index: 10005; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; min-height: var(--header-h);
  padding: 4px clamp(14px, 3vw, 36px);
  position: relative; z-index: 10004;
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
}
.logo-wrap {
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; position: relative; z-index: 1; line-height: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: radial-gradient(ellipse at center, rgba(229, 57, 53, 0.14) 0%, rgba(20, 20, 20, 0.9) 68%);
  border: 1px solid rgba(229, 57, 53, 0.18);
}
.logo-img {
  height: clamp(30px, 3.8vw, 38px);
  width: auto;
  max-width: min(120px, 30vw);
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.header-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; position: relative; z-index: 1;
}
.header-balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  border: 1.5px solid var(--header-red);
  background: rgba(0, 0, 0, 0.35);
  color: #fff; font-weight: 600; font-size: 0.78rem;
  white-space: nowrap; transition: 0.2s var(--ease);
}
.header-balance-pill:hover {
  background: rgba(229, 57, 53, 0.12);
  box-shadow: 0 0 18px rgba(229, 57, 53, 0.25);
}
.header-balance-pill > .bi-wallet2 { color: var(--header-red); font-size: 0.9rem; }
.balance-chev { font-size: 0.65rem; opacity: 0.85; }
.menu-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; font-size: 1.2rem;
  color: #fff; border-radius: 10px;
  border: 1px solid rgba(229, 57, 53, 0.45);
  background: rgba(229, 57, 53, 0.1);
  transition: 0.2s var(--ease);
}
.menu-toggle:hover { background: var(--header-red); border-color: var(--header-red); }
.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10001; opacity: 0; pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.nav-overlay:not([hidden]) { opacity: 1; pointer-events: auto; }
.nav-links {
  position: fixed;
  top: calc(var(--header-total) + 8px);
  right: 12px;
  width: min(300px, calc(100vw - 24px));
  max-height: calc(100dvh - var(--header-h) - 30px);
  background: linear-gradient(180deg, #161616 0%, #0a0a0a 100%);
  border: 1px solid rgba(229, 57, 53, 0.35);
  border-radius: 14px;
  padding: 10px 0 calc(16px + env(safe-area-inset-bottom, 0));
  transform: translateX(calc(100% + 20px));
  transition: transform 0.35s var(--ease);
  z-index: 10002;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow-y: auto; overscroll-behavior: contain;
}
.nav-links.open { transform: translateX(0); }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255, 255, 255, 0.88);
  padding: 12px 18px;
  font-weight: 500; font-size: 0.92rem;
  transition: 0.2s; min-height: 48px;
  position: relative;
}
.nav-item:hover, .nav-item:focus-visible {
  background: rgba(229, 57, 53, 0.1);
  color: #fff;
}
.nav-item.active { color: var(--header-red); }
.nav-item.active .nav-icon-wrap { color: var(--header-red); }
.nav-icon-wrap {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; min-width: 22px;
  color: inherit;
}
.nav-label { flex: 1; line-height: 1.2; }
.nav-chev { font-size: 0.62rem; margin-left: 2px; vertical-align: middle; opacity: 0.9; }
.nav-badge {
  position: absolute; top: -7px; right: -10px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--header-red); color: #fff;
  font-size: 0.62rem; font-weight: 700;
  border-radius: 999px; display: inline-flex;
  align-items: center; justify-content: center;
  border: 1.5px solid #111;
  line-height: 1;
}
.search-section { padding: clamp(12px, 2vw, 20px) 0 clamp(6px, 1.2vw, 12px); }
.search-bar {
  display: flex; gap: 10px; align-items: stretch; background: var(--surface);
  box-shadow: var(--shadow); border-radius: var(--radius); padding: 8px 8px 8px 16px;
  border: 1px solid rgba(59,130,246,0.15);
}
.search-input {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--text);
  outline: none; padding: 10px 0;
}
.search-input::placeholder { color: var(--text-light); }
.search-btn {
  padding: 12px 20px; border: none; background: var(--grad-cool); color: #fff;
  border-radius: var(--radius-sm); font-weight: 700; white-space: nowrap; min-height: 44px;
  transition: filter 0.2s, transform 0.15s;
}
.search-btn:hover { filter: brightness(1.06); }
.search-btn:active { transform: scale(0.98); }
.banner-section { margin: clamp(6px, 1.2vw, 12px) 0 clamp(16px, 3vw, 28px); }
.slider-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(59,130,246,0.15);
  width: 100%;
  aspect-ratio: 1440 / 274;
  max-height: clamp(150px, 20vw, 320px);
  background: #fff;
}
.slider-track { display: flex; width: 100%; height: 100%; transition: transform 0.6s var(--ease); }
.slide {
  flex: 0 0 100%; width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
}
.slide-img {
  width: 100%; height: 100%; display: block;
  object-fit: cover; object-position: center center;
}
.slider-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 2; padding: 6px 12px;
  background: rgba(15,23,42,0.45); border-radius: 999px; backdrop-filter: blur(6px);
}
.slider-dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,0.45); cursor: pointer; transition: 0.25s;
}
.slider-dot.active { background: #fff; width: 22px; border-radius: 999px; }
@media (min-width: 993px) {
  .slider-wrapper { aspect-ratio: 1440 / 274; max-height: 300px; }
}
@media (max-width: 768px) {
  .slider-wrapper {
    aspect-ratio: unset;
    height: clamp(152px, 44vw, 220px);
    max-height: none;
    border-radius: var(--radius-sm);
  }
  .slide-img { object-fit: cover; object-position: center center; }
  .slider-dots { bottom: 6px; gap: 5px; padding: 4px 8px; max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; }
  .slider-dot { width: 6px; height: 6px; flex-shrink: 0; }
  .slider-dot.active { width: 14px; }
}
@media (max-width: 480px) {
  .slider-wrapper { height: clamp(140px, 46vw, 190px); }
  .slider-dots { padding: 3px 6px; gap: 4px; bottom: 5px; }
  .slider-dot { width: 5px; height: 5px; }
  .slider-dot.active { width: 12px; }
}
@media (min-width: 993px) {
  .menu-toggle { display: none; }
  .nav-overlay { display: none !important; }
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px 20px;
    padding: 2px clamp(16px, 2.5vw, 40px);
    max-width: none;
  }
  .nav-links {
    position: static; transform: none; width: 100%; max-height: none;
    display: flex; flex-wrap: nowrap; justify-content: space-evenly; align-items: stretch;
    gap: 4px 12px; padding: 0 8px; border: none; box-shadow: none; overflow: visible;
    background: transparent;
  }
  .nav-item {
    flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 4px 14px 5px;
    min-height: 50px; min-width: 0;
    font-size: 0.62rem; font-weight: 500;
    color: rgba(255, 255, 255, 0.82);
    text-align: center;
  }
  .nav-item:hover, .nav-item:focus-visible {
    color: #fff;
    background: transparent;
  }
  .nav-item.active { color: var(--header-red); }
  .nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 2px;
    background: var(--header-red);
    border-radius: 2px;
  }
  .nav-icon-wrap { font-size: 0.95rem; min-width: 0; }
  .nav-label { flex: unset; white-space: nowrap; }
  .nav-chev { display: inline-block; }
  .logo-wrap { order: -1; }
  .header-actions { order: 1; }
}
@media (max-width: 992px) {
  .header-balance-pill .balance-amt { display: none; }
  .header-balance-pill .balance-chev { display: none; }
  .header-balance-pill {
    width: 36px; height: 36px; padding: 0;
    justify-content: center;
  }
  .nav-links { display: flex; flex-direction: column; }
}
.page-main {
  min-height: 60vh;
  padding-top: var(--header-total);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.section { padding: clamp(8px, 2vw, 16px) 0 clamp(32px, 5vw, 56px); }
.section > .container > h2 {
  text-align: center; margin: 20px 0 24px; font-size: 1.6rem; font-weight: 800;
  background: var(--grad-main); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.grid > .card { min-width: 0; }
@media (max-width: 992px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: 0.25s; box-shadow: var(--shadow);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(236,72,153,0.15); border-color: #ec4899; }
.card-thumb { height: 150px; background-size: cover; background-position: center; background-color: var(--surface-2); }
.card-body { padding: 14px; font-size: 0.9rem; }
.card-body h3 {
  font-size: 1rem; margin-bottom: 5px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card-desc { font-size: 0.82rem; color: var(--text-muted); min-height: 40px; margin-bottom: 6px; line-height: 1.45; }
.card-price {
  font-size: 1.05rem; font-weight: 800; color: var(--primary); margin-bottom: 10px;
  background: linear-gradient(90deg, var(--green), var(--blue)); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent;
}
.btn-primary.small {
  width: 100%; padding: 8px; background: var(--grad-btn); color: #fff; border: none;
  border-radius: 8px; font-size: 0.82rem; font-weight: 700;
}
.btn-primary.small:hover { filter: brightness(1.06); }
.btn-primary.small.btn-loading {
  opacity: 0.85; pointer-events: none; position: relative; color: transparent;
}
.btn-primary.small.btn-loading::after {
  content: ''; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-soldout {
  width: 100%; padding: 8px; border-radius: 8px; background: var(--surface-2);
  color: var(--text-light); font-weight: 700; font-size: 0.82rem; text-align: center;
  border: 1px dashed var(--border);
}
.cart-notification {
  position: fixed; top: 80px; right: 16px; background: var(--grad-cool); color: #fff;
  padding: 14px 18px; border-radius: var(--radius); z-index: 10001;
  transform: translateX(120%); transition: 0.3s; font-weight: 600;
}
.cart-notification.show { transform: translateX(0); }
.cart-notification.error { background: linear-gradient(135deg, #ef4444, #ec4899); }

.product-wrap { max-width: 900px; margin: 0 auto; padding: 24px 16px 48px; }
.product-wrap h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 16px; }
.card-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; border: 1px solid var(--border); }
.price-box { display: flex; gap: 10px; flex-wrap: wrap; margin: 15px 0; }
.price-item {
  background: var(--surface); border: 2px solid var(--border); padding: 10px 16px;
  border-radius: 8px; cursor: pointer; font-weight: 700; transition: 0.2s;
}
.price-item.active, .price-item:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.btn-red {
  padding: 12px; width: 100%; background: var(--primary); border: none; border-radius: 8px;
  color: #fff; font-weight: 700; cursor: pointer; margin-top: 10px;
}
.btn-red:hover { background: var(--primary-dark); }

.cart-header { text-align: center; padding: 48px 0 28px; background: var(--surface); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.cart-header h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); font-weight: 800; color: var(--primary); }
.cart-subtitle { color: var(--text-muted); margin-top: 6px; }
.cart-content { display: grid; grid-template-columns: 1fr 340px; gap: 24px; margin-bottom: 40px; }
@media (max-width: 992px) { .cart-content { grid-template-columns: 1fr; } }
.cart-item {
  display: flex; background: var(--surface); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); border: 1px solid var(--border); margin-bottom: 16px; gap: 16px;
}
.item-image {
  width: 110px; height: 110px; border-radius: 10px; background: var(--surface-2);
  flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.item-image img { width: 100%; height: 100%; object-fit: cover; }
.item-details { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.item-title { font-size: 1.05rem; font-weight: 700; }
.item-price { color: var(--primary); font-weight: 700; margin-bottom: 10px; }
.qty-controls { display: flex; align-items: center; gap: 8px; }
.qty-btn { background: var(--primary); color: #fff; border: none; width: 34px; height: 34px; border-radius: 50%; font-weight: 700; }
.qty-display { background: var(--surface-2); border-radius: 8px; padding: 6px 14px; font-weight: 700; min-width: 44px; text-align: center; }
.remove-btn { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; }
.remove-btn:hover { border-color: var(--danger); color: var(--danger); }
.item-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.item-subtotal { font-size: 1.1rem; font-weight: 800; color: var(--success); align-self: center; white-space: nowrap; }
.cart-clear-form { margin-bottom: 40px; }
.cart-summary {
  background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  border: 1px solid var(--border); height: fit-content; position: sticky; top: 80px;
}
.summary-title { font-size: 1.15rem; font-weight: 800; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--text-muted); }
.summary-total { font-size: 1.2rem; font-weight: 800; color: var(--primary); margin: 16px 0; padding-top: 12px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; }
.summary-actions { display: flex; flex-direction: column; gap: 10px; }
.checkout-btn { background: var(--primary); color: #fff; padding: 14px; border-radius: 10px; font-weight: 700; text-align: center; display: block; }
.checkout-btn:hover { background: var(--primary-dark); }
.continue-shopping { text-align: center; padding: 12px; border: 1px solid var(--border); border-radius: 8px; color: var(--text-muted); }
.continue-shopping:hover { border-color: var(--primary); color: var(--primary); }
.empty-cart { text-align: center; padding: 48px 20px; background: var(--surface); border-radius: var(--radius); border: 2px dashed var(--primary-border); }
.empty-cart-icon { font-size: 3rem; margin-bottom: 12px; line-height: 1; }
.shop-btn { display: inline-block; background: var(--primary); color: #fff; padding: 12px 28px; border-radius: 999px; font-weight: 700; margin-top: 8px; }
.clear-cart { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: 10px 20px; border-radius: 999px; margin-top: 16px; }

.checkout-container { max-width: 900px; margin: 24px auto; padding: 0 16px 48px; }
.checkout-container .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.checkout-container .card h3 { color: var(--primary); margin-bottom: 12px; }
.summary-list { list-style: none; }
.summary-list li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.wallet-box { background: var(--primary-soft); padding: 12px; border-radius: 10px; margin-bottom: 12px; }
.btn-pay { width: 100%; background: var(--primary); border: none; padding: 14px; font-weight: 700; border-radius: 10px; color: #fff; }
.btn-pay:disabled { background: #94a3b8; }
.error-box { background: rgba(239,68,68,0.1); color: var(--danger); padding: 12px; border-radius: 8px; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } .cart-item { flex-direction: column; } .item-image { width: 100%; height: 140px; } }

.auth-section {
  display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px;
  background: linear-gradient(135deg, var(--bg) 0%, rgba(22,163,74,0.06) 100%);
}
.auth-card {
  background: var(--surface); padding: 36px 32px; width: 100%; max-width: 400px;
  border-radius: 16px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.auth-card h2 { text-align: center; font-size: 1.6rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; }
.auth-card label { font-size: 0.88rem; font-weight: 600; display: block; margin-bottom: 4px; }
.auth-card input {
  width: 100%; padding: 11px 12px; margin-bottom: 12px; background: var(--bg);
  border: 1px solid var(--border); color: var(--text); border-radius: 8px; outline: none;
}
.auth-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.alert-error { background: rgba(239,68,68,0.1); padding: 10px; margin-bottom: 12px; color: var(--danger); border-left: 4px solid var(--danger); }
.alert-info { background: rgba(59,130,246,0.1); padding: 10px; margin-bottom: 12px; color: #2563eb; border-left: 4px solid #2563eb; }
.auth-card .btn-primary { width: 100%; padding: 12px; background: var(--primary); border: none; border-radius: 8px; font-weight: 700; color: #fff; }
.auth-switch { margin-top: 14px; text-align: center; font-size: 0.9rem; }
.auth-switch a { color: var(--primary); font-weight: 700; }
.forgot-link { text-align: right; margin: -6px 0 12px; }
.forgot-link a { color: var(--primary); font-size: 0.85rem; }

.orders-page { padding: 40px 0; min-height: 60vh; }
.orders-page .section-header h2 { font-size: 2rem; text-align: center; font-weight: 800; color: var(--primary); margin-bottom: 28px; }
.order-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; padding: 18px; box-shadow: var(--shadow); }
.status-paid { color: var(--success); font-weight: 700; }
.status-pending { color: #f59e0b; font-weight: 700; }
.status-failed { color: var(--danger); font-weight: 700; }
.order-box .item { background: var(--bg); border-left: 4px solid var(--primary); padding: 10px; border-radius: 8px; margin-bottom: 10px; }
.code-text { background: var(--surface-2); padding: 4px 8px; border-radius: 6px; font-family: monospace; color: var(--primary); }
.copy-btn { background: var(--primary); color: #fff; border: none; padding: 4px 10px; border-radius: 6px; font-size: 0.78rem; }

.footer {
  background: var(--text); color: rgba(255,255,255,0.8); border-top: 3px solid var(--primary);
  padding: 40px 0 20px; margin-top: 60px;
}
.footer-content {
  width: min(100% - (var(--gutter) * 2), var(--content-max));
  margin: 0 auto;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer-brand h3 { color: var(--primary-light); font-size: 1.5rem; font-weight: 800; margin-bottom: 12px; }
.footer-brand p { color: rgba(255,255,255,0.65); line-height: 1.6; font-size: 0.92rem; }
.trust-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.badge { background: rgba(22,163,74,0.15); border: 1px solid rgba(22,163,74,0.35); color: #86efac; padding: 5px 12px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; }
.security-badges { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 12px; }
.security-badge i { color: var(--primary-light); }
.footer-bottom-links a { color: rgba(255,255,255,0.7); margin: 0 12px; font-size: 0.88rem; }
.footer-bottom-links a:hover { color: var(--primary-light); }
.copyright { color: rgba(255,255,255,0.45); font-size: 0.82rem; margin-top: 8px; }
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .trust-badges, .security-badges { justify-content: center; }
}

/* Shared buttons & utilities */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; font-weight: 700; border: none;
  cursor: pointer; text-align: center; transition: 0.2s; font-size: 0.92rem;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; display: flex; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn-lg { padding: 14px 20px; font-size: 1rem; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--primary); font-weight: 700; }

/* Page banner (wallet, etc.) */
.page-banner {
  text-align: center; padding: 40px 0 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); margin-bottom: 24px;
}
.page-banner h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; color: var(--primary); }
.page-banner p { color: var(--text-muted); margin-top: 6px; }
.page-body { padding-bottom: 48px; }

/* Wallet */
.wallet-hero {
  background: var(--grad-hero);
  color: #fff; border-radius: var(--radius); padding: 32px 24px; text-align: center;
  margin-bottom: 24px; box-shadow: 0 12px 36px rgba(236,72,153,0.25);
}
.wallet-hero .amt { font-size: 2.4rem; font-weight: 800; margin: 10px 0 18px; }
.wallet-hero .btn-secondary { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.35); color: #fff; }
.wallet-hero .btn-secondary:hover { background: #fff; color: var(--primary-dark); }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.panel h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 16px; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.tx {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.tx:last-child { border-bottom: none; }
.tx h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 2px; }
.tx span { font-size: 0.82rem; color: var(--text-muted); }
.tx .val { font-weight: 800; font-size: 1rem; white-space: nowrap; }
.tx .val.up { color: var(--success); }
.tx .val.down { color: var(--danger); }
.empty { text-align: center; padding: 24px; border: 2px dashed var(--primary-border); border-radius: var(--radius); }
.info-box {
  background: var(--primary-soft); border: 1px solid var(--primary-border);
  border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.info-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--primary-dark); padding: 4px 0; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 4px; }
.field input {
  width: 100%; padding: 11px 12px; margin-bottom: 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; outline: none;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 0.9rem; }
.alert-error { background: rgba(239,68,68,0.1); color: var(--danger); border-left: 4px solid var(--danger); }

/* Success / 404 box */
.success-box {
  max-width: 520px; margin: 48px auto; padding: 36px 28px; text-align: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.success-icon {
  width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); display: flex;
  align-items: center; justify-content: center; font-size: 2rem;
}
.success-box .meta {
  background: var(--bg); border-radius: 10px; padding: 14px; margin: 18px 0;
  text-align: left; display: grid; gap: 10px;
}
.success-box .meta div { display: flex; justify-content: space-between; gap: 12px; }
.success-box .btn { margin: 4px; }
.badge-paid {
  background: var(--primary-soft); color: var(--primary-dark); padding: 3px 10px;
  border-radius: 999px; font-size: 0.82rem; font-weight: 700;
}

/* Static content pages */
.static-page {
  max-width: 900px; margin: 32px auto 48px; padding: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.static-page h1 { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin-bottom: 14px; }
.static-page h2 { font-size: 1.15rem; font-weight: 700; color: var(--primary-dark); margin: 24px 0 10px; }
.static-page p, .static-page li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }
.static-page ul { padding-left: 22px; margin: 8px 0; }
.static-page li { margin-bottom: 4px; }
.static-page .back-link { display: inline-block; margin-top: 20px; color: var(--primary); font-weight: 700; }

.static-page section {
  margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.static-page h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 14px 0 8px; }

/* Orders extras */
.card-name { font-weight: 700; margin-bottom: 4px; }

/* Offer popup */
.offer-popup {
  position: fixed; bottom: -250px; left: 50%; transform: translateX(-50%);
  width: min(92%, 420px); background: var(--surface); color: var(--text);
  padding: 20px 25px; border-radius: 14px; box-shadow: var(--shadow);
  border: 2px solid var(--primary); text-align: center; z-index: 999999;
  opacity: 0; transition: 0.6s ease;
}
.offer-popup.show { bottom: 30px; opacity: 1; }
.close-offer {
  position: absolute; right: 12px; top: 10px; font-size: 20px; cursor: pointer;
  color: var(--primary); font-weight: 900; background: none; border: none;
}
.offer-title { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.offer-sub { color: var(--text-muted); font-size: 0.95rem; margin-top: 6px; }

/* Support tickets */
.support-page { max-width: 800px; }
.support-page .panel { margin-bottom: 24px; }
.support-page textarea {
  width: 100%; padding: 11px 12px; margin-bottom: 12px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; outline: none; resize: vertical;
}
.support-page textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.support-page input[type="file"] { margin-bottom: 12px; }
.ticket-box {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; margin-bottom: 16px; border-left: 4px solid var(--primary);
}
.ticket-header { font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.user-msg, .admin-reply {
  background: var(--surface); padding: 12px; border-radius: 8px; margin-bottom: 10px; font-size: 0.92rem;
}
.admin-reply { border-left: 4px solid #f59e0b; }
.ss-img { max-width: 220px; border-radius: 8px; margin-top: 8px; border: 1px solid var(--border); }
.ticket-date { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }
.alert-info {
  background: linear-gradient(90deg, rgba(59,130,246,0.12), rgba(236,72,153,0.08));
  padding: 10px 12px; margin-bottom: 12px; color: #1d4ed8; border-left: 4px solid var(--blue); border-radius: 8px;
}

/* Wallet page extras */
.wallet-page .wallet-label { opacity: 0.95; font-size: 0.9rem; }
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 24px; }
@media (max-width: 768px) { .quick-actions { grid-template-columns: repeat(2, 1fr); } }
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 600; transition: 0.2s; text-align: center;
}
.quick-action-btn:hover { background: linear-gradient(135deg, rgba(22,163,74,0.1), rgba(59,130,246,0.1)); transform: translateY(-2px); }
.quick-action-btn i { font-size: 1.2rem; color: var(--blue); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.tx-count { font-size: 0.82rem; color: var(--text-muted); }
.tx-list { display: flex; flex-direction: column; gap: 10px; }
.tx-item { background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.tx-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.tx-id { font-weight: 700; font-size: 0.88rem; }
.tx-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.badge-credit { background: rgba(22,163,74,0.15); color: var(--green); }
.badge-debit { background: rgba(239,68,68,0.12); color: var(--red); }
.badge-pending { background: rgba(234,179,8,0.15); color: #b45309; }
.badge-failed { background: rgba(239,68,68,0.12); color: var(--red); }
.tx-item-mid { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.val.pending { color: #b45309; }
.val.failed { color: var(--red); opacity: 0.7; }
.add-money-box { max-width: 460px; margin-inline: auto; }
.offer-popup { border: 2px solid transparent; background: linear-gradient(#fff,#fff) padding-box, var(--grad-warm) border-box; }
.offer-title { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ── Production responsive polish ── */
.top-bar { padding-top: env(safe-area-inset-top, 0); }
:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
@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;
  }
}

@media (max-width: 992px) {
  .cart-summary { position: static; }
  .section > .container > h2 { font-size: 1.35rem; margin: 16px 0 20px; }
  .wallet-hero .amt { font-size: 2rem; }
  .static-page { margin: 20px 12px 40px; padding: 22px 18px; }
  .product-wrap { padding: 16px 12px 40px; }
  .checkout-container { padding: 0 12px 40px; }
}

@media (max-width: 768px) {
  :root { --header-h: 50px; --header-total: calc(var(--header-h) + 2px); }
  .header-inner { padding: 3px 12px; max-width: none; }
  .search-section { padding: 10px 0 6px; }
  .search-bar { flex-direction: column; padding: 10px; gap: 8px; }
  .search-input { padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); }
  .search-btn { width: 100%; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card-thumb { height: 110px; }
  .card-body { padding: 10px; }
  .card-body h3 { font-size: 0.9rem; line-height: 1.3; }
  .card-desc { font-size: 0.75rem; min-height: 34px; margin-bottom: 4px; }
  .card-price { font-size: 0.95rem; margin-bottom: 8px; }
  .btn-primary.small, .btn-soldout { padding: 10px 6px; font-size: 0.78rem; min-height: 40px; }
  .cart-header { padding: 32px 0 20px; }
  .cart-item { padding: 14px; gap: 12px; }
  .item-image { width: 88px; height: 88px; }
  .item-title { font-size: 0.95rem; }
  .qty-btn { width: 40px; height: 40px; }
  .checkout-btn, .btn-pay, .auth-card .btn-primary { min-height: 48px; }
  .page-banner { padding: 28px 0 20px; }
  .wallet-hero { padding: 24px 16px; }
  .panel { padding: 16px; }
  .tx-item-mid { flex-direction: column; align-items: flex-start; gap: 6px; }
  .tx-item-mid .val { align-self: flex-end; }
  .cart-notification {
    left: 12px; right: 12px; top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0));
    transform: translateY(120%); text-align: center;
  }
  .cart-notification.show { transform: translateY(0); }
  .offer-popup.show { bottom: calc(16px + env(safe-area-inset-bottom, 0)); }
  .auth-section { padding: 16px; align-items: flex-start; padding-top: max(16px, env(safe-area-inset-top)); }
  .auth-card { padding: 28px 20px; border-radius: var(--radius); }
  .orders-page { padding: 24px 0; }
  .orders-page .section-header h2 { font-size: 1.5rem; margin-bottom: 20px; }
  .order-box { padding: 14px; }
  .footer { padding: 32px 0 calc(20px + env(safe-area-inset-bottom, 0)); margin-top: 40px; }
}

@media (max-width: 480px) {
  :root { --gutter: 12px; }
  .header-inner { gap: 6px; padding: 3px 8px; }
  .logo-img { height: clamp(28px, 8vw, 34px); max-width: min(110px, 32vw); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-thumb { height: 95px; }
  .card-body { padding: 8px; }
  .card-body h3 { font-size: 0.82rem; }
  .card-desc { font-size: 0.7rem; min-height: 28px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
  .card-price { font-size: 0.85rem; margin-bottom: 6px; }
  .btn-primary.small, .btn-soldout { font-size: 0.72rem; padding: 8px 4px; min-height: 36px; }
  .cart-item { flex-direction: column; }
  .item-image { width: 100%; height: 140px; }
  .item-subtotal { align-self: flex-start; font-size: 1.2rem; }
  .price-box { gap: 8px; }
  .price-item { flex: 1 1 calc(50% - 8px); text-align: center; padding: 10px 8px; font-size: 0.9rem; }
  .quick-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .quick-action-btn { padding: 12px 6px; font-size: 0.78rem; }
  .ss-img { max-width: 100%; }
  .success-box { margin: 24px 12px; padding: 28px 18px; }
}

@media (min-width: 993px) and (max-width: 1180px) {
  .nav-item { padding: 4px 10px; font-size: 0.58rem; }
  .nav-links { gap: 4px 8px; padding: 0 4px; }
  .nav-icon-wrap { font-size: 0.88rem; }
  .header-balance-pill { padding: 5px 10px; font-size: 0.74rem; }
  .logo-img { height: 32px; max-width: 100px; }
}

@media (min-width: 768px) {
  :root { --gutter: clamp(16px, 3vw, 32px); }
}

@media (min-width: 1200px) {
  :root {
    --content-max: 1320px;
    --gutter: clamp(24px, 4vw, 48px);
  }
  .grid { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
  .card-thumb { height: 165px; }
}

@media (min-width: 1600px) {
  :root {
    --content-max: 1400px;
    --gutter: 48px;
  }
}
