/* =========================================================
 *  OLLECTRA E-COMMERCE — Premium Stylesheet
 *  Brand: #7f3f98 (Purple) | Bengali / BDT
 * ========================================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

/* ── CSS Variables (Design Tokens) ── */
:root {
  --primary: #7f3f98;
  --primary-light: #9b5fb5;
  --primary-dark: #5e2d73;
  --primary-glow: rgba(127, 63, 152, 0.35);
  --accent-red: #e53e3e;
  --accent-red-light: #fc8181;
  --success: #38a169;
  --warning: #f0c040;
  --warning-dark: #d4a017;
  --bg: #f5f5f7;
  --surface: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-primary: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif;
  --header-height: 120px;
  --bottom-nav-height: 64px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: var(--bottom-nav-height); /* space for mobile bottom nav */
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ── Utilities ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ── Scroll Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
 *  HEADER
 * ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,0.95);
}

/* Header Top Row */
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}

.hamburger-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.hamburger-btn:hover { background: var(--border-light); }
.hamburger-btn span {
  display: block;
  width: 20px;
  height: 2.5px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.header-logo {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-action-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: var(--transition);
}
.header-action-btn:hover {
  background: var(--border-light);
  color: var(--primary);
}
.header-action-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--accent-red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transform: scale(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-badge.show { transform: scale(1); }

/* Search Bar */
.header-search {
  display: flex;
  align-items: center;
  padding: 0 16px 12px;
  gap: 0;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 2px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  padding: 0 12px;
  height: 44px;
  transition: var(--transition);
}
.search-input-wrap:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-input-wrap svg {
  width: 18px;
  height: 18px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-right: 8px;
}

.search-input {
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
  width: 100%;
}
.search-input::placeholder { color: var(--text-muted); }

.search-category-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: nowrap;
  transition: var(--transition);
}
.search-category-btn:hover {
  background: var(--primary-dark);
}
.search-category-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Desktop Nav (hidden on mobile) */
.desktop-nav {
  display: none;
}

/* =========================================================
 *  MOBILE MENU
 * ========================================================= */

/* =========================================================
 *  PAGINATION
 * ========================================================= */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
}
.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* =========================================================
 *  RESPONSIVE (MEDIA QUERIES)
 * ========================================================= */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 200;
  pointer-events: none;
  visibility: hidden;
}
.mobile-menu.active {
  pointer-events: all;
  visibility: visible;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(4px);
}
.mobile-menu.active .mobile-menu-overlay { opacity: 1; }

.mobile-menu-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--surface);
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
}
.mobile-menu.active .mobile-menu-content { transform: translateX(0); }

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-logo { height: 28px; }

.close-menu-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.close-menu-btn:hover {
  background: var(--border-light);
  color: var(--accent-red);
}

.mobile-nav {
  padding: 12px 0;
}
.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.mobile-nav a:hover,
.mobile-nav a.active {
  background: rgba(127,63,152,0.06);
  border-left-color: var(--primary);
  color: var(--primary);
}

/* =========================================================
 *  HERO CAROUSEL
 * ========================================================= */
.hero-section {
  padding: 12px 16px 0;
}

.hero-carousel {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 200px;
  box-shadow: var(--shadow-lg);
}

.hero-slides {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero-slide {
  min-width: 100%;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-slide-icon {
  font-size: 48px;
  margin-bottom: 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-slide h2 {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 8px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-slide p {
  font-size: 13px;
  opacity: 0.85;
  margin-bottom: 20px;
  line-height: 1.5;
  max-width: 320px;
}

.hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 20px var(--primary-glow);
  transition: var(--transition);
  align-self: flex-start;
}
.hero-cta-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px var(--primary-glow);
}
.hero-cta-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.hero-dot.active {
  width: 24px;
  background: white;
}

/* Arrows */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-arrow:hover {
  background: rgba(255,255,255,0.3);
}
.hero-prev { left: 12px; }
.hero-next { right: 12px; }

/* Decorative shapes on hero slide */
.hero-slide::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(127,63,152,0.15);
  top: -40px;
  right: -60px;
  pointer-events: none;
}
.hero-slide::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  bottom: -30px;
  left: -30px;
  pointer-events: none;
}

/* =========================================================
 *  SECTIONS (General)
 * ========================================================= */
.section { padding: 24px 0; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  padding-left: 12px;
  border-left: 4px solid var(--primary);
}

.see-all-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  transition: var(--transition);
  white-space: nowrap;
}
.see-all-link:hover {
  color: var(--primary-dark);
  transform: translateX(4px);
}

