/* ============================================================
   MarketSales - Main Stylesheet
   Design System: Navy Blue #1E3A8A | Yellow #FBBF24 | Modern eCommerce
   ============================================================ */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ─── CSS Variables ─────────────────────────────────────────── */
:root {
  --primary:        #1E3A8A;
  --primary-dark:   #172554;
  --primary-light:  #EFF6FF;
  --secondary:      #FBBF24;
  --secondary-dark: #D97706;
  --secondary-light:#FFFBEB;
  --success:        #10B981;
  --danger:         #EF4444;
  --warning:        #F59E0B;
  --info:           #0EA5E9;
  --bg:             #F8FAFC;
  --white:          #FFFFFF;
  --dark:           #1E293B;
  --gray-50:        #F8FAFC;
  --gray-100:       #F1F5F9;
  --gray-200:       #E2E8F0;
  --gray-300:       #CBD5E1;
  --gray-400:       #94A3B8;
  --gray-500:       #64748B;
  --gray-600:       #475569;
  --gray-700:       #334155;
  --gray-800:       #1E293B;
  --gray-900:       #0F172A;
  --font-main:      'Inter', sans-serif;
  --font-heading:   'Outfit', sans-serif;
  --radius-sm:      6px;
  --radius:         10px;
  --radius-lg:      16px;
  --radius-xl:      24px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:         0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:      0 10px 40px rgba(0,0,0,.14);
  --shadow-xl:      0 20px 60px rgba(0,0,0,.18);
  --transition:     all .25s cubic-bezier(.4,0,.2,1);
  --header-height:  70px;
}

/* ─── Dark Mode ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:        #0F172A;
  --white:     #1E293B;
  --dark:      #F1F5F9;
  --gray-50:   #1E293B;
  --gray-100:  #334155;
  --gray-200:  #475569;
  --gray-300:  #64748B;
  --gray-400:  #94A3B8;
  --gray-500:  #CBD5E1;
  --gray-600:  #E2E8F0;
  --gray-700:  #F1F5F9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
  --shadow:    0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background .3s, color .3s;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}

/* ─── Utility Classes ───────────────────────────────────────── */
.text-primary    { color: var(--primary) !important; }
.text-secondary  { color: var(--secondary) !important; }
.text-success    { color: var(--success) !important; }
.text-danger     { color: var(--danger) !important; }
.text-muted      { color: var(--gray-500) !important; }
.bg-primary-light{ background: var(--primary-light) !important; }
.section-title   { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; color: var(--dark); }
.section-subtitle{ color: var(--gray-500); font-size: .95rem; }

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: .9rem;
  transition: var(--transition);
  letter-spacing: .01em;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,.12); }

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37,99,235,.35);
}
.btn-secondary {
  background: var(--secondary);
  border-color: var(--secondary);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  border-color: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249,115,22,.35);
}
.btn-outline-primary { border-color: var(--primary); color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }
.btn-cart {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .5rem 1.2rem;
  font-weight: 600;
  font-size: .85rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .4rem;
}
.btn-cart:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(37,99,235,.4); }
.btn-wishlist {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-500);
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.btn-wishlist:hover,
.btn-wishlist.active { background: #FEF2F2; border-color: var(--danger); color: var(--danger); }

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* ─── TOP BAR ───────────────────────────────────────────────── */
.top-bar {
  background: var(--gray-900);
  color: #fff;
  font-size: .8rem;
  padding: .4rem 0;
}
.top-bar a { color: var(--gray-300); }
.top-bar a:hover { color: var(--secondary); }
.top-bar .top-bar-links { display: flex; gap: 1.2rem; }

/* ─── HEADER ────────────────────────────────────────────────── */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: background .3s;
}

/* Logo */
.logo-wrap { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.site-logo-img {
  height: 48px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: var(--transition);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.site-logo-img:hover { opacity: .88; transform: scale(1.02); }
.site-logo-img--footer {
  height: 44px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1); /* white logo on dark footer */
}

/* Search Bar */
.search-bar { flex: 1; max-width: 560px; position: relative; }
.search-bar form { display: flex; border: 2px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.search-bar form:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.search-bar .search-cat {
  background: var(--gray-100);
  border: none;
  border-right: 2px solid var(--gray-200);
  padding: .5rem .8rem;
  font-size: .8rem;
  color: var(--gray-700);
  cursor: pointer;
  min-width: 110px;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: .55rem 1rem;
  font-size: .9rem;
  background: var(--white);
  color: var(--dark);
}
.search-bar .btn-search {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: .5rem 1.2rem;
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}
.search-bar .btn-search:hover { background: var(--primary-dark); }

/* Search Suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  max-height: 380px;
  overflow-y: auto;
  display: none;
}
.search-suggestions.show { display: block; animation: fadeDown .15s ease; }
.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-100);
}
.search-suggestion-item:hover { background: var(--primary-light); }
.search-suggestion-item img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); }
.search-suggestion-item .sug-name { font-size: .88rem; font-weight: 500; color: var(--dark); }
.search-suggestion-item .sug-price { font-size: .8rem; color: var(--primary); font-weight: 600; }

/* Header Icons */
.header-icons { display: flex; align-items: center; gap: .3rem; }
.header-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: .45rem .7rem;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
  background: none;
  border: none;
}
.header-icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.header-icon-btn i { font-size: 1.3rem; }
.header-icon-btn .badge-count {
  position: absolute;
  top: 4px; right: 4px;
  background: var(--secondary);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--white);
}

