/**
 * BAZAAR Storefront Theme
 * Supports both dark (default) and light modes
 * via [data-theme] on <html> element
 */

/* ══════════════════════════════════════════════
   DARK THEME (default)
   ══════════════════════════════════════════════ */
html[data-theme="dark"] {
  --bg:         #0d0f1a;
  --card-bg:    #141625;
  --border:     #252840;
  --text:       #e8eaf6;
  --text-muted: #7b7fa8;
  --subtle:     #1a1e30;

  --gold:       #d4a017;
  --gold-light: #f0c842;
  --gold-dark:  #b8861a;
  --gold-glow:  rgba(212,160,23,.22);
  --gold-subtle:rgba(212,160,23,.08);

  --primary:       #d4a017;
  --primary-light: #f0c842;
  --primary-dark:  #b8861a;
  --primary-glow:  rgba(212,160,23,.22);
  --primary-soft:  rgba(212,160,23,.08);

  --shadow-sm: 0 2px 8px rgba(0,0,0,.5);
  --shadow:    0 4px 18px rgba(0,0,0,.5);
  --shadow-md: 0 8px 32px rgba(0,0,0,.6);
  --shadow-lg: 0 18px 56px rgba(0,0,0,.7);
}

/* ══════════════════════════════════════════════
   LIGHT THEME
   ══════════════════════════════════════════════ */
html[data-theme="light"] {
  --bg:         #f7f8fc;
  --card-bg:    #ffffff;
  --border:     #e2e5f0;
  --text:       #1a1d2e;
  --text-muted: #6b7280;
  --subtle:     #eef0f8;

  --gold:       #c09010;
  --gold-light: #d4a820;
  --gold-dark:  #a07800;
  --gold-glow:  rgba(192,144,16,.18);
  --gold-subtle:rgba(192,144,16,.08);

  --primary:       #c09010;
  --primary-light: #d4a820;
  --primary-dark:  #a07800;
  --primary-glow:  rgba(192,144,16,.18);
  --primary-soft:  rgba(192,144,16,.06);

  --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
  --shadow:    0 4px 18px rgba(0,0,0,.09);
  --shadow-md: 0 8px 32px rgba(0,0,0,.12);
  --shadow-lg: 0 18px 56px rgba(0,0,0,.16);
}

/* ══════════════════════════════════════════════
   BASE — applies to both themes via variables
   ══════════════════════════════════════════════ */
body.storefront {
  background: var(--bg);
  color: var(--text);
  transition: background .3s ease, color .3s ease;
}

/* ── Top Bar ─────────────────────────────────── */
html[data-theme="dark"] .top-bar {
  background: #080a12;
  border-bottom: 1px solid rgba(212,160,23,.12);
  color: #6a6e88;
}
html[data-theme="light"] .top-bar {
  background: #ffffff;
  border-bottom: 1px solid #e2e5f0;
  color: #6b7280;
}
.top-bar-links a {
  color: var(--text-muted);
  transition: color .2s;
}
.top-bar-links a:hover {
  color: var(--gold) !important;
  opacity: 1 !important;
}
.top-bar-links .login {
  background: var(--gold-subtle) !important;
  color: var(--gold) !important;
  border: 1px solid var(--gold-glow) !important;
}
.top-bar-links .register {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  color: #fff !important;
}
html[data-theme="light"] .top-bar-links .register {
  color: #1a1d2e !important;
}

/* ── Main Header ─────────────────────────────── */
html[data-theme="dark"] .main-header {
  background: rgba(13,15,26,.95) !important;
  border-bottom: 1px solid rgba(212,160,23,.15) !important;
  box-shadow: 0 2px 24px rgba(0,0,0,.5) !important;
}
html[data-theme="light"] .main-header {
  background: rgba(255,255,255,.97) !important;
  border-bottom: 1px solid #e2e5f0 !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.07) !important;
}
html[data-theme="dark"] .main-header.scrolled {
  background: rgba(8,10,18,.98) !important;
  border-bottom-color: rgba(212,160,23,.25) !important;
}
html[data-theme="light"] .main-header.scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.1) !important;
}