/* =========================================================
 *  CATEGORY GRID
 * ========================================================= */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 8px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  text-align: center;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.category-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(127,63,152,0.05), rgba(127,63,152,0.12));
  border-radius: var(--radius-md);
  transition: var(--transition);
  padding: 8px;
  position: relative;
  overflow: hidden;
}

.category-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.category-card:hover .category-icon {
  background: linear-gradient(135deg, rgba(127,63,152,0.15), rgba(127,63,152,0.25));
  box-shadow: inset 0 0 10px rgba(127,63,152,0.1);
}

.category-card:hover .category-icon img {
  transform: scale(1.15) translateY(-2px);
  filter: drop-shadow(0 6px 12px rgba(127,63,152,0.3));
}

.category-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

/* =========================================================
 *  COUNTDOWN TIMER
 * ========================================================= */
.flash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.flash-timer-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.timer-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.countdown-item {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3e8ff;
  border-radius: 4px;
  padding: 4px 6px;
  min-width: 24px;
}
.countdown-item span {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-sep {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}

.see-all-arrow {
  font-size: 16px;
  color: var(--text-primary);
  margin-left: 4px;
  font-weight: 700;
}

/* =========================================================
 *  PRODUCT GRID & CARDS
 * ========================================================= */
.product-grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding-bottom: 12px;
  scrollbar-width: none; /* Firefox */
}
.product-grid::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Flash Sale specific styling to force horizontal scroll everywhere */
#flashSaleGrid {
  display: flex !important;
  overflow-x: auto !important;
  scroll-snap-type: x mandatory;
  gap: 16px;
  padding-bottom: 16px;
  scrollbar-width: none;
}
#flashSaleGrid::-webkit-scrollbar { display: none; }
#flashSaleGrid .product-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
}

.recommended-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.product-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border-light);
  flex: 0 0 165px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-light);
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  background: var(--accent-red);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.product-image {
  position: relative;
  padding-top: 100%; /* 1:1 aspect ratio */
  background: var(--bg);
  overflow: hidden;
}
.product-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.product-card:hover .product-image img {
  transform: scale(1.08);
}

.product-info {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  min-height: 33px;
}

.product-prices {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.old-price {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.new-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-red);
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.star-icon {
  font-size: 12px;
}
.rating-val {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}
.review-count {
  font-size: 11px;
  color: var(--text-muted);
}

.add-to-cart-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--primary);
  border: 1px solid rgba(127,63,152,0.3);
  border-radius: var(--radius-full);
  transition: var(--transition);
}
.add-to-cart-btn:hover {
  background: rgba(127,63,152,0.1);
  transform: scale(1.1);
}
.add-to-cart-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wishlist-toggle-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  z-index: 2;
  transition: var(--transition);
}
.wishlist-toggle-btn:hover {
  transform: scale(1.1);
  color: var(--accent-red);
}
.wishlist-toggle-btn.active {
  color: var(--accent-red);
}
.wishlist-toggle-btn.active svg {
  fill: var(--accent-red);
}
.wishlist-toggle-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: var(--transition);
}

/* =========================================================
 *  CART & WISHLIST PAGE LAYOUTS
 * ========================================================= */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}
@media (min-width: 768px) {
  .cart-layout {
    grid-template-columns: 2fr 1fr;
  }
}

.cart-items-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: white;
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cart-item-info p {
  font-weight: 700;
  color: var(--primary);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-qty {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-body);
  padding: 4px 8px;
  border-radius: var(--radius-full);
}

.cart-remove-btn {
  font-size: 12px;
  color: var(--accent-red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.cart-remove-btn:hover {
  text-decoration: underline;
}

.cart-summary-card {
  background: white;
  padding: 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  position: sticky;
  top: 80px;
}

.cart-summary-card h3 {
  margin-bottom: 16px;
  font-size: 18px;
  color: var(--text-primary);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 14px;
}

.cart-summary-card hr {
  border: none;
  border-top: 1px dashed var(--border-light);
  margin: 16px 0;
}

.total-row {
  color: var(--primary);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 0;
}

/* =========================================================
 *  PROMO BANNERS
 * ========================================================= */
.promo-banners {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo-banner {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

/* Decorative pattern */
.promo-banner::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  opacity: 0.1;
  top: -40px;
  right: -40px;
  background: white;
  pointer-events: none;
}
.promo-banner::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  opacity: 0.08;
  bottom: -20px;
  left: -20px;
  background: white;
  pointer-events: none;
}

/* Newsletter Banner */
.promo-newsletter {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.promo-newsletter h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}
.promo-newsletter p {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 16px;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.newsletter-input {
  flex: 1;
  height: 42px;
  padding: 0 14px;
  border: 2px solid rgba(255,255,255,0.25);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.12);
  color: white;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.6); }
.newsletter-input:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.2);
}

