/* ═══════════════════════════════════════════════════════════════
   Kerala Market Place – Main CSS Design System
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Brand Colors (Black, Golden, White) */
  --primary: #111111;
  --primary-dark: #000000;
  --primary-light: #333333;
  --primary-glow: rgba(0,0,0,0.15);
  --accent: #d4af37;
  --accent-dark: #b5952f;
  --danger: #e53935;
  --success: #2e7d32;
  --info: #1565c0;

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f7f9fc;
  --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;
  --dark: #0a0e1a;

  /* Typography */
  --font-main: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 8px 24px rgba(0,0,0,.08);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.12);
  --shadow-xl: 0 24px 60px rgba(0,0,0,.18);
  --shadow-primary: 0 8px 24px rgba(212,175,55,0.25);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Spacing */
  --header-height: 64px;
  --submenu-height: 48px;
  --sidebar-width: 300px;

  /* Transitions */
  --transition: all .25s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .45s cubic-bezier(.4,0,.2,1);
}

/* ── 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(--off-white);
  color: var(--gray-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; object-fit: cover; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, select, textarea { font-family: inherit; }

/* ── Utility Classes ───────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Price Colors */
.price-original { text-decoration: line-through; color: var(--gray-400); font-size: .85em; }
.price-sale { color: var(--danger); font-weight: 700; }
.price-normal { color: var(--gray-800); font-weight: 700; }
.discount-badge {
  background: var(--danger); color: #fff;
  font-size: .72rem; font-weight: 700;
  padding: 2px 6px; border-radius: var(--radius-full);
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(17, 17, 17, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  height: var(--header-height);
}

.header-inner {
  display: flex; align-items: center; gap: 12px;
  height: 100%; padding: 0 16px;
}

/* Logo */
.header-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
  min-width: 160px;
}
.header-logo img { height: 36px; width: auto; border-radius: 6px; }
.logo-text {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
  color: #fff; line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
  white-space: nowrap;
}
.logo-text span { color: var(--accent); }

/* Delivery Location */
.header-location {
  display: flex; flex-direction: column;
  color: rgba(255,255,255,.85);
  cursor: pointer; flex-shrink: 0;
  padding: 4px 8px; border-radius: var(--radius-sm);
  transition: var(--transition);
  border: 1px solid transparent;
}
.header-location:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
.location-label { font-size: .68rem; font-weight: 500; color: rgba(255,255,255,.7); letter-spacing: .3px; }
.location-city {
  font-size: .88rem; font-weight: 700; color: #fff;
  display: flex; align-items: center; gap: 4px;
}
.location-city i { font-size: .75rem; }

/* Search Bar */
.header-search {
  flex: 1; display: flex; align-items: center;
  background: #fff; border-radius: var(--radius-full);
  overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.15);
  height: 42px;
}
.search-category-filter {
  padding: 0 12px;
  border-right: 1px solid var(--gray-200);
  font-size: .82rem; font-weight: 600;
  color: var(--gray-700); cursor: pointer;
  background: var(--gray-50);
  height: 100%; border: none;
  min-width: 110px;
}
.search-input {
  flex: 1; padding: 0 16px; height: 100%;
  border: none; outline: none; font-size: .93rem;
  color: var(--gray-800);
}
.search-input::placeholder { color: var(--gray-400); }
.search-btn {
  width: 50px; height: 100%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition);
  flex-shrink: 0;
}
.search-btn:hover { background: var(--accent-dark); }

/* Header Right Actions */
.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.header-action-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px 10px; border-radius: var(--radius-md);
  color: rgba(255,255,255,.9); cursor: pointer;
  transition: var(--transition); position: relative;
  text-decoration: none; font-size: .75rem;
}
.header-action-btn:hover { background: rgba(255,255,255,.15); color: #fff; }
.header-action-btn i { font-size: 1.25rem; margin-bottom: 2px; }
.header-action-btn span { font-weight: 600; white-space: nowrap; font-size: .72rem; }

.cart-badge {
  position: absolute; top: 2px; right: 6px;
  background: var(--accent); color: #fff;
  font-size: .65rem; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}

.header-greeting {
  font-size: .72rem; color: rgba(255,255,255,.75);
}
.header-username {
  font-size: .85rem; font-weight: 700; color: #fff;
}

/* Sign In Button */
.btn-signin {
  background: #fff; color: var(--primary);
  padding: 8px 18px; border-radius: var(--radius-full);
  font-weight: 700; font-size: .85rem;
  transition: var(--transition); flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.btn-signin:hover { background: var(--accent); color: #fff; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════
   SUB MENU
   ═══════════════════════════════════════════════════════════════ */
.sub-menu {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  height: var(--submenu-height);
  position: sticky; top: var(--header-height); z-index: 999;
  box-shadow: var(--shadow-sm);
}
.sub-menu-inner {
  display: flex; align-items: center; gap: 16px;
  height: 100%; padding: 0 16px; overflow-x: auto;
}
.sub-menu-inner::-webkit-scrollbar { display: none; }

.hamburger-btn {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
  flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--gray-100); }
.hamburger-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--gray-700); border-radius: 2px;
  transition: var(--transition);
}