/* ─── NAVIGATION / MEGA MENU ────────────────────────────────── */
.nav-bar {
  background: var(--primary);
  padding: 0;
}
.nav-bar .nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-item {
  position: relative;
}
.nav-link-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .7rem 1rem;
  color: rgba(255,255,255,.9);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link-item:hover,
.nav-link-item.active { background: rgba(255,255,255,.15); color: #fff; }
.nav-link-item i { font-size: .9rem; }
.nav-link-item .arrow { font-size: .7rem; margin-left: 2px; transition: var(--transition); }
.nav-item:hover .arrow { transform: rotate(180deg); }

/* Mega/Dropdown Menu */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-xl);
  min-width: 220px;
  z-index: 9000;
  display: none;
  animation: fadeDown .2s ease;
}
.nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .65rem 1.2rem;
  color: var(--gray-700);
  font-size: .88rem;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}
.nav-dropdown a:hover { background: var(--primary-light); color: var(--primary); padding-left: 1.5rem; }
.nav-dropdown a:last-child { border-bottom: none; }

.nav-deals { color: var(--secondary) !important; font-weight: 700 !important; animation: pulse 2s infinite; }

/* ─── HERO SLIDER ───────────────────────────────────────────── */
.hero-section { position: relative; overflow: hidden; }
.hero-slider { position: relative; height: 500px; }
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease, transform .7s ease;
  transform: scale(1.02);
  display: flex;
  align-items: center;
}
.hero-slide.active { opacity: 1; transform: scale(1); z-index: 2; }
.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(15,23,42,.85) 0%, rgba(15,23,42,.4) 55%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 560px;
  padding: 2rem 0;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--secondary);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .8rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1rem;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero-title span { color: var(--secondary); }
.hero-text { color: rgba(255,255,255,.85); font-size: 1.05rem; margin-bottom: 1.8rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-price-badge {
  display: inline-flex;
  flex-direction: column;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: .8rem 1.2rem;
  margin-top: 1.5rem;
}
.hero-price-badge .from { font-size: .75rem; color: rgba(255,255,255,.7); }
.hero-price-badge .price { font-size: 1.6rem; font-weight: 800; color: #fff; }
.hero-price-badge .off { font-size: .8rem; background: var(--secondary); color: #fff; border-radius: 4px; padding: .1rem .4rem; display: inline-block; }

/* Slider Controls */
.slider-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: .5rem;
  z-index: 10;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.slider-dot.active { background: var(--secondary); width: 24px; border-radius: 4px; }
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
  font-size: 1.1rem;
}
.slider-btn:hover { background: rgba(255,255,255,.3); }
.slider-btn.prev { left: 1rem; }
.slider-btn.next { right: 1rem; }

/* ─── SECTION HEADER ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.section-header-left { display: flex; align-items: center; gap: 1rem; }
.section-bar {
  width: 5px;
  height: 36px;
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: 4px;
}
.view-all-link {
  display: flex;
  align-items: center;
  gap: .3rem;
  color: var(--primary);
  font-weight: 600;
  font-size: .88rem;
  transition: var(--transition);
}
.view-all-link:hover { gap: .6rem; }

/* ─── PRODUCT CARD ──────────────────────────────────────────── */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card:hover .product-actions { opacity: 1; transform: translateY(0); }
.product-card:hover .product-img img { transform: scale(1.06); }

.product-img-wrap {
  position: relative;
  overflow: hidden;
  background: var(--gray-50);
  padding: .5rem;
  aspect-ratio: 1 / 1;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
.product-badges {
  position: absolute;
  top: .6rem;
  left: .6rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  z-index: 2;
}
.badge-discount {
  background: var(--danger);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.badge-new {
  background: var(--success);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.badge-hot {
  background: var(--secondary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 4px;
}
.product-actions {
  position: absolute;
  top: .6rem;
  right: .6rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  opacity: 0;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 2;
}
.product-action-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: .9rem;
  color: var(--gray-600);
  transition: var(--transition);
  text-decoration: none;
}
.product-action-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.product-action-btn.wishlisted { background: #FEF2F2; color: var(--danger); border-color: var(--danger); }

.product-body {
  padding: .9rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.product-category { font-size: .75rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: .05em; }
.product-name {
  font-size: .92rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}
.product-name:hover { color: var(--primary); }
.product-rating { display: flex; align-items: center; gap: .4rem; }
.product-rating .stars { display: flex; gap: 1px; font-size: .75rem; color: var(--warning); }
.product-rating .count { font-size: .75rem; color: var(--gray-400); }
.product-price { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: auto; }
.price-current { font-size: 1.15rem; font-weight: 800; color: var(--primary); }
.price-original { font-size: .85rem; color: var(--gray-400); text-decoration: line-through; }
.price-off { font-size: .75rem; font-weight: 700; color: var(--danger); }
.product-stock-bar { height: 4px; background: var(--gray-200); border-radius: 4px; overflow: hidden; }
.product-stock-bar .fill { height: 100%; background: linear-gradient(90deg, var(--success), var(--primary)); border-radius: 4px; }
.product-stock-text { font-size: .75rem; color: var(--gray-500); }
.product-footer { padding: .7rem 1rem; border-top: 1px solid var(--gray-100); }

/* ─── FLASH SALE ─────────────────────────────────────────────── */
.flash-sale-section {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}
.flash-sale-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(249,115,22,.15) 0%, transparent 70%);
  pointer-events: none;
}
.flash-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.flash-title { display: flex; align-items: center; gap: .8rem; }
.flash-icon { font-size: 1.8rem; animation: flicker 1.5s infinite; }
.flash-title h2 { font-size: 1.8rem; font-weight: 900; color: #fff; }
.flash-title h2 span { color: var(--secondary); }
.countdown-timer {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.countdown-unit {
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  padding: .5rem .9rem;
  text-align: center;
  min-width: 56px;
}
.countdown-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--secondary);
  line-height: 1;
  display: block;
}
.countdown-label { font-size: .65rem; color: rgba(255,255,255,.6); text-transform: uppercase; letter-spacing: .05em; }
.countdown-sep { font-size: 1.4rem; color: var(--secondary); font-weight: 800; animation: blink 1s infinite; }

/* ─── CATEGORY GRID ─────────────────────────────────────────── */
.category-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  padding: 0;
  overflow: hidden;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(30,58,138,.12);
  transform: translateY(-3px);
}
.category-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-100);
}
.category-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.category-card:hover .category-img {
  transform: scale(1.05);
}
.category-card h6 {
  font-size: .85rem;
  font-weight: 600;
  color: var(--dark);
  margin: 0;
  padding: 0.9rem 0.5rem;
}
.category-card small {
  font-size: .75rem;
  color: var(--gray-400);
}

/* ─── PROMO BANNERS ─────────────────────────────────────────── */
.promo-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: center;
  padding: 1.5rem 2rem;
  text-decoration: none;
  transition: var(--transition);
}
.promo-banner:hover { transform: scale(1.01); box-shadow: var(--shadow-lg); }
.promo-banner .content { position: relative; z-index: 2; }
.promo-banner h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.promo-banner p { font-size: .85rem; opacity: .85; margin-bottom: .8rem; }

/* ─── TESTIMONIALS ──────────────────────────────────────────── */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  height: 100%;
}
.testimonial-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.testimonial-quote { font-size: 2.5rem; color: var(--primary); line-height: 1; margin-bottom: .5rem; font-family: Georgia, serif; }
.testimonial-text { color: var(--gray-600); font-size: .95rem; line-height: 1.7; margin-bottom: 1.2rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: .8rem; }
.testimonial-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}
.testimonial-name { font-weight: 700; font-size: .9rem; color: var(--dark); }
.testimonial-role { font-size: .78rem; color: var(--gray-400); }

