/* ============================================================
   GO MART — Premium Design System v2.0
   High-end e-commerce experience · RTL-first · Dark-mode ready
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap');

/* ============================
   1. DESIGN TOKENS
   ============================ */
:root {
  /* Brand Palette */
  --brand: #7d0f24;
  --brand-2: #5e0b1b;
  --brand-3: #a91a3a;
  --brand-light: #fef2f2;
  --brand-glow: rgba(125,15,36,.18);

  /* Semantic */
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --info: #3b82f6;

  /* Surfaces */
  --bg: #f6f7fb;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --dark: #0f172a;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --muted: #6b7280;

  /* Borders */
  --border: #e5e7eb;
  --border-light: #f3f4f6;

  /* Typography */
  --font: 'Cairo', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Radius Scale */
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  /* Shadow Scale */
  --shadow-xs: 0 1px 3px rgba(0,0,0,.04);
  --shadow-sm: 0 4px 12px rgba(0,0,0,.05);
  --shadow: 0 8px 30px rgba(0,0,0,.07);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.1);
  --shadow-brand: 0 8px 30px rgba(125,15,36,.18);
  --shadow-hover: 0 20px 50px rgba(0,0,0,.14);

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-bounce: cubic-bezier(.34,1.56,.64,1);
  --duration: .3s;
  --transition: .3s cubic-bezier(.4,0,.2,1);

  /* Z-index scale */
  --z-dropdown: 1050;
  --z-sticky: 1030;
  --z-modal: 1060;
  --z-toast: 9999;
  --z-progress: 10000;
}

/* ============================
   2. DARK MODE TOKENS
   ============================ */
html.dark {
  --bg: #0c1021;
  --bg-card: #151a2d;
  --bg-elevated: #1a2035;
  --dark: #e2e8f0;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --muted: #94a3b8;
  --border: #2a3050;
  --border-light: #1e2540;
  --brand-light: rgba(125,15,36,.25);
  --shadow-xs: 0 1px 3px rgba(0,0,0,.2);
  --shadow-sm: 0 4px 12px rgba(0,0,0,.25);
  --shadow: 0 8px 30px rgba(0,0,0,.3);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.4);
  --shadow-hover: 0 20px 50px rgba(0,0,0,.45);
}

/* ============================
   3. BASE STYLES
   ============================ */
html { scroll-behavior: smooth }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  transition: background .4s var(--ease), color .4s var(--ease);
}