.sub-menu-categories {
  display: flex; align-items: center; gap: 4px; flex: 1;
  overflow-x: auto;
}
.sub-menu-categories::-webkit-scrollbar { display: none; }

.sub-cat-item {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-full);
  font-size: .82rem; font-weight: 600;
  color: var(--gray-700); white-space: nowrap;
  transition: var(--transition); cursor: pointer;
  text-decoration: none;
}
.sub-cat-item:hover, .sub-cat-item.active {
  background: var(--primary-glow);
  color: var(--primary);
}
.sub-cat-item i { font-size: .9rem; }

/* Custom Link tile */
.sub-cat-item.custom-link {
  background: linear-gradient(135deg, var(--accent), #ffbe5c);
  color: #fff !important;
}
.sub-cat-item.custom-link:hover { filter: brightness(1.08); }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR PANEL
   ═══════════════════════════════════════════════════════════════ */
.sidebar-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(0,0,0,.55); opacity: 0;
  pointer-events: none; transition: var(--transition-slow);
}
.sidebar-overlay.active { opacity: 1; pointer-events: all; }

.sidebar-panel {
  position: fixed; top: 0; left: -100%; z-index: 1201;
  width: var(--sidebar-width); height: 100vh;
  background: #fff; box-shadow: var(--shadow-xl);
  overflow-y: auto; transition: var(--transition-slow);
  display: flex; flex-direction: column;
}
.sidebar-panel.open { left: 0; }
.sidebar-panel::-webkit-scrollbar { width: 4px; }
.sidebar-panel::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

.sidebar-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 20px 16px 16px;
  display: flex; align-items: flex-start; justify-content: space-between;
}
.sidebar-greeting {
  color: #fff;
}
.sidebar-greeting .hello-label { font-size: .82rem; color: rgba(255,255,255,.75); }
.sidebar-greeting .hello-name { font-size: 1.3rem; font-weight: 800; font-family: var(--font-display); }
.sidebar-close {
  color: rgba(255,255,255,.8); font-size: 1.4rem;
  padding: 4px; cursor: pointer;
}

.sidebar-section { padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.sidebar-section-title {
  font-size: .7rem; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gray-400);
  padding: 8px 16px 4px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; font-size: .9rem; font-weight: 500;
  color: var(--gray-700); cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.sidebar-link:hover { background: var(--gray-50); color: var(--primary); }
.sidebar-link i { width: 20px; text-align: center; color: var(--primary); }

.sidebar-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; font-size: .88rem; font-weight: 500;
  color: var(--gray-700); cursor: pointer;
  transition: var(--transition); text-decoration: none;
}
.sidebar-cat-item:hover { background: var(--gray-50); color: var(--primary); }
.sidebar-cat-item .cat-icon { margin-right: 10px; color: var(--primary); width: 18px; text-align: center; }

.sidebar-expand-btn {
  width: 100%; padding: 10px 16px;
  background: var(--gray-50); color: var(--primary);
  font-size: .82rem; font-weight: 700;
  display: flex; align-items: center; gap: 6px;
  justify-content: center; cursor: pointer;
  transition: var(--transition); border: none;
}
.sidebar-expand-btn:hover { background: var(--primary-glow); }

.sidebar-cats-extra { display: none; }
.sidebar-cats-extra.expanded { display: block; }

/* ═══════════════════════════════════════════════════════════════
   HERO BANNER
   ═══════════════════════════════════════════════════════════════ */
.hero-banner {
  position: relative; width: 100%; height: 30vw;
  min-height: 200px; max-height: 360px;
  overflow: hidden; background: var(--gray-900);
}