/* Logo always gold */
.logo-icon {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  box-shadow: 0 4px 16px var(--gold-glow) !important;
}
.logo-text {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* Nav links */
.nav-links a {
  color: var(--text-muted) !important;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold) !important;
}
.nav-links a::after {
  background: linear-gradient(90deg, var(--gold-dark), var(--gold)) !important;
}

/* Header buttons */
html[data-theme="dark"] .header-btn {
  background: rgba(212,160,23,.06) !important;
  border: 1px solid rgba(212,160,23,.12) !important;
  color: #7b7fa8 !important;
}
html[data-theme="light"] .header-btn {
  background: var(--subtle) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
}
.header-btn:hover {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
}
html[data-theme="light"] .header-btn:hover {
  color: #1a1d2e !important;
}

/* ── Hero ─────────────────────────────────────── */
html[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #080a12 0%, #0d0f1a 40%, #111320 100%) !important;
}
html[data-theme="light"] .hero {
  background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%) !important;
}
html[data-theme="dark"] .hero h1 { color: #e8eaf6 !important; }
html[data-theme="dark"] .hero p { color: rgba(232,234,246,.65) !important; }
html[data-theme="light"] .hero h1 { color: #1a1d2e !important; }
html[data-theme="light"] .hero p { color: #475569 !important; }

.hero-badge {
  background: rgba(212,160,23,.1) !important;
  border-color: rgba(212,160,23,.2) !important;
  color: var(--gold) !important;
}
html[data-theme="light"] .hero-badge {
  background: rgba(192,144,16,.08) !important;
  border-color: rgba(192,144,16,.25) !important;
  color: var(--gold) !important;
}
html[data-theme="dark"] .hero-image-card {
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(212,160,23,.12) !important;
}
html[data-theme="light"] .hero-image-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 25px rgba(0,0,0,.04) !important;
}
.hero-stat-value { color: var(--gold) !important; }
html[data-theme="dark"] .hero-stat-item {
  background: rgba(212,160,23,.05) !important;
  border-color: rgba(212,160,23,.12) !important;
}
html[data-theme="light"] .hero-stat-item {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.03) !important;
}
html[data-theme="dark"] .hero-stat-item:hover {
  background: rgba(212,160,23,.1) !important;
}
html[data-theme="light"] .hero-stat-item:hover {
  background: #f8fafc !important;
}

/* ── Section backgrounds ──────────────────────── */
html[data-theme="dark"] .section,
html[data-theme="dark"] body.storefront {
  background: #0d0f1a;
}
html[data-theme="light"] .section,
html[data-theme="light"] body.storefront {
  background: #f7f8fc;
}
html[data-theme="dark"] .section:nth-child(even),
html[data-theme="dark"] #categories {
  background: #0a0c17 !important;
}
html[data-theme="light"] .section:nth-child(even),
html[data-theme="light"] #categories {
  background: #eef0f8 !important;
}

.section-badge {
  background: var(--gold-subtle) !important;
  border-color: var(--gold-glow) !important;
  color: var(--gold) !important;
}
.section-header h2 { color: var(--text) !important; }
.section-header h2 .text-gold {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
.section-header p { color: var(--text-muted) !important; }

/* ── Product Cards ────────────────────────────── */
.product-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  border-radius: 16px !important;
  transition: all .3s cubic-bezier(.4,0,.2,1) !important;
}
.product-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgba(212,160,23,.35) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(212,160,23,.15) !important;
}
html[data-theme="dark"] .product-card .image-wrap {
  background: linear-gradient(135deg, #1a1e30, #252840) !important;
}
html[data-theme="light"] .product-card .image-wrap {
  background: linear-gradient(135deg, #eef0f8, #e2e5f0) !important;
}
.product-card .category {
  color: var(--gold) !important;
}
.product-card h3 { color: var(--text) !important; }
.product-card .price-current {
  color: var(--gold) !important;
  font-size: 20px;
  font-weight: 900;
}
.product-card .price-old {
  color: var(--text-muted) !important;
  text-decoration: line-through;
}
html[data-theme="dark"] .product-card .actions {
  border-top-color: #252840 !important;
}
html[data-theme="light"] .product-card .actions {
  border-top-color: var(--border) !important;
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  color: #1a1d2e !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 16px var(--gold-glow) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light)) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px var(--gold-glow) !important;
}
.btn-outline {
  border: 2px solid var(--gold) !important;
  color: var(--gold) !important;
  background: transparent !important;
}
.btn-outline:hover {
  background: var(--gold-subtle) !important;
}
.btn-ghost {
  color: var(--text-muted) !important;
  border: 1px solid transparent !important;
}
.btn-ghost:hover {
  background: var(--gold-subtle) !important;
  color: var(--gold) !important;
  border-color: var(--gold-glow) !important;
}
.btn-accent {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  color: #1a1d2e !important;
}

/* ── Category Cards ───────────────────────────── */
.category-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-sm) !important;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .3s ease;
}
.category-card:hover {
  border-color: rgba(212,160,23,.4) !important;
  background: var(--gold-subtle) !important;
  transform: translateY(-4px) !important;
  box-shadow: var(--shadow-md), 0 0 0 1px var(--gold-glow) !important;
}
.category-card h3 { color: var(--text) !important; }
.category-card span { color: var(--gold) !important; }