/* ─── NEWSLETTER ─────────────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}
.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
  pointer-events: none;
}
.newsletter-section h2 { color: #fff; font-size: 2rem; font-weight: 800; }
.newsletter-section p { color: rgba(255,255,255,.8); }
.newsletter-form { display: flex; gap: .6rem; max-width: 520px; }
.newsletter-form input {
  flex: 1;
  border: 2px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  padding: .75rem 1.2rem;
  color: #fff;
  font-size: .95rem;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.65); }
.newsletter-form input:focus { outline: none; border-color: rgba(255,255,255,.7); }
.newsletter-form button {
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: .75rem 1.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.newsletter-form button:hover { background: var(--secondary-dark); transform: translateY(-1px); }

/* ─── BRANDS SECTION ─────────────────────────────────────────── */
.brands-marquee {
  overflow: hidden;
  width: 100%;
  padding: 1rem 0;
  position: relative;
}
.brands-marquee::before,
.brands-marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.brands-marquee::before {
  left: 0;
  background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}
.brands-marquee::after {
  right: 0;
  background: linear-gradient(to left, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}
.brands-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: scrollMarquee 25s linear infinite;
}
.brands-track:hover {
  animation-play-state: paused;
}
@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50% - 0.75rem));
  }
}
.brand-item {
  flex-shrink: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gray-500);
  font-size: 1rem;
  transition: var(--transition);
  min-width: 120px;
  cursor: pointer;
}
.brand-item:hover { border-color: var(--primary); color: var(--primary); box-shadow: var(--shadow); }