::selection { background: var(--brand); color: #fff }
a { transition: color .2s var(--ease) }

/* Scrollbar */
::-webkit-scrollbar { width: 8px }
::-webkit-scrollbar-track { background: var(--border-light) }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: var(--radius-full) }
::-webkit-scrollbar-thumb:hover { background: #94a3b8 }
html.dark ::-webkit-scrollbar-track { background: #0c1021 }
html.dark ::-webkit-scrollbar-thumb { background: #2a3050 }

/* ============================
   4. SCROLL PROGRESS BAR
   ============================ */
#scrollProgress {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-3), #e74c7a);
  z-index: var(--z-progress);
  transition: width .08s linear;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  pointer-events: none;
}

/* ============================
   5. HEADER — Sticky Shrink
   ============================ */
.header {
  transition: padding .35s var(--ease), box-shadow .35s var(--ease), background .4s var(--ease);
}
.header.is-scrolled {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  box-shadow: 0 4px 24px rgba(0,0,0,.08) !important;
}
.logo img {
  transition: height .35s var(--ease);
}
.header.is-scrolled .logo img {
  height: 48px;
}
html.dark .header.is-scrolled {
  box-shadow: 0 4px 24px rgba(0,0,0,.3) !important;
}

/* ============================
   6. DARK MODE TOGGLE
   ============================ */
.dark-toggle {
  background: var(--border-light);
  border: 1px solid var(--border);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-inline: 4px;
  cursor: pointer;
  transition: all .3s var(--ease);
  font-size: 1.1rem;
}
.dark-toggle:hover {
  background: var(--bg-card);
  transform: rotate(30deg) scale(1.05);
}
html.dark .dark-toggle { color: #fbbf24 }
@media (max-width:767.98px){
  .dark-toggle{width:34px;height:34px;margin-inline:2px;font-size:.95rem}
}
@media (max-width:400px){
  .dark-toggle{width:30px;height:30px;margin-inline:1px;font-size:.85rem}
}

/* ============================
   7. SCROLL REVEAL ANIMATIONS
   ============================ */
.reveal, .reveal-left, .reveal-right, .reveal-scale {
  opacity: 0;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  will-change: opacity, transform;
}
.reveal       { transform: translateY(40px) }
.reveal-left  { transform: translateX(-50px) }
.reveal-right { transform: translateX(50px) }
.reveal-scale { transform: scale(.85) }

.reveal.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible,
.reveal-scale.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children */
.stagger-children .reveal:nth-child(1)  { transition-delay: .05s }
.stagger-children .reveal:nth-child(2)  { transition-delay: .1s }
.stagger-children .reveal:nth-child(3)  { transition-delay: .15s }
.stagger-children .reveal:nth-child(4)  { transition-delay: .2s }
.stagger-children .reveal:nth-child(5)  { transition-delay: .25s }
.stagger-children .reveal:nth-child(6)  { transition-delay: .3s }
.stagger-children .reveal:nth-child(7)  { transition-delay: .35s }
.stagger-children .reveal:nth-child(8)  { transition-delay: .4s }
.stagger-children .reveal:nth-child(9)  { transition-delay: .45s }
.stagger-children .reveal:nth-child(10) { transition-delay: .5s }
.stagger-children .reveal:nth-child(11) { transition-delay: .55s }
.stagger-children .reveal:nth-child(12) { transition-delay: .6s }

/* ============================
   8. MARQUEE / AUTO-SCROLL
   ============================ */
.marquee-wrap {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}
.marquee-track:hover { animation-play-state: paused }
@keyframes marquee-scroll {
  0%   { transform: translateX(0) }
  100% { transform: translateX(-50%) }
}

/* ============================
   9. CATEGORY PILLS & CARDS
   ============================ */
.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: .92rem;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.cat-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-light);
  transform: scale(1.05);
  box-shadow: var(--shadow-brand);
}
.cat-pill i {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: transform .3s ease;
}
.cat-pill:hover i { transform: rotate(-10deg) scale(1.1) }

/* Category icon colors */
.cat-pill .cpi-laptop   { background: #dbeafe; color: #2563eb }
.cat-pill .cpi-phone    { background: #fce7f3; color: #db2777 }
.cat-pill .cpi-audio    { background: #fef3c7; color: #d97706 }
.cat-pill .cpi-screen   { background: #d1fae5; color: #059669 }
.cat-pill .cpi-keyboard { background: #ede9fe; color: #7c3aed }
.cat-pill .cpi-gaming   { background: #fee2e2; color: #dc2626 }
.cat-pill .cpi-camera   { background: #e0e7ff; color: #4f46e5 }
.cat-pill .cpi-printer  { background: #f3f4f6; color: #374151 }
.cat-pill .cpi-smart    { background: #ccfbf1; color: #0d9488 }
.cat-pill .cpi-network  { background: #fef9c3; color: #a16207 }
.cat-pill .cpi-storage  { background: #f1f5f9; color: #475569 }
.cat-pill .cpi-wear     { background: #fce7f3; color: #be185d }

/* Category scroll cards */
.cats-scroll { overflow: hidden; position: relative }
.cats-scroll::before,
.cats-scroll::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; pointer-events: none;
}
.cats-scroll::before { right: 0; background: linear-gradient(to left, var(--bg), transparent) }
.cats-scroll::after  { left: 0; background: linear-gradient(to right, var(--bg), transparent) }

.cats-track {
  display: flex; gap: 18px; width: max-content;
  animation: cats-slide 25s linear infinite;
}
.cats-track:hover { animation-play-state: paused }
@keyframes cats-slide {
  0%   { transform: translateX(0) }
  100% { transform: translateX(-50%) }
}

.cat-card {
  flex-shrink: 0; width: 120px; text-align: center;
  text-decoration: none; color: var(--text); transition: transform .3s ease, color .3s ease;
}
.cat-card:hover { transform: translateY(-6px); color: var(--brand) }
.cat-card__img {
  width: 100px; height: 100px; margin: 0 auto 10px; border-radius: 20px;
  overflow: hidden; border: 2px solid var(--border); background: var(--bg-card);
  transition: border-color .3s, box-shadow .3s;
}
.cat-card:hover .cat-card__img { border-color: var(--brand); box-shadow: var(--shadow-brand) }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover }
.cat-card__name { font-weight: 700; font-size: .88rem; white-space: nowrap }

/* ============================
   10. SECTION TITLES
   ============================ */
.sec-title {
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--dark);
  position: relative;
  display: inline-block;
}
.sec-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  inset-inline-start: 0;
  width: 40px; height: 4px;
  border-radius: var(--radius-full);
  background: var(--brand);
}

/* ============================
   11. PRODUCT CARDS (Premium)
   ============================ */
.p-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 1px solid transparent;
  position: relative;
}
.p-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(125,15,36,.12);
}
/* Gradient glow border on hover */
.p-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 2px;
  background: linear-gradient(135deg, var(--brand), transparent 40%, var(--brand-3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.p-card:hover::after { opacity: 1 }

.p-thumb { position: relative; overflow: hidden }
.p-thumb img {
  width: 100%; height: 220px; object-fit: cover;
  transition: transform .6s var(--ease);
}
.p-card:hover .p-thumb img { transform: scale(1.08) }
@media (max-width: 576px) { .p-thumb img { height: 180px } }

/* Discount badge — animated pulse */
.p-badge { position: absolute; top: 10px; inset-inline-end: 10px; z-index: 2 }
.p-badge .badge {
  margin-inline-start: 6px; border-radius: 6px; font-weight: 700;
  backdrop-filter: blur(6px);
}
.p-badge .badge.text-bg-danger {
  animation: badge-pulse 2s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.4) }
  50%      { box-shadow: 0 0 0 8px rgba(220,38,38,0) }
}

/* Quick actions overlay */
.p-actions {
  position: absolute; inset-inline-start: 10px; top: 10px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; transform: translateX(-10px);
  transition: all .3s var(--ease);
  z-index: 2;
}
.p-card:hover .p-actions { opacity: 1; transform: translateX(0) }

.icon-btn {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s var(--ease); cursor: pointer;
  color: var(--text);
  backdrop-filter: blur(8px);
}
.icon-btn:hover {
  background: var(--brand-light); border-color: var(--brand); color: var(--brand);
  transform: scale(1.12);
}

/* Card body */
.p-body { padding: 14px 16px }
.p-body a { color: var(--text); text-decoration: none; transition: color .2s }
.p-body a:hover { color: var(--brand) }

.price { font-weight: 800; color: var(--brand); font-size: 1.08rem }
.price del { color: #9ca3af; font-weight: 500; margin-inline-start: 8px; font-size: .85rem }
.stars i { color: #f6b400 }

.p-body .btn-add {
  background: var(--dark);
  color: #fff; border: none;
  border-radius: 12px;
  padding: .55rem;
  font-weight: 700; width: 100%;
  transition: all var(--transition);
  position: relative; overflow: hidden;
}
.p-body .btn-add:hover { background: var(--brand); box-shadow: var(--shadow-brand) }

/* ============================
   12. FLASH DEALS / COUNTDOWN
   ============================ */
.flash-banner {
  background: linear-gradient(135deg, var(--brand), #c2185b);
  border-radius: var(--radius);
  padding: 28px; color: #fff;
  position: relative; overflow: hidden;
}
.flash-banner::before {
  content: "⚡";
  position: absolute; font-size: 120px; opacity: .08;
  inset-inline-end: -10px; top: -20px;
}
.countdown { display: flex; gap: 10px }
.countdown .cd-box {
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  padding: 10px 14px; text-align: center; min-width: 60px;
}
.countdown .cd-num { font-size: 1.5rem; font-weight: 900; line-height: 1 }
.countdown .cd-label { font-size: .65rem; opacity: .85; margin-top: 2px }

/* ============================
   13. FEATURE / TRUST CARDS
   ============================ */
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px 20px; text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  border: 1px solid transparent;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--brand);
}
.feature-card .f-icon {
  width: 56px; height: 56px; border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 12px;
}
.feature-card h6 { font-weight: 800; margin-bottom: 4px; color: var(--text) }
.feature-card p { color: var(--muted); font-size: .82rem; margin: 0 }

/* ============================
   14. BRAND LOGOS
   ============================ */
.brand-logo {
  height: 40px; opacity: .5;
  filter: grayscale(100%);
  transition: all .3s ease;
  padding: 0 20px;
}
.brand-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: scale(1.1);
}
html.dark .brand-logo { filter: grayscale(100%) brightness(2); opacity: .35 }
html.dark .brand-logo:hover { filter: grayscale(0%) brightness(1.5); opacity: .9 }

/* ============================
   15. NEWSLETTER CTA
   ============================ */
.nl-section {
  background: linear-gradient(135deg, var(--brand), #a91a3a);
  border-radius: var(--radius);
  padding: 40px; color: #fff;
  position: relative; overflow: hidden;
}
.nl-section::before {
  content: "📬";
  position: absolute; font-size: 140px; opacity: .06;
  inset-inline-end: 20px; bottom: -30px;
}

/* ============================
   16. PRODUCT DETAIL PAGE
   ============================ */
.pd-gallery img { width: 100%; border-radius: var(--radius); cursor: zoom-in; transition: transform .4s ease }
.pd-gallery img:hover { transform: scale(1.02) }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px }
.pd-thumbs img {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 2px solid transparent; cursor: pointer; transition: all .2s ease;
}
.pd-thumbs img:hover, .pd-thumbs img.active { border-color: var(--brand) }

.pd-info .pd-title { font-weight: 900; font-size: 1.5rem; color: var(--dark) }
.pd-info .pd-price { font-size: 1.8rem; font-weight: 900; color: var(--brand) }
.pd-info .pd-old-price { font-size: 1rem; color: #9ca3af; text-decoration: line-through; margin-inline-start: 10px }
.pd-info .pd-discount-badge {
  background: #dc2626; color: #fff; padding: 4px 12px;
  border-radius: var(--radius-full); font-size: .78rem; font-weight: 700;
  margin-inline-start: 10px;
}

/* Swatches */
.swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer;
  transition: all .2s ease;
}
.swatch:hover, .swatch.active {
  border-color: var(--brand);
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Size pills */
.size-pill {
  border: 1px solid var(--border); border-radius: 10px;
  padding: .4rem .8rem; font-weight: 600; cursor: pointer;
  transition: all .2s ease; background: var(--bg-card); color: var(--text);
}
.size-pill:hover, .size-pill.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
}

/* Quantity control */
.qty-wrap {
  display: inline-flex; align-items: center;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
}
.qty-wrap button {
  width: 42px; height: 42px; border: none; background: var(--border-light);
  font-size: 1.1rem; font-weight: 700; transition: background .2s; color: var(--text);
}
.qty-wrap button:hover { background: var(--border) }
.qty-wrap input {
  width: 56px; height: 42px; border: none; text-align: center;
  font-weight: 700; background: var(--bg-card); color: var(--text);
}

/* Tabs */
.pd-tabs .nav-link {
  border-radius: 12px 12px 0 0; color: var(--muted);
  font-weight: 700; padding: .8rem 1.2rem;
}
.pd-tabs .nav-link.active {
  color: var(--brand); background: var(--bg-card);
  border-color: var(--border) var(--border) var(--bg-card);
}

/* ============================
   17. BUTTON RIPPLE EFFECT
   ============================ */
.ripple-wave {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,.3);
  transform: scale(0);
  animation: ripple-anim .6s ease-out;
  pointer-events: none;
}
@keyframes ripple-anim {
  to { transform: scale(4); opacity: 0 }
}

/* ============================
   18. TOAST NOTIFICATION
   ============================ */
.gm-toast {
  position: fixed; top: 20px; inset-inline-end: 20px;
  z-index: var(--z-toast);
  background: var(--bg-card);
  border-radius: 14px; padding: 14px 20px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 12px;
  transform: translateX(120%);
  transition: transform .4s var(--ease);
  border-inline-start: 4px solid var(--success);
  max-width: 360px; color: var(--text);
}
.gm-toast.show { transform: translateX(0) }
.gm-toast .toast-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: #ecfdf5; color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gm-toast .toast-body { font-weight: 600; font-size: .88rem }
.gm-toast .toast-close {
  margin-inline-start: auto; border: none; background: none;
  color: var(--muted); cursor: pointer; padding: 4px;
}

/* ============================
   19. SKELETON LOADER
   ============================ */
@keyframes shimmer {
  0%   { background-position: -400px 0 }
  100% { background-position: 400px 0 }
}
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.5s ease infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card { border-radius: var(--radius); overflow: hidden; background: var(--bg-card) }
.skeleton-card .skeleton-img { width: 100%; height: 220px }
.skeleton-card .skeleton-line { height: 14px; margin: 10px 16px; border-radius: 6px }
.skeleton-card .skeleton-line.short { width: 60% }

/* ============================
   20. PAGE TRANSITION
   ============================ */
.page-content {
  animation: pageEnter .5s var(--ease);
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(20px) }
  to   { opacity: 1; transform: translateY(0) }
}

/* ============================
   21. FLY TO CART ANIMATION
   ============================ */
.fly-to-cart {
  position: fixed; z-index: 99999;
  pointer-events: none;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  transition: all .7s var(--ease);
  opacity: 1;
}
.fly-to-cart.flying {
  opacity: 0;
  transform: scale(.15) rotate(-10deg);
}

/* ============================
   22. WHATSAPP FLOAT (Animated)
   ============================ */
.wa-float {
  position: fixed; inset-inline-start: 16px; bottom: 16px;
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgba(37,211,102,.35);
  z-index: 1080; text-decoration: none;
  animation: wa-pulse 3s ease-in-out infinite;
}
.wa-float:hover { color: #fff; animation: none; transform: scale(1.1) }
@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(37,211,102,.35) }
  50%      { box-shadow: 0 8px 24px rgba(37,211,102,.35), 0 0 0 12px rgba(37,211,102,.12) }
}

/* ============================
   23. GLASSMORPHISM UTILITY
   ============================ */
.glass {
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2);
}
html.dark .glass {
  background: rgba(21,26,45,.75);
  border-color: rgba(255,255,255,.08);
}

/* ============================
   24. CORE ANIMATIONS
   ============================ */
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(125,15,36,.4) }
  50%      { box-shadow: 0 0 0 12px rgba(125,15,36,0) }
}
.btn-pulse { animation: pulse-glow 2s ease infinite }

@keyframes float-up {
  0%, 100% { transform: translateY(0) }
  50%      { transform: translateY(-8px) }
}
.float-anim { animation: float-up 3s ease-in-out infinite }

@keyframes badge-bounce {
  0%, 100% { transform: scale(1) }
  50%      { transform: scale(1.4) }
}
.badge-bounce { animation: badge-bounce .4s ease }

/* Spin for loading */
@keyframes gm-spin {
  to { transform: rotate(360deg) }
}
.gm-spin { animation: gm-spin .8s linear infinite }

/* ============================
   25. RECENTLY VIEWED
   ============================ */
#recentlyViewed { display: none }
#recentlyViewed.has-items { display: block }
.rv-grid { scrollbar-width: none; -ms-overflow-style: none }
.rv-grid::-webkit-scrollbar { display: none }
.rv-item {
  flex-shrink: 0; width: 120px;
  text-decoration: none; color: var(--text);
}
.rv-item img {
  width: 120px; height: 120px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
  transition: all .3s var(--ease);
}
.rv-item:hover img { border-color: var(--brand); box-shadow: var(--shadow-brand) }
.rv-title {
  font-size: .78rem; font-weight: 700;
  margin-top: 6px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================
   26. DARK MODE — Component Overrides
   ============================ */

/* Header / Nav */
html.dark .promo-bar { background: linear-gradient(90deg, #3d0913, var(--brand-2)) }
html.dark .header { background: #111827; border-bottom-color: var(--border) }
html.dark .search-wrap .form-control { background: var(--bg-elevated); border-color: var(--border); color: var(--text) }
html.dark .search-wrap .btn-outline-secondary { border-color: var(--border); color: var(--text-secondary); background: var(--bg-elevated) }
html.dark .search-wrap .btn-primary { background: var(--brand); border-color: var(--brand) }
html.dark .h-icons .btn-icon { background: var(--bg-elevated); border-color: var(--border); color: var(--brand-3) }
html.dark .cats-bar { background: #111827; border-bottom-color: var(--border) }
html.dark .cats-nav a { color: var(--text) }
html.dark .cats-nav a:hover, html.dark .cats-nav a.active { color: var(--brand-3); background: var(--bg-elevated) }
html.dark .cats-toggle { background: var(--brand) }
html.dark .cats-dropdown { background: var(--bg-elevated); border-color: var(--border) }
html.dark .cats-dropdown a { color: var(--text) }
html.dark .cats-dropdown a:hover { background: var(--bg); color: #fff }

/* Offcanvas / Modals */
html.dark .offcanvas { background: var(--bg-card); color: var(--text) }
html.dark .offcanvas .offcanvas-header { border-bottom-color: var(--border) }
html.dark .offcanvas .btn-close { filter: invert(1) }
html.dark .mini-item { border-bottom-color: var(--border) }
html.dark .modal-content { background: var(--bg-card); color: var(--text) }
html.dark .modal-footer { border-top-color: var(--border) }

/* Bottom Nav */
html.dark .bottom-nav { background: #111827; border-top-color: var(--border) }
html.dark .bottom-nav__item { color: var(--muted) }
html.dark .bottom-nav__item.is-active { color: var(--brand-3) }

/* Mobile Menu */
html.dark #mobileMenu .offcanvas-body { background: var(--bg-card) }
html.dark .mob-link { color: var(--text) }
html.dark .mob-link:hover { background: var(--bg); color: var(--brand-3) }
html.dark .mob-search .form-control { background: var(--bg); border-color: var(--border); color: var(--text) }
html.dark .mob-section-title { color: var(--muted) }
html.dark .mob-divider { background: var(--border) }
html.dark .mob-sub a { color: var(--text-secondary) }
html.dark .mob-sub a:hover { color: #fff; background: var(--bg) }
html.dark .mob-contact-btn--call { background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.2); color: #34d399 }
html.dark .mob-contact-btn--wa { background: rgba(37,211,102,.12); border-color: rgba(37,211,102,.2); color: #25d366 }

/* Footer */
html.dark .footer a:hover { color: var(--brand-3) }
html.dark .ft-bottom { border-top-color: rgba(255,255,255,.06) }

/* Cards / Panels */
html.dark .p-card { background: var(--bg-card); border-color: var(--border) }
html.dark .p-card:hover { border-color: rgba(125,15,36,.2) }
html.dark .p-body a { color: var(--text) }
html.dark .p-body .btn-add { background: var(--bg-elevated); color: var(--text) }
html.dark .p-body .btn-add:hover { background: var(--brand); color: #fff }
html.dark .icon-btn { background: var(--bg-elevated); border-color: var(--border); color: var(--text) }
html.dark .feature-card { background: var(--bg-card); border-color: var(--border) }
html.dark .feature-card:hover { border-color: var(--brand) }

/* Forms */
html.dark .form-control, html.dark .form-select {
  background: var(--bg-elevated); border-color: var(--border); color: var(--text);
}
html.dark .form-control:focus, html.dark .form-select:focus {
  border-color: var(--brand); background: var(--bg-elevated);
}
html.dark .form-control::placeholder { color: var(--muted) }
html.dark .input-group .btn-outline-secondary { border-color: var(--border); color: var(--text-secondary) }

/* Generic Bootstrap cards */
html.dark .card { background: var(--bg-card); border-color: var(--border) }
html.dark .card .card-header { background: var(--bg-elevated); border-bottom-color: var(--border); color: var(--text) }

/* Tables */
html.dark .table { color: var(--text) }
html.dark .table-striped > tbody > tr:nth-of-type(odd) > * { color: var(--text) }

/* Breadcrumb */
html.dark .breadcrumb-item a { color: var(--text-secondary) }
html.dark .breadcrumb-item.active { color: var(--muted) }

/* Tabs */
html.dark .nav-tabs { border-bottom-color: var(--border) }
html.dark .tab-content { background: var(--bg-card); border-color: var(--border); color: var(--text) }

/* Filter chips */
html.dark .chip { background: var(--bg-card); border-color: var(--border); color: var(--text) }
html.dark .chip.active { background: var(--brand); color: #fff; border-color: var(--brand) }

/* Sort */
html.dark .sort .form-select { background: var(--bg-elevated); border-color: var(--border); color: var(--text) }

/* Login / Register / Contact hero pages */
html.dark .login-card,
html.dark .reg-card,
html.dark .c-card {
  background: rgba(21,26,45,.94); border-color: var(--border); color: var(--text);
}
html.dark .login-head, html.dark .reg-head, html.dark .c-head {
  background: linear-gradient(135deg, rgba(125,15,36,.15), rgba(21,26,45,.9));
}
html.dark .brand-pill { color: var(--brand-3) }

/* Cart page */
html.dark .cart-head { background: linear-gradient(135deg, rgba(125,15,36,.12), var(--bg-card)); border-color: var(--border) }
html.dark .cart-item { background: var(--bg-card); border-color: var(--border) }
html.dark .empty { background: var(--bg-card); border-color: var(--border); color: var(--muted) }
html.dark .opt-pill { background: var(--bg); border-color: var(--border); color: var(--text) }
html.dark .summary li { border-bottom-color: var(--border) }

/* Product detail */
html.dark .pd-price-box { background: var(--brand-light); border-color: var(--border) }
html.dark .pd-feature { border-bottom-color: var(--border); color: var(--text) }
html.dark .pd-brand { color: var(--muted) }
html.dark .pd-title { color: var(--text) !important }
html.dark .pd-price { color: var(--brand-3) !important }
html.dark .review-card { background: var(--bg-card); border-color: var(--border); color: var(--text) }

/* Bestsellers */
html.dark .bs-hero { box-shadow: 0 14px 36px rgba(0,0,0,.4) }

/* Contact */
html.dark .info-item { background: var(--brand-2) }

/* Back to top */
html.dark #backTop { background: var(--brand); box-shadow: 0 12px 24px rgba(0,0,0,.4) }

/* Hero wrap */
html.dark .gm-hero-wrap { background: var(--bg) }

/* Alert/text utilities */
html.dark .text-dark { color: var(--text) !important }
html.dark .text-muted { color: var(--muted) !important }
html.dark .bg-white { background: var(--bg-card) !important }

/* Dropdown menu */
html.dark .dropdown-menu { background: var(--bg-elevated); border-color: var(--border) }
html.dark .dropdown-item { color: var(--text) }
html.dark .dropdown-item:hover { background: var(--bg); color: var(--brand-3) }

/* ============================
   27. RESPONSIVE FINE-TUNING
   ============================ */
@media (max-width: 991.98px) {
  .wa-float { bottom: 80px }
  #backTop { bottom: 80px }
}
@media (max-width: 576px) {
  .gm-toast { inset-inline-end: 10px; max-width: calc(100vw - 20px) }
  .sec-title { font-size: 1.25rem }
}

/* ============================
   28. PRINT — Hide non-essential
   ============================ */
@media print {
  .header, .footer, .bottom-nav, .wa-float, #backTop,
  #scrollProgress, .gm-toast { display: none !important }
}