/* ── Offer Cards ──────────────────────────────── */
.offer-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.offer-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
}
.offer-card:hover {
  border-color: rgba(212,160,23,.35) !important;
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.offer-card h3 { color: var(--text) !important; }
.offer-card p { color: var(--text-muted) !important; }
.offer-price { color: var(--gold) !important; }
.countdown-item {
  background: var(--gold-subtle) !important;
  border: 1px solid var(--gold-glow) !important;
  border-radius: 10px;
}
.countdown-item .num { color: var(--gold) !important; }
.countdown-item .label { color: var(--text-muted) !important; }

/* ── Offers section background ─────────────────── */
html[data-theme="dark"] .offers-section {
  background: linear-gradient(135deg, #0a0c17 0%, #0d0f1a 100%);
}
html[data-theme="light"] .offers-section {
  background: linear-gradient(135deg, #eef0f8 0%, #f7f8fc 100%);
}

/* ── Testimonials ─────────────────────────────── */
.testimonial-card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 18px !important;
  transition: all .3s ease;
}
.testimonial-card:hover {
  border-color: var(--gold-glow) !important;
  box-shadow: var(--shadow-md) !important;
}
.testimonial-card .stars { color: var(--gold); }
.testimonial-card p { color: var(--text-muted) !important; }
.testimonial-card .author-avatar {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  color: #1a1d2e !important;
}
.testimonial-card .author-name { color: var(--text) !important; }
.testimonial-card .author-title { color: var(--text-muted) !important; }

/* ── Cards (generic) ──────────────────────────── */
.card {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
}
.card:hover {
  border-color: var(--gold-glow) !important;
  box-shadow: var(--shadow-md) !important;
}

/* ── Footer ───────────────────────────────────── */
html[data-theme="dark"] .footer {
  background: #080a12 !important;
  border-top: 1px solid rgba(212,160,23,.1) !important;
}
html[data-theme="light"] .footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
}
.footer h4 { color: var(--gold) !important; }
html[data-theme="dark"] .footer-brand p { color: #7b7fa8 !important; }
html[data-theme="light"] .footer-brand p { color: #475569 !important; }
html[data-theme="dark"] .footer ul li a { color: #7b7fa8 !important; }
html[data-theme="light"] .footer ul li a { color: #475569 !important; }
.footer ul li a:hover { color: var(--gold) !important; }
html[data-theme="dark"] .footer-bottom { color: #4e537a !important; border-top-color: rgba(212,160,23,.06) !important; }
html[data-theme="light"] .footer-bottom { color: #64748b !important; border-top-color: #e2e8f0 !important; }
.footer-bottom a { color: var(--gold) !important; }

/* ── Forms / Search ───────────────────────────── */
#storefrontSearch {
  background: transparent !important;
  color: var(--text) !important;
}
#storefrontSearch::placeholder { color: var(--text-muted) !important; }
#storefrontCategory {
  background: var(--card-bg) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
#storefrontCategory:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px var(--gold-glow) !important;
  outline: none;
}
.form-input, .form-select, .form-textarea {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}
.form-input:focus, .form-select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 4px var(--gold-glow) !important;
}

/* ── Modal ────────────────────────────────────── */
html[data-theme="dark"] .modal {
  background: #141625 !important;
  border-color: rgba(212,160,23,.15) !important;
}
html[data-theme="light"] .modal {
  background: #ffffff !important;
  border-color: var(--border) !important;
}
html[data-theme="dark"] .modal-header { border-bottom-color: #252840 !important; }
html[data-theme="light"] .modal-header { border-bottom-color: var(--border) !important; }
.modal-header h2 { color: var(--text) !important; }
html[data-theme="dark"] .modal-footer { border-top-color: #252840 !important; }
html[data-theme="light"] .modal-footer { border-top-color: var(--border) !important; }

/* ── Back to top ──────────────────────────────── */
.back-to-top {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold)) !important;
  color: #1a1d2e !important;
  box-shadow: 0 4px 20px var(--gold-glow) !important;
}

/* ── Scrollbar ────────────────────────────────── */
html[data-theme="dark"] ::-webkit-scrollbar-track { background: #0d0f1a; }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #252840; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #f0f2fa; }
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c0c4d8; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold) !important; }

/* ── Theme Toggle button style ────────────────── */
#themeToggle {
  font-size: 18px !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  transition: all .3s ease !important;
}
html[data-theme="dark"] #themeToggle {
  background: rgba(212,160,23,.08) !important;
  border: 1.5px solid rgba(212,160,23,.25) !important;
}
html[data-theme="light"] #themeToggle {
  background: rgba(192,144,16,.1) !important;
  border: 1.5px solid rgba(192,144,16,.3) !important;
}
#themeToggle:hover {
  transform: scale(1.12) rotate(15deg) !important;
}