/* ─── PRODUCT PAGE ───────────────────────────────────────────── */
.product-gallery { position: sticky; top: calc(var(--header-height) + 16px); }
.gallery-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  aspect-ratio: 1;
  position: relative;
  background: var(--gray-50);
  cursor: zoom-in;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .3s ease;
}
.gallery-main:hover img { transform: scale(1.08); }
.gallery-thumbs {
  display: flex;
  gap: .6rem;
  margin-top: .8rem;
  overflow-x: auto;
  padding-bottom: .4rem;
}
.gallery-thumb {
  width: 70px; height: 70px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover { border-color: var(--primary-dark); }

.product-detail-title { font-size: 1.5rem; font-weight: 800; color: var(--dark); line-height: 1.3; }
.product-detail-price { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.product-detail-price .current { font-size: 2rem; font-weight: 900; color: var(--primary); }
.product-detail-price .original { font-size: 1.1rem; color: var(--gray-400); text-decoration: line-through; }
.product-detail-price .discount { background: var(--danger); color: #fff; font-size: .8rem; font-weight: 700; padding: .2rem .6rem; border-radius: 4px; }

/* Variant selectors */
.variant-label { font-weight: 600; font-size: .9rem; color: var(--dark); margin-bottom: .5rem; }
.color-swatches { display: flex; gap: .5rem; flex-wrap: wrap; }
.color-swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition);
}
.color-swatch.active { border-color: var(--primary); transform: scale(1.15); }
.size-options { display: flex; gap: .5rem; flex-wrap: wrap; }
.size-btn {
  padding: .35rem .9rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  background: var(--white);
  color: var(--dark);
}
.size-btn.active, .size-btn:hover { border-color: var(--primary); background: var(--primary); color: #fff; }

.qty-input {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  width: fit-content;
}
.qty-input button {
  background: var(--gray-100);
  border: none;
  width: 38px; height: 38px;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
  color: var(--dark);
}
.qty-input button:hover { background: var(--primary); color: #fff; }
.qty-input input {
  width: 50px;
  text-align: center;
  border: none;
  font-weight: 600;
  font-size: .95rem;
  color: var(--dark);
  background: var(--white);
  outline: none;
}
.product-actions-bar { display: flex; gap: .8rem; flex-wrap: wrap; }
.product-actions-bar .btn { padding: .75rem 1.8rem; font-size: .95rem; border-radius: var(--radius-sm); }

/* Tabs */
.product-tabs { border-bottom: 2px solid var(--gray-200); }
.product-tabs .nav-link {
  color: var(--gray-500);
  font-weight: 600;
  padding: .8rem 1.2rem;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  transition: var(--transition);
}
.product-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: none; }

/* Reviews */
.review-card {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 1.2rem;
  border: 1px solid var(--gray-200);
}
.review-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: .9rem;
}
.review-verified { font-size: .75rem; color: var(--success); font-weight: 600; }

/* ─── CART PAGE ─────────────────────────────────────────────── */
.cart-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: .8rem;
  transition: var(--transition);
}
.cart-item:hover { box-shadow: var(--shadow-sm); }
.cart-item-img { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--gray-200); flex-shrink: 0; }
.cart-item-name { font-weight: 600; color: var(--dark); font-size: .95rem; }
.cart-item-price { font-weight: 700; color: var(--primary); font-size: 1rem; }
.cart-summary {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-height) + 16px);
}
.cart-summary-row { display: flex; justify-content: space-between; padding: .6rem 0; }
.cart-summary-row.total { font-size: 1.1rem; font-weight: 800; color: var(--dark); border-top: 2px solid var(--gray-200); margin-top: .5rem; padding-top: 1rem; }
.coupon-input { display: flex; gap: .5rem; }
.coupon-input input { flex: 1; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); padding: .6rem 1rem; font-size: .88rem; outline: none; transition: var(--transition); }
.coupon-input input:focus { border-color: var(--primary); }

/* ─── CHECKOUT ───────────────────────────────────────────────── */
.checkout-step {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  padding: 1.8rem;
  margin-bottom: 1.2rem;
}
.checkout-step-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.2rem;
}
.step-num {
  width: 32px; height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: .88rem;
  flex-shrink: 0;
}
.step-num.done { background: var(--success); }
.payment-method-card {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: .8rem;
}
.payment-method-card:hover { border-color: var(--primary); }
.payment-method-card.selected { border-color: var(--primary); background: var(--primary-light); }
.payment-method-card .pm-icon { font-size: 1.5rem; }
.payment-method-card .pm-name { font-weight: 600; font-size: .9rem; }
.payment-method-card .pm-desc { font-size: .78rem; color: var(--gray-400); }

/* ─── DASHBOARD ─────────────────────────────────────────────── */
.dash-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}
.dash-user-info { padding: 1.5rem; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.dash-avatar { width: 64px; height: 64px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); object-fit: cover; }
.dash-nav { padding: .5rem 0; }
.dash-nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1.4rem;
  color: var(--gray-600);
  font-size: .88rem;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.dash-nav-link:hover { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); }
.dash-nav-link.active { background: var(--primary-light); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }
.dash-nav-link i { font-size: 1.1rem; width: 20px; text-align: center; }

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  border: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--dark); }
.stat-label { font-size: .8rem; color: var(--gray-500); }