.newsletter-btn {
  height: 42px;
  padding: 0 20px;
  background: white;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.newsletter-btn:hover {
  background: var(--bg);
  transform: translateY(-1px);
}

/* Delivery Banner */
.promo-delivery {
  background: linear-gradient(135deg, var(--warning) 0%, var(--warning-dark) 100%);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 16px;
}

.promo-delivery-icon {
  font-size: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.promo-delivery h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.promo-delivery p {
  font-size: 13px;
  opacity: 0.85;
}

/* =========================================================
 *  TRUST BADGES
 * ========================================================= */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.trust-badge:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.trust-badge-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.trust-badge-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.trust-badge-subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

/* =========================================================
 *  FOOTER
 * ========================================================= */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.8);
  padding: 40px 0 20px;
  margin-top: 16px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.footer-logo {
  height: 32px;
  margin-bottom: 12px;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.7;
}

.footer-col h4 {
  font-size: 15px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul a {
  font-size: 13px;
  opacity: 0.7;
  transition: var(--transition);
}
.footer-col ul a:hover {
  opacity: 1;
  color: var(--primary-light);
  padding-left: 4px;
}

.footer-col p {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 6px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom p {
  font-size: 12px;
  opacity: 0.5;
}

/* =========================================================
 *  BOTTOM NAV (Mobile Only)
 * ========================================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 -2px 16px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  z-index: 100;
  border-top: 1px solid var(--border-light);
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}
.bottom-nav-item.active {
  color: var(--primary);
}
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav-label {
  font-size: 10px;
}

/* =========================================================
 *  ANIMATIONS
 * ========================================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes popIn {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text-primary);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 300;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
 *  DESKTOP BREAKPOINTS
 * ========================================================= */

/* ── Tablet (768px+) ── */
@media (min-width: 768px) {
  .hero-carousel { min-height: 300px; }
  .hero-slide { padding: 48px 40px; }
  .hero-slide h2 { font-size: 28px; }
  .hero-slide p { font-size: 15px; }

  .category-grid { grid-template-columns: repeat(6, 1fr); }

  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }

  .promo-banners { flex-direction: row; }

  .trust-badges { grid-template-columns: repeat(4, 1fr); }

  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Desktop (1024px+) ── */
@media (min-width: 1024px) {
  :root {
    --header-height: auto;
  }

  body { padding-bottom: 0; } /* No bottom nav padding */

  /* Header: consolidated layout */
  .header-top {
    padding: 14px 32px;
    gap: 20px;
  }
  .hamburger-btn { display: none; }
  .header-logo { height: 36px; }

  .header-search {
    padding: 0 32px 0;
    order: 0;
    flex: 1;
    max-width: 520px;
    margin: 0 auto;
    padding-bottom: 10px;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 32px 10px;
    border-top: 1px solid var(--border-light);
  }
  .desktop-nav a {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
  }
  .desktop-nav a:hover {
    color: var(--primary);
    background: rgba(127,63,152,0.06);
  }

  /* Hero */
  .hero-section { padding: 16px 32px 0; }
  .hero-carousel { min-height: 400px; border-radius: var(--radius-xl); }
  .hero-slide { padding: 60px 56px; }
  .hero-slide h2 { font-size: 36px; }
  .hero-slide p { font-size: 16px; max-width: 500px; }
  .hero-slide-icon { font-size: 64px; }
  .hero-cta-btn { padding: 14px 36px; font-size: 15px; }

  .hero-arrow {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }
  .hero-prev { left: 20px; }
  .hero-next { right: 20px; }

  /* Sections */
  .section { padding: 32px 0; }
  .section-title { font-size: 22px; }

  /* Products */
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .product-title { font-size: 14px; }
  .new-price { font-size: 18px; }

  /* Promo */
  .promo-newsletter h3,
  .promo-delivery h3 { font-size: 20px; }

  /* Trust */
  .trust-badge { padding: 28px 16px; }
  .trust-badge-icon { font-size: 40px; }
  .trust-badge-title { font-size: 14px; }

  /* Footer */
  .footer { padding: 56px 0 24px; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }

  /* Bottom Nav — HIDDEN on desktop */
  .bottom-nav { display: none; }

  /* Container */
  .container { padding: 0 32px; }
}

/* ── Large Desktop (1440px+) ── */
@media (min-width: 1440px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
  .hero-slide { padding: 80px 80px; }
  .hero-slide h2 { font-size: 42px; }
}