/* ── Skeleton ─────────────────────────────────── */
html[data-theme="dark"] .skeleton {
  background: linear-gradient(90deg, #1a1e30 25%, #252840 50%, #1a1e30 75%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s infinite !important;
}
html[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #e8eaf4 25%, #d4d8ec 50%, #e8eaf4 75%) !important;
  background-size: 200% 100% !important;
  animation: shimmer 1.5s infinite !important;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Reveal animation ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Mobile nav open ──────────────────────────── */
html[data-theme="dark"] .nav-links.open {
  background: rgba(13,15,26,.98) !important;
  border: 1px solid rgba(212,160,23,.15) !important;
}
html[data-theme="light"] .nav-links.open {
  background: rgba(255,255,255,.99) !important;
  border: 1px solid var(--border) !important;
}

/* ── Pagination ───────────────────────────────── */
#productsPagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px 0 8px;
  flex-wrap: wrap;
}

/* ── Product Card Interactions & Clickable styles ── */
.clickable-card {
  cursor: pointer;
}
.clickable-card .image-wrap {
  position: relative;
}
.card-image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 18, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}
.clickable-card:hover .card-image-overlay {
  opacity: 1;
}
.overlay-details-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(10px);
  transition: transform 0.3s ease, background 0.2s;
}
.clickable-card:hover .overlay-details-btn {
  transform: translateY(0);
}
.overlay-details-btn:hover {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #080a12 !important;
}

/* ── Checkout Steps & Form Styles ── */
.checkout-step {
  animation: slideInLeft 0.3s ease forwards;
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.checkout-header-summary {
  background: var(--subtle);
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px dashed var(--border);
}
.checkout-form-group {
  margin-bottom: 16px;
  text-align: right;
}
.checkout-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.checkout-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.25s;
  outline: none;
  text-align: right;
}
.checkout-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.checkout-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Payment Methods */
.payment-methods-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 18px 0 8px;
  text-align: right;
}
.payment-methods-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 22px;
}
.payment-method-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--subtle);
  cursor: pointer;
  transition: all 0.25s;
  user-select: none;
}
.payment-method-card:hover {
  border-color: rgba(212,160,23,.3);
  background: rgba(212,160,23,.03);
}
.payment-method-card.selected {
  border-color: var(--gold) !important;
  background: rgba(212,160,23,.08) !important;
  box-shadow: 0 0 12px var(--gold-glow);
}
.payment-method-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.payment-method-icon {
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
}
.payment-method-texts {
  text-align: right;
}
.payment-method-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.payment-method-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.payment-method-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,.08);
  color: var(--text-muted);
}
.payment-method-card.selected .payment-method-badge {
  background: var(--gold);
  color: #080a12;
}