/* ─── BREADCRUMB ─────────────────────────────────────────────── */
.breadcrumb-section { background: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding: .7rem 0; }
.breadcrumb { margin: 0; }
.breadcrumb-item { font-size: .85rem; }
.breadcrumb-item a { color: var(--gray-500); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--dark); font-weight: 500; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-400); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,.8);
  padding: 4rem 0 0;
}
.footer-logo-wrap { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.footer-tagline { color: rgba(255,255,255,.55); font-size: .88rem; margin-bottom: 1.2rem; line-height: 1.6; }
.footer-social { display: flex; gap: .6rem; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7);
  transition: var(--transition);
  font-size: .9rem;
}
.footer-social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-title { color: #fff; font-weight: 700; font-size: 1rem; margin-bottom: 1.2rem; position: relative; }
.footer-title::after { content: ''; position: absolute; bottom: -6px; left: 0; width: 30px; height: 2px; background: var(--primary); border-radius: 4px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .88rem; transition: var(--transition); display: flex; align-items: center; gap: .4rem; }
.footer-links a:hover { color: var(--secondary); padding-left: 4px; }
.footer-contact-item { display: flex; align-items: flex-start; gap: .8rem; margin-bottom: .8rem; color: rgba(255,255,255,.65); font-size: .88rem; }
.footer-contact-item i { color: var(--primary); font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.footer-bottom {
  background: rgba(0,0,0,.3);
  padding: 1.2rem 0;
  margin-top: 3rem;
  font-size: .82rem;
  color: rgba(255,255,255,.5);
}
.payment-icons { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.payment-icon {
  background: rgba(255,255,255,.1);
  border-radius: 4px;
  padding: .3rem .7rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(255,255,255,.7);
}

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-label { font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: .4rem; }
.form-control, .form-select {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .9rem;
  color: var(--dark);
  background: var(--white);
  transition: var(--transition);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
  outline: none;
}
.form-control::placeholder { color: var(--gray-400); }
.input-group .form-control { border-right: none; }
.input-group .input-group-text { background: var(--gray-100); border-color: var(--gray-200); color: var(--gray-500); }
.password-toggle { cursor: pointer; }
.invalid-feedback { font-size: .8rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

/* ─── FILTER SIDEBAR ─────────────────────────────────────────── */
.filter-sidebar {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  padding: 1.4rem;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}
.filter-title { font-weight: 700; font-size: 1rem; color: var(--dark); padding-bottom: .8rem; border-bottom: 1px solid var(--gray-200); margin-bottom: 1rem; display: flex; justify-content: space-between; align-items: center; }
.filter-group { margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--gray-100); }
.filter-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-group-title { font-weight: 600; font-size: .88rem; color: var(--dark); margin-bottom: .8rem; }
.price-range-inputs { display: flex; gap: .5rem; align-items: center; }
.price-range-inputs input { flex: 1; min-width: 0; }
.filter-check .form-check { margin-bottom: .4rem; }
.filter-check .form-check-label { font-size: .85rem; color: var(--gray-600); cursor: pointer; }

/* ─── PAGINATION ─────────────────────────────────────────────── */
.page-link { color: var(--primary); border-color: var(--gray-200); border-radius: var(--radius-sm) !important; margin: 0 2px; }
.page-link:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* ─── ALERTS & TOASTS ────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; }
.ms-toast {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  box-shadow: var(--shadow-xl);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 280px;
  max-width: 380px;
  animation: slideInRight .3s ease;
  border: 1px solid var(--gray-100);
}
.ms-toast.success { border-left-color: var(--success); }
.ms-toast.error { border-left-color: var(--danger); }
.ms-toast.warning { border-left-color: var(--warning); }
.ms-toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.ms-toast-text { flex: 1; }
.ms-toast-text strong { display: block; font-size: .9rem; color: var(--dark); }
.ms-toast-text span { font-size: .82rem; color: var(--gray-500); }
.ms-toast-close { color: var(--gray-400); cursor: pointer; font-size: .9rem; background: none; border: none; }

/* ─── WHATSAPP / LIVE CHAT ───────────────────────────────────── */
.floating-btns {
  position: fixed;
  bottom: 2rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  z-index: 998;
}
.float-btn {
  width: 50px; height: 50px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.float-btn:hover { transform: scale(1.1); color: #fff; }
.float-wa { background: #25D366; }
.float-top { background: var(--primary); font-size: 1rem; }
.dark-toggle { background: var(--gray-800); }

/* ─── QUICK VIEW MODAL ───────────────────────────────────────── */
.quick-view-modal .modal-content { border-radius: var(--radius-xl); border: none; box-shadow: var(--shadow-xl); }
.quick-view-modal .modal-header { border-bottom: 1px solid var(--gray-100); padding: 1.2rem 1.5rem; }
.quick-view-modal .modal-body { padding: 1.5rem; }

/* ─── ORDER TRACKING ─────────────────────────────────────────── */
.tracking-timeline { position: relative; padding: 0; list-style: none; }
.tracking-timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--gray-200);
}
.tracking-step {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.5rem;
  position: relative;
}
.tracking-step.done .t-dot { background: var(--success); border-color: var(--success); }
.tracking-step.active .t-dot { background: var(--primary); border-color: var(--primary); animation: pulse-ring 1.5s infinite; }
.t-dot {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 3px solid var(--gray-300);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: .85rem;
  z-index: 1;
}
.t-content { padding-top: .4rem; }
.t-title { font-weight: 700; font-size: .92rem; color: var(--dark); }
.t-desc { font-size: .82rem; color: var(--gray-500); }
.t-time { font-size: .78rem; color: var(--gray-400); margin-top: .2rem; }

/* ─── CONTACT PAGE ───────────────────────────────────────────── */
.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-100);
  text-align: center;
  transition: var(--transition);
  height: 100%;
}
.contact-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.contact-icon-wrap {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}

/* ─── FAQ PAGE ───────────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: .6rem;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item.open { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.faq-question {
  padding: 1.1rem 1.4rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
  user-select: none;
}
.faq-question .faq-icon { font-size: 1.2rem; color: var(--primary); transition: var(--transition); }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 1.4rem 1.1rem; color: var(--gray-600); font-size: .9rem; line-height: 1.7; }
.faq-item.open .faq-answer { display: block; animation: fadeDown .2s ease; }

/* ─── ABOUT PAGE ─────────────────────────────────────────────── */
.about-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 5rem 0;
  color: #fff;
}
.team-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-100);
  transition: var(--transition);
  text-align: center;
}
.team-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.team-card img { width: 100%; height: 220px; object-fit: cover; }
.team-body { padding: 1.2rem; }
.team-name { font-size: 1rem; font-weight: 700; color: var(--dark); }
.team-role { font-size: .82rem; color: var(--primary); font-weight: 500; }