.banner-track {
  display: flex; height: 100%;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}

.banner-slide {
  min-width: 100%; height: 100%; position: relative;
  overflow: hidden;
}
.banner-slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.banner-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.45) 0%, transparent 60%);
}
.banner-slide-content {
  position: absolute; left: 5%; top: 50%;
  transform: translateY(-50%); color: #fff;
}
.banner-slide-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 2.2rem);
  font-weight: 800; text-shadow: 0 2px 8px rgba(0,0,0,.4);
  margin-bottom: 8px;
}
.banner-slide-content p {
  font-size: clamp(.75rem, 1.5vw, 1rem);
  color: rgba(255,255,255,.85); margin-bottom: 16px;
}
.banner-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  padding: 10px 22px; border-radius: var(--radius-full);
  font-weight: 700; font-size: .88rem;
  transition: var(--transition); box-shadow: 0 4px 15px rgba(245,166,35,.4);
}
.banner-cta:hover { background: var(--accent-dark); transform: translateY(-2px); }

.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.9); backdrop-filter: blur(4px);
  color: var(--gray-800); font-size: 1.1rem;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10;
  box-shadow: var(--shadow-md); transition: var(--transition);
}
.banner-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.banner-arrow-left { left: 16px; }
.banner-arrow-right { right: 16px; }
.hero-banner:hover .banner-arrow { display: flex; }

.banner-dots {
  position: absolute; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 6px;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.5); cursor: pointer;
  transition: var(--transition);
}
.banner-dot.active { width: 24px; background: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   SECTION TITLES
   ═══════════════════════════════════════════════════════════════ */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-top: 28px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 800;
  color: var(--gray-900);
}
.section-title small { font-size: .78rem; font-weight: 500; color: var(--gray-400); display: block; }
.section-link {
  font-size: .83rem; font-weight: 700;
  color: var(--primary); display: flex; align-items: center; gap: 4px;
}
.section-link:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT TILES (4-image showcase)
   ═══════════════════════════════════════════════════════════════ */