/* Specific payment styles */
.reflect-badge {
  background: linear-gradient(135deg, #7c3aed, #9061f9) !important;
  color: #fff !important;
}
.jawwal-badge {
  background: #10b981 !important;
  color: #fff !important;
}
.cod-badge {
  background: #d4a017 !important;
  color: #080a12 !important;
}

/* Success Order State */
.order-success-container {
  text-align: center;
  padding: 30px 10px;
  animation: slideInLeft 0.3s ease forwards;
}
.success-checkmark-wrapper {
  margin: 0 auto 20px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.12);
  border: 2.5px solid #10b981;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #10b981;
  animation: pulseSuccess 2s infinite;
}
@keyframes pulseSuccess {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.order-success-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}
.order-success-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 24px;
}
.order-details-box {
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  text-align: right;
  margin-bottom: 24px;
}
.order-details-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.order-details-row:last-child {
  border-bottom: none;
  font-weight: 700;
}

/* ── Cart badge & modal ── */
.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--gold);
  color: #080a12;
  font-size: 10px;
  font-weight: 900;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card-bg);
  line-height: 1;
}
.cart-modal {
  max-width: 480px;
  width: calc(100% - 24px);
}
.cart-modal-body {
  max-height: min(65vh, 520px);
  overflow-y: auto;
}
.cart-modal-footer {
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.cart-empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}
.cart-empty-icon {
  font-size: 56px;
  margin-bottom: 14px;
}
.cart-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.cart-empty-desc {
  font-size: 13px;
  margin-bottom: 18px;
}
.cart-items-list {
  margin-bottom: 12px;
}
.cart-item-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-thumb {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--subtle);
}
.cart-item-emoji {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.cart-item-info {
  flex: 1;
  min-width: 0;
  text-align: right;
}
.cart-item-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  line-height: 1.35;
}
.cart-item-unit {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 8px;
}
.cart-qty-controls {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
}
.qty-btn {
  width: 32px;
  height: 32px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  background: var(--subtle);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.qty-btn:hover {
  background: var(--gold);
  color: #080a12;
}
.qty-value {
  min-width: 36px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
  padding: 0 4px;
}
.cart-item-side {
  text-align: left;
  flex-shrink: 0;
}
.cart-item-total {
  font-weight: 800;
  color: var(--gold-dark);
  font-size: 15px;
  margin-bottom: 8px;
}
.cart-remove-btn {
  color: var(--danger);
  background: var(--danger-bg, rgba(239, 68, 68, 0.12));
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 14px;
  cursor: pointer;
}
.coupon-box {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  align-items: stretch;
}
.coupon-box .checkout-input {
  flex: 1;
  margin: 0;
}
.cart-summary {
  background: var(--subtle);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  color: var(--text-muted);
}
.cart-summary-row.discount span:last-child {
  color: var(--success, #10b981);
}
.cart-summary-row .free-ship {
  color: var(--success, #10b981);
  font-style: normal;
  font-weight: 700;
}
.cart-summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 17px;
  font-weight: 900;
  color: var(--gold-dark);
  padding-top: 10px;
  margin-top: 6px;
  border-top: 1px dashed var(--border);
}
.shipping-hint {
  font-size: 11px;
  color: var(--gold);
  text-align: center;
  padding: 6px 0 2px;
  font-weight: 600;
}
.cart-clear-btn {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  font-size: 12px;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.cart-clear-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
}

/* ── Live update bar (BazaarSync) ── */
.bazaar-update-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 20px;
  background: linear-gradient(135deg, #1a1e30 0%, #141625 100%);
  border-top: 2px solid var(--gold);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.bazaar-update-bar.visible {
  transform: translateY(0);
}
.bazaar-update-btn {
  background: var(--gold);
  color: #080a12;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.bazaar-update-btn:hover {
  filter: brightness(1.08);
}
.bazaar-update-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