/* ─── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .6; }
}
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.4); }
  70%  { box-shadow: 0 0 0 10px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}
@keyframes flicker {
  0%, 100% { opacity: 1; transform: scale(1); }
  25%       { opacity: .7; transform: scale(.95); }
  75%       { opacity: 1; transform: scale(1.05); }
}
@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position: 200% 0; }
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Fade-in on scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ─── MOBILE OFFCANVAS NAV ───────────────────────────────────── */
.mobile-nav .offcanvas-header { background: var(--primary); color: #fff; }
.mobile-nav .offcanvas-body { padding: 0; }
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1.4rem;
  color: var(--gray-700);
  font-weight: 500;
  font-size: .9rem;
  border-bottom: 1px solid var(--gray-100);
  text-decoration: none;
  transition: var(--transition);
}
.mobile-nav-link:hover { background: var(--primary-light); color: var(--primary); }
.mobile-nav-link i { font-size: 1.1rem; width: 22px; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE SYSTEM
   Breakpoints: 1200 | 991 | 767 | 575 | 400
   ═══════════════════════════════════════════════════════════════ */

/* ─── Large screens (≤1200px) ─────────────────────────────────── */
@media (max-width: 1199.98px) {
  .search-bar { max-width: 380px; }
  .header-icon-btn span { font-size: .72rem; }
  .nav-link-item { padding: .5rem .65rem; font-size: .84rem; }
}

/* ─── Tablet (≤991px) ─────────────────────────────────────────── */
@media (max-width: 991.98px) {
  :root { --header-height: 64px; }

  /* Header */
  .search-bar { display: none !important; }
  .nav-bar { display: none !important; }
  .header-icon-btn span { display: none; }
  .header-icon-btn { padding: .4rem .45rem; }
  .logo-text { font-size: 1.15rem; }
  .site-logo-img { height: 40px; max-width: 160px; }

  /* Hero */
  .hero-slider { height: 380px; }
  .hero-title { font-size: clamp(1.5rem, 4vw, 2.2rem); }
  .hero-text { font-size: .9rem; }

  /* Flash sale */
  .flash-sale-section { padding: 2rem 0; }
  .flash-header { flex-wrap: wrap; gap: .8rem; }

  /* Product detail */
  .product-gallery { position: static; }
  .product-detail-info { padding: 1.5rem !important; }

  /* Admin */
  .admin-sidebar {
    position: fixed;
    top: 0; left: 0; height: 100vh;
    z-index: 1055;
    transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; width: 100%; }
  .sidebar-toggle { display: flex !important; }
  .admin-content { padding: 1.2rem; }

  /* Dashboard sidebar */
  .dash-sidebar { width: 100%; border-radius: var(--radius-lg); margin-bottom: 1.2rem; }
}

/* ─── Mobile (≤767px) ─────────────────────────────────────────── */
@media (max-width: 767.98px) {
  body { font-size: 14px; }

  /* Top bar */
  .top-bar { padding: .3rem 0; font-size: .74rem; }
  .top-bar .d-md-flex { display: none !important; }

  /* Header */
  .site-header { padding: 0 .6rem; }
  .logo-text { font-size: 1.05rem; }
  .logo-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .site-logo-img { height: 34px; max-width: 130px; }
  .header-icons { gap: 0; }
  .header-icon-btn { padding: .35rem .38rem; }
  .cart-badge { font-size: .6rem; min-width: 16px; height: 16px; }

  /* Hero */
  .hero-slider { height: 280px; }
  .hero-content { padding: 0 1rem; max-width: 95%; }
  .hero-title { font-size: 1.45rem; line-height: 1.3; }
  .hero-text { display: none; }
  .hero-tag { font-size: .7rem; padding: .22rem .55rem; }
  .hero-actions { margin-top: .8rem; gap: .6rem; }
  .hero-actions .btn { padding: .48rem 1.1rem; font-size: .82rem; }
  .slider-controls { bottom: 8px; }
  .slider-btn { width: 34px; height: 34px; font-size: 1rem; }

  /* Feature bar */
  .feature-item { padding: .7rem; }
  .feature-item i { font-size: 1.5rem !important; }
  .feature-item h6 { font-size: .8rem; }
  .feature-item small { font-size: .7rem; }

  /* Section headers */
  .section-header { flex-direction: column; align-items: flex-start; gap: .4rem; }
  .section-title { font-size: 1.25rem; }
  .view-all-link { font-size: .8rem; }

  /* Category cards */
  .category-card { padding: .9rem .6rem; }
  .category-icon-wrap { width: 52px; height: 52px; font-size: 1.5rem; }
  .category-card h6 { font-size: .76rem; }

  /* Product cards */
  .product-img-wrap { height: 175px; }
  .product-name { font-size: .82rem; }
  .price-current { font-size: 1rem; }
  .price-old { font-size: .75rem; }
  .product-footer { padding: .6rem .8rem; }
  .product-footer .btn { font-size: .77rem; padding: .42rem .5rem; }
  .product-action-btn { width: 30px; height: 30px; font-size: .8rem; }

  /* Flash sale */
  .flash-title h2 { font-size: 1.4rem; }
  .countdown-timer { gap: .3rem; }
  .countdown-num { font-size: 1.35rem; min-width: 36px; padding: .35rem; }
  .countdown-label { font-size: .54rem; }

  /* Promo banners */
  .promo-banner { height: 155px; padding: 1.2rem; border-radius: var(--radius); }
  .promo-banner h4 { font-size: 1rem; }
  .promo-banner p { font-size: .76rem; }
  .promo-banner .btn { font-size: .78rem; padding: .4rem .9rem; }

  /* Testimonials */
  .testimonial-card { padding: 1.3rem 1rem; }
  .testimonial-text { font-size: .87rem; }

  /* Newsletter */
  .newsletter-form { flex-direction: column; border-radius: var(--radius); gap: .5rem; }
  .newsletter-form input,
  .newsletter-form button { border-radius: var(--radius-sm) !important; width: 100%; }

  /* Footer */
  .site-footer { padding: 2.5rem 0 1.5rem; }
  .footer-title { font-size: .86rem; margin-bottom: .6rem; }
  .footer-links li a { font-size: .82rem; }
  .footer-tagline { font-size: .82rem; }
  .footer-social a { width: 34px; height: 34px; font-size: .88rem; }
  .footer-bottom { flex-direction: column; gap: .5rem; text-align: center; font-size: .74rem; }
  .payment-icons { justify-content: center; margin-top: .3rem; }

  /* Cart */
  .cart-item { flex-wrap: wrap; gap: .5rem; padding: .9rem; }
  .cart-item-img { width: 62px; height: 62px; }
  .qty-input button { width: 30px; height: 30px; font-size: .85rem; }
  .qty-input input { width: 38px; font-size: .85rem; }
  .cart-summary { padding: 1.2rem; }
  .cart-summary .btn { width: 100%; }

  /* Checkout */
  .checkout-step { padding: 1.2rem; }
  .step-num { width: 28px; height: 28px; font-size: .84rem; }
  .payment-method-card { padding: .85rem; }

  /* Product detail */
  .gallery-main { height: 270px; }
  .gallery-thumbs { gap: .5rem; }
  .gallery-thumb { width: 56px; height: 56px; }
  .product-detail-title { font-size: 1.2rem; }
  .product-detail-price .current { font-size: 1.5rem; }
  .product-actions-bar { flex-wrap: wrap; gap: .5rem; }
  .product-actions-bar .btn { flex: 1 1 140px; }
  .size-btn { padding: .32rem .6rem; font-size: .77rem; }

  /* Dashboard */
  .stat-card { padding: .9rem 1rem; }
  .stat-value { font-size: 1.5rem; }

  /* Contact */
  .contact-card { padding: 1.2rem; }
  .contact-icon-wrap { width: 48px; height: 48px; font-size: 1.3rem; }

  /* About */
  .about-hero { padding: 3rem 0; }
  .team-card img { height: 180px; }

  /* Tables */
  .table-responsive { font-size: .8rem; }

  /* Tracking */
  .tracking-timeline { padding-left: 1.2rem; }
  .t-dot { width: 28px; height: 28px; font-size: .84rem; left: -1.5rem; }
  .t-title { font-size: .87rem; }

  /* Floating */
  .float-btn { width: 44px; height: 44px; font-size: 1.2rem; }
  .floating-btns { bottom: 1rem; right: 1rem; }
}

/* ─── Extra Small (≤575px) ────────────────────────────────────── */
@media (max-width: 575.98px) {
  /* Hero */
  .hero-slider { height: 225px; }
  .hero-title { font-size: 1.2rem; }
  .slider-btn { display: none; }
  .hero-actions .btn { padding: .44rem 1rem; font-size: .8rem; }

  /* Header — hide wishlist label on very small screens */
  .header-icon-btn { padding: .32rem .32rem; }

  /* Categories: 3 per row tight */
  .category-icon-wrap { width: 46px; height: 46px; font-size: 1.3rem; }
  .category-card h6 { font-size: .7rem; }
  .category-card { padding: .75rem .4rem; }

  /* Product cards tight */
  .product-img-wrap { height: 155px; }
  .product-name { font-size: .78rem; }
  .price-current { font-size: .92rem; }
  .product-body { padding: .6rem .7rem; }
  .product-footer .btn { font-size: .74rem; padding: .38rem .4rem; }

  /* Countdown even smaller */
  .countdown-num { font-size: 1.2rem; min-width: 30px; padding: .28rem; }
  .countdown-label { font-size: .5rem; }

  /* Cart */
  .cart-item { padding: .75rem; }
  .cart-item-img { width: 52px; height: 52px; }

  /* Footer stacked */
  .footer-social { margin-top: .8rem; }

  /* Admin stats */
  .admin-stat-card { flex-direction: column; align-items: flex-start; gap: .7rem; }
  .stat-value { font-size: 1.5rem; }

  /* PWA banner wraps */
  #pwa-install-banner { flex-direction: column; align-items: flex-start; padding: 1rem; }
  #pwa-install-banner .banner-actions { width: 100%; }
  #pwa-install-banner #pwa-install-btn,
  #pwa-install-banner #pwa-dismiss-btn { flex: 1; }
}

/* ─── Tiny phones (≤400px) ────────────────────────────────────── */
@media (max-width: 399.98px) {
  :root { --header-height: 58px; }

  .logo-text { font-size: .92rem; }
  .logo-icon { width: 32px; height: 32px; font-size: .95rem; }

  .hero-slider { height: 195px; }
  .hero-title { font-size: 1.05rem; }
  .hero-actions .btn { font-size: .76rem; padding: .4rem .8rem; }

  .category-icon-wrap { width: 40px; height: 40px; font-size: 1.15rem; }
  .category-card h6 { font-size: .66rem; }

  .product-img-wrap { height: 135px; }
  .price-current { font-size: .88rem; }
  .product-footer .btn { font-size: .7rem; padding: .34rem .3rem; }

  .section-title { font-size: 1.08rem; }
  .flash-title h2 { font-size: 1.05rem; }

  .gallery-main { height: 230px; }
}

/* ─── Touch device improvements ──────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Always show product action buttons on touch devices */
  .product-actions { opacity: 1 !important; transform: translateY(0) !important; background: rgba(0,0,0,.04); }
  /* Remove hover-only transforms that break touch UX */
  .btn:hover { transform: none; box-shadow: initial; }
  .product-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  .card:hover { transform: none; }
  .category-card:hover { transform: none; box-shadow: var(--shadow-sm); }
  /* Bigger tap targets */
  .nav-link, .footer-links a, .mobile-nav-link { min-height: 44px; display: flex; align-items: center; }
}