.product-tiles-row {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.product-tiles-row-title {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 800;
  color: var(--gray-900); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.product-tiles-row-title .row-badge {
  font-size: .65rem; font-weight: 700;
  background: var(--accent); color: #fff;
  padding: 3px 8px; border-radius: var(--radius-full);
  text-transform: uppercase; letter-spacing: .5px;
}

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

.product-tile {
  border-radius: var(--radius-md); overflow: hidden;
  cursor: pointer; position: relative;
  transition: var(--transition);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.product-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-tile-img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover; transition: var(--transition-slow);
}
.product-tile:hover .product-tile-img { transform: scale(1.05); }
.product-tile-info {
  padding: 8px 10px 10px;
}
.product-tile-name {
  font-size: .8rem; font-weight: 600; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.product-tile-price { font-size: .85rem; font-weight: 700; color: var(--primary); }
.product-tile-old-price {
  font-size: .72rem; color: var(--gray-400);
  text-decoration: line-through; margin-left: 4px;
}

/* ── Wishlist Heart ──────────────────────────────────────── */
.wishlist-btn {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.9); border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; cursor: pointer;
  opacity: 0; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.product-tile:hover .wishlist-btn { opacity: 1; }
.wishlist-btn.active, .wishlist-btn:hover { color: var(--danger); }
.wishlist-btn i { pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT CARDS (Grid Layout)
   ═══════════════════════════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.product-card {
  background: #fff; border-radius: var(--radius-lg);
  overflow: hidden; transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  position: relative; cursor: pointer;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }

.product-card-img-wrap {
  position: relative; aspect-ratio: 1;
  overflow: hidden; background: var(--gray-50);
}
.product-card-img {
  width: 100%; height: 100%; object-fit: cover;
  transition: var(--transition-slow);
}
.product-card:hover .product-card-img { transform: scale(1.06); }
.product-card .wishlist-btn { opacity: 0; }
.product-card:hover .wishlist-btn { opacity: 1; }

.product-card-body { padding: 12px; }
.product-card-name {
  font-size: .88rem; font-weight: 600; color: var(--gray-800);
  margin-bottom: 4px; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-brand { font-size: .75rem; color: var(--gray-500); margin-bottom: 6px; }
.product-card-prices { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.product-card-rating {
  display: flex; align-items: center; gap: 4px;
  font-size: .78rem; color: var(--gray-600); margin-top: 4px;
}
.product-card-rating .stars { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════
   HORIZONTAL SCROLL SECTION
   ═══════════════════════════════════════════════════════════════ */
.h-scroll-container {
  position: relative;
}
.h-scroll-track {
  display: flex; gap: 14px;
  overflow-x: auto; padding-bottom: 8px;
  scroll-behavior: smooth;
}
.h-scroll-track::-webkit-scrollbar { height: 4px; }
.h-scroll-track::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.h-scroll-track .product-card, .h-scroll-track .product-tile { min-width: 220px; max-width: 260px; flex-shrink: 0; }

@media (max-width: 768px) {
  .h-scroll-track .product-card, .h-scroll-track .product-tile { min-width: 150px; max-width: 180px; }
}

/* ═══════════════════════════════════════════════════════════════
   INFINITE SCROLL / FEED
   ═══════════════════════════════════════════════════════════════ */
#infinite-feed {
  padding-top: 8px;
}
.infinite-loader {
  text-align: center; padding: 24px;
  color: var(--gray-400); font-size: .88rem;
}
.infinite-loader .spinner {
  width: 36px; height: 36px; border: 3px solid var(--gray-200);
  border-top-color: var(--primary); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 0 auto 8px;
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 99px;
  font-weight: 700; font-size: .95rem;
  transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border: 2px solid transparent;
  justify-content: center;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; border-radius: var(--radius-md); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-accent { 
  background: linear-gradient(135deg, #d4af37 0%, #ffdf73 50%, #b5952f 100%);
  background-size: 200% auto;
  color: #111; 
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(212,175,55,0.2);
}
.btn-accent:hover { 
  background-position: right center; 
  transform: translateY(-2px); 
  box-shadow: var(--shadow-primary); 
}
.btn-outline { background: transparent; border-color: var(--primary); color: var(--primary); border-radius: var(--radius-md); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; border-radius: var(--radius-md); }
.btn-sm { padding: 7px 16px; font-size: .82rem; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: .85rem; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-md);
  font-size: .9rem; color: var(--gray-800);
  background: #fff; transition: var(--transition); outline: none;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-input.error { border-color: var(--danger); }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   CART / CHECKOUT
   ═══════════════════════════════════════════════════════════════ */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; }
.cart-item {
  display: flex; gap: 16px; padding: 16px;
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200); margin-bottom: 12px;
}
.cart-item-img { width: 88px; height: 88px; border-radius: var(--radius-md); object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-qty-control {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
}
.qty-btn {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background: #fff; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.qty-value { min-width: 32px; text-align: center; font-weight: 700; }

.order-summary-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 20px; border: 1px solid var(--gray-200);
  position: sticky; top: calc(var(--header-height) + var(--submenu-height) + 16px);
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: .9rem; }
.summary-row.total { font-weight: 800; font-size: 1.1rem; border-top: 2px solid var(--gray-200); margin-top: 8px; padding-top: 12px; }

/* ═══════════════════════════════════════════════════════════════
   ORDER TRACKING
   ═══════════════════════════════════════════════════════════════ */
.tracking-steps { position: relative; padding-left: 32px; }
.tracking-step { position: relative; padding-bottom: 24px; }
.tracking-step::before {
  content: ''; position: absolute;
  left: -20px; top: 14px;
  width: 2px; height: 100%;
  background: var(--gray-200);
}
.tracking-step:last-child::before { display: none; }
.tracking-step-dot {
  position: absolute; left: -26px; top: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--gray-300); border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--gray-300);
}
.tracking-step.done .tracking-step-dot { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.tracking-step.current .tracking-step-dot { background: var(--primary); box-shadow: 0 0 0 2px var(--primary); animation: pulse 1.5s infinite; }
.tracking-step-label { font-weight: 700; font-size: .9rem; }
.tracking-step-time { font-size: .78rem; color: var(--gray-400); }

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--gray-900); color: var(--gray-300);
  margin-top: 48px; padding: 48px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 280px 1fr 1fr 1fr;
  gap: 32px; padding-bottom: 40px;
}
.footer-brand .logo-text { color: #fff; font-size: 1.2rem; }
.footer-desc { font-size: .85rem; color: var(--gray-400); margin-top: 12px; line-height: 1.8; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-300); font-size: 1rem; transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); color: #fff; }

.footer-col-title {
  font-size: .82rem; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; color: var(--gray-100);
  margin-bottom: 16px;
}
.footer-links li { margin-bottom: 8px; }
.footer-links a {
  font-size: .85rem; color: var(--gray-400);
  transition: var(--transition);
  display: inline-block;
  padding: 4px 0;
}
.footer-links a:hover { color: var(--primary-light); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 0; text-align: center;
  font-size: .78rem; color: var(--gray-500);
}

/* ═══════════════════════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: .8rem; color: var(--gray-500);
  padding: 12px 0;
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb-sep { color: var(--gray-300); }

/* ═══════════════════════════════════════════════════════════════
   BADGES / TAGS
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700;
}
.badge-success { background: rgba(46,125,50,.12); color: var(--success); }
.badge-warning { background: rgba(245,166,35,.12); color: var(--accent-dark); }
.badge-danger  { background: rgba(229,57,53,.10); color: var(--danger); }
.badge-info    { background: rgba(21,101,192,.10); color: var(--info); }
.badge-primary { background: var(--primary-glow); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   ALERTS / TOASTS
   ═══════════════════════════════════════════════════════════════ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: .88rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-success { background: rgba(46,125,50,.1); color: var(--success); border-left: 4px solid var(--success); }
.alert-error   { background: rgba(229,57,53,.1); color: var(--danger); border-left: 4px solid var(--danger); }
.alert-info    { background: rgba(21,101,192,.08); color: var(--info); border-left: 4px solid var(--info); }

.toast-container {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
}
.toast {
  background: var(--gray-900); color: #fff;
  padding: 12px 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl); font-size: .88rem;
  display: flex; align-items: center; gap: 10px;
  animation: slideIn .3s ease;
  max-width: 320px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(26,107,60,.4)} 50%{box-shadow:0 0 0 8px rgba(26,107,60,0)} }
@keyframes slideIn { from{transform:translateX(100%);opacity:0} to{transform:translateX(0);opacity:1} }
@keyframes fadeIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }

.fade-in { animation: fadeIn .4s ease; }

/* ═══════════════════════════════════════════════════════════════
   CATEGORY / SEARCH LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.category-layout {
  display: grid; grid-template-columns: 240px 1fr; gap: 24px;
}
.category-sidebar {
  position: sticky; top: calc(var(--header-height) + 12px);
  max-height: calc(100vh - var(--header-height) - 24px);
  overflow-y: auto;
}
.category-sidebar::-webkit-scrollbar { width: 4px; }
.category-sidebar::-webkit-scrollbar-thumb { background: var(--gray-300); }
.mobile-filter-btn { display: none; }
.category-sidebar-overlay { display: none; }
.category-sidebar-close { display: none; }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT DETAILS LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.product-section { background: #fff; border-radius: 18px; padding: 28px; box-shadow: var(--shadow-sm); margin-bottom: 24px; }

/* ═══════════════════════════════════════════════════════════════
   PRODUCT SUB-MENU (sticky tabs: Product / Features / Reviews)
   ═══════════════════════════════════════════════════════════════ */
.product-submenu {
  position: sticky; top: var(--header-height); z-index: 200;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  transform: translateY(-110%); opacity: 0; pointer-events: none;
  transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1), opacity .3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.product-submenu.visible {
  transform: translateY(0); opacity: 1; pointer-events: auto;
}
.product-submenu-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 20px;
  display: flex; gap: 4px;
}
.product-submenu-link {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 18px; font-size: .85rem; font-weight: 600;
  color: var(--gray-600); text-decoration: none;
  border-bottom: 2px solid transparent; transition: .2s; white-space: nowrap;
}
.product-submenu-link:hover { color: var(--primary); }
.product-submenu-link.active { color: var(--primary); border-bottom-color: var(--primary); }
.product-submenu-badge {
  background: var(--primary); color: #fff;
  border-radius: 99px; font-size: .7rem; padding: 1px 7px; font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════
   WRITE A REVIEW BOX
   ═══════════════════════════════════════════════════════════════ */
.write-review-box {
  margin-top: 28px; padding-top: 24px;
  border-top: 2px dashed var(--gray-200);
}
.star-picker { display: flex; gap: 6px; cursor: pointer; }
.star-picker .star-pick {
  font-size: 1.6rem; color: var(--gray-300); transition: color .15s, transform .15s;
}
.star-picker .star-pick.active,
.star-picker .star-pick.hover { color: #fbbf24; transform: scale(1.15); }

/* Review cards */
.review-card { border-bottom: 1px solid var(--gray-100); padding: 18px 0; }
.review-card:last-of-type { border-bottom: none; }
.review-action-btn {
  background: none; border: none; cursor: pointer;
  font-size: .78rem; font-weight: 600; color: var(--gray-500);
  display: inline-flex; align-items: center; gap: 4px; padding: 0;
  transition: color .15s;
}
.review-action-btn:hover { color: var(--primary); }

/* Replies thread */
.review-replies-thread {
  margin-top: 10px; margin-left: 48px;
  border-left: 3px solid var(--primary-glow); padding-left: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.review-reply { background: var(--gray-50); border-radius: 10px; padding: 10px 14px; }
.review-reply-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem; font-weight: 700; padding: 2px 8px;
  border-radius: 99px;
}
.seller-badge { background: rgba(26,107,60,.1); color: #1a6b3c; }
.user-badge   { background: var(--primary-glow); color: var(--primary); }

/* ═══════════════════════════════════════════════════════════════
   ACCOUNT / FORMS LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .cart-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --header-height: 114px; }
  .site-header-desktop { display: none !important; }
  .site-header-mobile { display: block !important; }
  .sub-menu { top: 114px; }
  
  /* Seller Sidebar Responsive */
  .seller-nav { 
     position: fixed !important; top: 0; right: 0; bottom: 0; width: 260px; 
     background: #1a6b3c; z-index: 1050; flex-direction: column !important; 
     padding: 60px 20px 20px; transform: translateX(100%); 
     transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
     box-shadow: -2px 0 12px rgba(0,0,0,0.15); align-items: stretch !important;
  }
  .seller-nav.open { transform: translateX(0); }
  .seller-mobile-toggle { 
     display: block !important; background: none; border: none; color: #fff; 
     font-size: 1.4rem; padding: 4px; cursor: pointer; margin-left: auto;
  }
  .seller-nav-close { 
     display: block !important; position: absolute; top: 16px; left: 16px; 
     background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer;
  }
  .seller-sidebar-overlay { 
     position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
     background: rgba(0,0,0,0.5); z-index: 1040; display: block !important;
     opacity: 0; pointer-events: none; transition: 0.3s;
  }
  .seller-sidebar-overlay.active { opacity: 1; pointer-events: auto; }
  
  .category-layout { grid-template-columns: 1fr; }
  .mobile-filter-btn { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
  .category-sidebar { 
    position: fixed; top: 0; left: 0; min-height: 100vh; width: 280px; 
    background: #fff; z-index: 1050; transform: translateX(-100%); 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0,0,0,0.15); max-height: none;
  }
  .category-sidebar.open { transform: translateX(0); }
  .category-sidebar-inner { min-height: 100%; border-radius: 0 !important; }
  .category-sidebar-overlay { 
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; 
    background: rgba(0,0,0,0.5); z-index: 1040; display: block;
    opacity: 0; pointer-events: none; transition: 0.3s;
  }
  .category-sidebar-overlay.active { opacity: 1; pointer-events: auto; }
  .category-sidebar-close { 
    display: block; position: absolute; top: 16px; right: 16px; 
    background: none; border: none; font-size: 1.4rem; color: var(--gray-500);
    padding: 8px; z-index: 2;
  }

  .product-layout { grid-template-columns: 1fr; gap: 16px; }
  .product-section { padding: 16px; border-radius: 14px; }
  
  .form-grid-2 { grid-template-columns: 1fr; }
  .form-grid-3 { grid-template-columns: 1fr; }

  .tiles-4-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-banner { height: 50vw; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
  .site-header-mobile { display: none !important; }
  /* Hide seller/admin mobile nav toggle on desktop */
  .seller-mobile-toggle { display: none !important; }
  .seller-nav-close     { display: none !important; }
  .admin-mobile-toggle  { display: none !important; }
  .admin-nav-close      { display: none !important; }
}
@media (max-width: 480px) {
  .container { padding: 0 10px; }
  .tiles-4-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .section-title { font-size: 1.1rem; }
  
  /* Seller Resets for Mobile */
  div[style*="max-width:1200px"] > div[style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="max-width:1200px"] > div[style*="gap:12px;margin-bottom:28px"] {
    flex-direction: column !important;
  }

  /* Native App Style Bottom Navigation */
  .mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    display: flex; justify-content: space-around; align-items: center;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
  }
  .mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--gray-500); text-decoration: none; font-size: 0.65rem; font-weight: 600;
    transition: all 0.3s ease; position: relative; width: 25%;
  }
  .mobile-nav-item i {
    font-size: 1.3rem; margin-bottom: 3px; transition: transform 0.2s ease;
  }
  .mobile-nav-item.active { color: var(--primary); }
  .mobile-nav-item.active i { transform: translateY(-2px); }
  .mobile-cart-badge {
    position: absolute; top: -4px; right: 20%;
    background: var(--danger); color: #fff; font-size: 0.6rem;
    font-weight: 800; padding: 1px 5px; border-radius: 99px; border: 2px solid #fff;
  }
  /* Push main content up so it's not hidden behind the bottom bar */
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)) !important; }

  /* Adjust product actions to float above nav */
  .mobile-sticky-actions {
    position: fixed; bottom: calc(60px + env(safe-area-inset-bottom)); left: 0; right: 0;
    background: rgba(255,255,255,0.95); padding: 10px 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.1);
    display: flex; gap: 10px; z-index: 1000;
    justify-content: space-between;
  }
  .mobile-sticky-actions .btn {
    flex: 1; padding: 12px 0; font-size: 0.95rem; border-radius: 99px;
  }
}
@media (min-width: 481px) {
  .mobile-sticky-actions { display: none !important; }
  .mobile-bottom-nav { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════
   LOADING SKELETON
   ═══════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ── Production Best Practices ────────────────────────────────────────── */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Tablet explicit overrides */
@media (min-width: 600px) and (max-width: 768px) {
  .product-tiles-row-title { font-size: 1rem; }
  .tiles-4-grid { grid-template-columns: repeat(3, 1fr); }
  .cart-layout { grid-template-columns: 1fr; }
}

/* Extra Large Screens */
@media (min-width: 1600px) {
  .container { max-width: 1540px; }
  .hero-banner { height: 25vw; max-height: 400px; }
  .tiles-4-grid { grid-template-columns: repeat(4, 1fr); }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

/* Dark Mode Preferences */
@media (prefers-color-scheme: dark) {
  /* Commented out as this requires explicit theme variable overrides
  :root {
    --off-white: #0a0e1a;
    --gray-800: #e2e8f0;
    --gray-900: #f1f5f9;
  }
  */
}

/* Print Styles */
@media print {
  .site-header, .sub-menu, .hero-banner, .site-footer, .wishlist-btn, .mobile-bottom-nav, .mobile-sticky-actions {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
  .product-section, .product-card {
    box-shadow: none;
    border: 1px solid #ddd;
    page-break-inside: avoid;
  }
}

/* Focus styles for accessibility */
*:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}


/* ═══════════════════════════════════════════════════════════════
   EXPANDED LANDING PAGE STYLES (Shop By Category & Promo Banners)
   ═══════════════════════════════════════════════════════════════ */

/* Category Circles */
.category-circle-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  gap: 8px;
  color: var(--gray-800);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 80px;
}
.category-circle-link:hover {
  transform: translateY(-4px);
}
.category-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--accent);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.category-circle::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.category-circle-link:hover .category-circle {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.category-circle-link:hover .category-circle::before {
  opacity: 0.1;
}
.category-circle i {
  position: relative;
  z-index: 1;
}
.category-circle-name {
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

/* Mid-Page Promo Banners */
.promo-banner-row {
  display: flex;
  gap: 20px;
  margin: 32px 0 24px 0;
  width: 100%;
}
@media(max-width: 768px) {
  .promo-banner-row {
    flex-direction: column;
    gap: 16px;
  }
}
.promo-banner {
  flex: 1;
  border-radius: 16px;
  padding: 40px 32px;
  color: #fff;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 200px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.promo-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.15);
}
.promo-banner::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: linear-gradient(rgba(255,255,255,0.1), rgba(0,0,0,0.2));
  pointer-events: none;
}
.promo-banner h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.promo-banner p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}
.promo-banner .btn {
  background: #fff;
  color: #111;
  padding: 10px 24px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  pointer-events: none;
}
.pb-gradient-1 { background: linear-gradient(135deg, #FF6B6B, #C0392B); }
.pb-gradient-2 { background: linear-gradient(135deg, #4A90E2, #2980B9); }
.pb-gradient-3 { background: linear-gradient(135deg, #9B59B6, #8E44AD); }