/* ─── Print styles ────────────────────────────────────────────── */
@media print {
  .site-header, .nav-bar, .top-bar, .site-footer,
  .floating-btns, .dark-toggle, .breadcrumb-section,
  #pwa-install-banner, #offline-toast,
  .btn:not(.btn-print) { display: none !important; }
  body { background: white !important; color: black !important; font-size: 12px; }
  .container { max-width: 100% !important; width: 100% !important; padding: 0; }
  a { color: black; text-decoration: underline; }
  .card { box-shadow: none !important; border: 1px solid #ccc; }
}

/* ─── PWA Install Banner ──────────────────────────────────────── */
#pwa-install-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--gray-900);
  color: #fff;
  padding: .9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  z-index: 9998;
  box-shadow: 0 -4px 24px rgba(0,0,0,.25);
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  flex-wrap: wrap;
}
#pwa-install-banner.show { transform: translateY(0); }
#pwa-install-banner .banner-left { display: flex; align-items: center; gap: .9rem; }
#pwa-install-banner .banner-icon { font-size: 2.1rem; }
#pwa-install-banner h6 { font-size: .92rem; font-weight: 700; margin: 0; color: #fff; }
#pwa-install-banner p { font-size: .78rem; margin: 0; color: var(--gray-400); }
#pwa-install-banner .banner-actions { display: flex; gap: .5rem; flex-shrink: 0; }
#pwa-install-banner #pwa-install-btn {
  background: var(--secondary); color: #fff; border: none;
  padding: .5rem 1.3rem; border-radius: var(--radius-sm);
  font-weight: 600; font-size: .85rem; cursor: pointer;
  transition: var(--transition);
}
#pwa-install-banner #pwa-install-btn:hover { background: var(--secondary-dark); }
#pwa-install-banner #pwa-dismiss-btn {
  background: transparent; color: var(--gray-400);
  border: 1px solid var(--gray-700);
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-size: .85rem; cursor: pointer; transition: var(--transition);
}
#pwa-install-banner #pwa-dismiss-btn:hover { border-color: var(--gray-500); color: #fff; }


/* ─── Offline / Online Toast ──────────────────────────────────── */
#offline-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: var(--gray-800);
  color: #fff;
  padding: .65rem 1.4rem;
  border-radius: 50px;
  font-size: .84rem;
  font-weight: 600;
  z-index: 99999;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  gap: .5rem;
  white-space: nowrap;
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  pointer-events: none;
}
#offline-toast.show { transform: translateX(-50%) translateY(0); }
#offline-toast.online { background: var(--success); }
#offline-toast.offline { background: var(--danger); }
