/* ============================================
   KARAHANLI GROS MARKET - CSS Design System
   Mobile-first responsive e-commerce
   ============================================ */

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

/* --- Price Visibility Toggle --- */
body.prices-hidden .price-display {
  display: none !important;
}
body.prices-hidden .cart-footer .cart-total {
  display: none !important;
}


/* ============================================
   CSS Custom Properties (Theme System)
   ============================================ */
:root {
  /* Red Theme (Default) */
  --primary: #DC2626;
  --primary-light: #EF4444;
  --primary-dark: #B91C1C;
  --primary-glow: rgba(220, 38, 38, 0.3);
  --accent: #F97316;
  --accent-light: #FB923C;

  /* Neutrals (DEFAULT LIGHT) */
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F1F3F5;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-overlay: rgba(0, 0, 0, 0.2);
  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.05);

  /* Text (DEFAULT LIGHT) */
  --text-primary: #111111;
  --text-secondary: #444444;
  --text-muted: #888888;

  /* Shadows (DEFAULT LIGHT) */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

  /* Status */
  --success: #22C55E;
  --warning: #EAB308;
  --danger: #EF4444;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 20px var(--primary-glow);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Header height */
  --header-height: 64px;
}

/* Dark Color Scheme */
[data-color-scheme="dark"] {
  --bg-primary: #0F0F0F;
  --bg-secondary: #1A1A1A;
  --bg-card: #222222;
  --bg-card-hover: #2A2A2A;
  --bg-glass: rgba(30,30,30,0.85);
  --bg-overlay: rgba(0,0,0,0.6);
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.12);
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #666666;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* Theme variations */
[data-theme="green"] {
  --primary: #16A34A;
  --primary-light: #22C55E;
  --primary-dark: #15803D;
  --primary-glow: rgba(22, 163, 74, 0.3);
  --accent: #EAB308;
  --accent-light: #FACC15;
}

[data-theme="blue"] {
  --primary: #2563EB;
  --primary-light: #3B82F6;
  --primary-dark: #1D4ED8;
  --primary-glow: rgba(37, 99, 235, 0.3);
  --accent: #06B6D4;
  --accent-light: #22D3EE;
}

[data-theme="purple"] {
  --primary: #9333EA;
  --primary-light: #A855F7;
  --primary-dark: #7E22CE;
  --primary-glow: rgba(147, 51, 234, 0.3);
  --accent: #EC4899;
  --accent-light: #F472B6;
}

[data-theme="orange"] {
  --primary: #EA580C;
  --primary-light: #F97316;
  --primary-dark: #C2410C;
  --primary-glow: rgba(234, 88, 12, 0.3);
  --accent: #EAB308;
  --accent-light: #FACC15;
}

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

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

/* Base Page Animation */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.main-content > div {
  animation: pageFadeIn 0.5s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--transition-normal), color var(--transition-normal);
}

header, .side-menu, .cart-panel, .product-modal, .product-card, .checkout-page, .footer-content {
  transition: background var(--transition-normal), border-color var(--transition-normal), color var(--transition-normal);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  outline: none;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

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

/* ============================================
   Header
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 var(--space-md);
  transition: background var(--transition-normal);
}

.header-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  white-space: nowrap;
  color: var(--primary-light);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-glow);
}

.search-bar {
  flex: 1;
  max-width: 500px;
  position: relative;
  display: none;
}

.search-bar input {
  width: 100%;
  height: 40px;
  padding: 0 var(--space-md) 0 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-bar input:focus {
  border-color: var(--primary);
}

.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.header-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
  position: relative;
}

.header-btn:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--primary);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: badgePop 0.3s ease;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}

.hamburger span {
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translateY(5px) translateX(5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px) translateX(5px);
}

/* ============================================
   Mobile Search
   ============================================ */
.mobile-search {
  display: block;
  padding: calc(var(--header-height) + var(--space-md)) var(--space-md) 0;
}

.mobile-search input {
  width: 100%;
  height: 44px;
  padding: 0 var(--space-md) 0 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.mobile-search input::placeholder {
  color: var(--text-muted);
}

.mobile-search input:focus {
  border-color: var(--primary);
}

.mobile-search-wrapper {
  position: relative;
}

.mobile-search-wrapper .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* ============================================
   Navigation / Side Menu
   ============================================ */
.side-menu-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.side-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-menu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 1002;
  transition: left var(--transition-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.side-menu.active {
  left: 0;
}

.side-menu-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.side-menu-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary-light);
}

.side-menu-nav {
  flex: 1;
  padding: var(--space-md);
}

.side-menu-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.side-menu-nav a:hover,
.side-menu-nav a.active {
  background: var(--bg-card);
  color: var(--text-primary);
}

.side-menu-nav a.active {
  color: var(--primary-light);
}

.side-menu-nav a i {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}

.menu-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-md) 0;
}

.category-list-menu {
  padding: 0 var(--space-md) var(--space-md);
}

.category-list-menu h4 {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.category-list-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.category-list-menu a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Theme selector in side menu */
.theme-selector {
  padding: var(--space-md);
  border-top: 1px solid var(--border);
}

.theme-selector h4 {
  padding: var(--space-sm) var(--space-md);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.theme-options {
  display: flex;
  gap: var(--space-sm);
  padding: 0 var(--space-md);
  flex-wrap: wrap;
}

.theme-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.theme-dot:hover {
  transform: scale(1.15);
}

.theme-dot.active {
  border-color: var(--text-primary);
}

.theme-dot.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
}

.theme-dot[data-theme="red"] { background: #DC2626; }
.theme-dot[data-theme="green"] { background: #16A34A; }
.theme-dot[data-theme="blue"] { background: #2563EB; }
.theme-dot[data-theme="purple"] { background: #9333EA; }
.theme-dot[data-theme="orange"] { background: #EA580C; }

/* ============================================
   Main Content
   ============================================ */
.main-content {
  padding-top: var(--header-height);
  min-height: 100vh;
}

/* ============================================
   Category Chips (Horizontal Scroll)
   ============================================ */
.category-chips {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-padding: var(--space-lg);
}

.category-chips::-webkit-scrollbar {
  display: none;
}

.category-item {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-normal);
  user-select: none;
  width: 72px;
}

.category-icon-wrapper {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px; /* Squircle shape */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.category-icon-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), transparent);
  pointer-events: none;
}

.category-item:hover .category-icon-wrapper {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.category-item.active .category-icon-wrapper {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.category-item.active .category-icon-wrapper::after {
  background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
}

.category-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-item.active .category-label {
  color: var(--primary-light);
}

/* ============================================
   Mobile Category Grid Details
   ============================================ */
.mobile-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  padding: 0 var(--space-md) var(--space-md);
}

.mobile-category-grid .category-item {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-sm);
  transition: all var(--transition-normal);
}

.mobile-category-grid .category-icon-wrapper {
  background: var(--bg-card);
}

.mobile-category-grid .category-item.active {
  background: rgba(239, 68, 68, 0.05);
  border-color: var(--primary);
}

/* Visibility classes */
@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
}
@media (min-width: 768px) {
  .mobile-only {
    display: none !important;
  }
  
  .mobile-category-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* ============================================
   Products Grid
   ============================================ */
.products-section {
  padding: 0 var(--space-md) var(--space-3xl);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.products-count {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

/* ============================================
   Product Card
   ============================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg), 0 10px 40px -10px var(--primary-glow);
}

.product-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
  position: relative;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.1);
}

.product-card-image .placeholder-icon {
  font-size: 3rem;
  opacity: 0.3;
}

.product-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 2px 8px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  color: white;
}

.out-of-stock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  font-weight: 700;
  font-size: 0.9rem;
}

.product-card-info {
  padding: var(--space-md);
}

.product-card-category {
  font-size: 0.7rem;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.product-card-name {
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.product-card-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
}

.product-card-unit {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 400;
}

.add-to-cart-btn {
  padding: 0 12px;
  height: 34px;
  min-width: 110px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 6px;
  white-space: nowrap;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

/* ============================================
   HOME SLIDER & BANNERS
   ============================================ */
#homePage {
  min-height: 100vh;
  background: var(--bg-primary);
  display: block; /* Managed by JS showPage */
}

.home-slider-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
  margin: 0 auto 24px;
  max-width: calc(100% - calc(var(--space-md) * 2));
}

.home-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.home-slider::-webkit-scrollbar {
  display: none;
}

.slide-item {
  min-width: 100%;
  flex-shrink: 0;
  scroll-snap-align: start;
  aspect-ratio: 3 / 1;
  max-height: 450px; /* Devleşmeyi önler */
  position: relative;
  cursor: pointer;
  background: #f8f8f8; /* Görselden küçükse kenarlar boş kalmasın */
}

.slide-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center !important;
  transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.slide-item:hover img {
  transform: scale(1.02);
}

.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}

.slider-dot.active {
  width: 24px;
  background: #fff;
  border-radius: 4px;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s;
  opacity: 0;
}

.home-slider-container:hover .slider-arrow {
  opacity: 1;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev { left: 15px; }
.slider-arrow.next { right: 15px; }

@media (max-width: 768px) {
  .slider-arrow {
    display: none; /* Hide arrows on mobile to focus on touch swipe */
  }
}

.home-banners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  margin: 0 auto 24px;
  max-width: calc(100% - calc(var(--space-md) * 2));
}

.banner-item {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/9;
  box-shadow: 0 8px 20px -8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.banner-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px -12px rgba(0,0,0,0.2);
}

.banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .home-slider-container, .home-banners-grid {
    margin: 0 10px 20px;
    max-width: calc(100% - 20px);
  }
  .slide-item {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    aspect-ratio: 3 / 1 !important;
    height: auto !important;
    max-height: none !important;
    min-height: auto !important;
  }
  .slide-item img {
    object-fit: contain !important;
    background: #f8f8f8;
  }
  .home-slider {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }
  .banner-item {
    aspect-ratio: 3 / 1;
  }
  .slider-dots {
    bottom: 8px;
  }
}

.add-to-cart-btn:hover {
  background: var(--primary-light);
  transform: scale(1.1);
}

.add-to-cart-btn:active {
  transform: scale(0.95);
}

/* ============================================
   Product Detail Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
}

.modal-overlay.active .product-modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 1;
}

.modal-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  position: relative;
  overflow: hidden;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-category {
  font-size: 0.8rem;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.modal-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.modal-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.modal-detail-chip {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.modal-price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-light);
  margin-bottom: var(--space-lg);
}

.modal-price .unit {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.qty-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.qty-value {
  font-size: 1.2rem;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

.modal-add-btn {
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.modal-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--primary-glow);
}

.modal-add-btn:active {
  transform: translateY(0);
}

/* ============================================
   Cart Panel
   ============================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-secondary);
  z-index: 3001;
  transition: right var(--transition-slow);
  display: flex;
  flex-direction: column;
}

.cart-panel.active {
  right: 0;
}

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

.cart-header h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}

.cart-close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
  gap: var(--space-md);
}

.cart-empty i {
  font-size: 3rem;
  opacity: 0.3;
}

.cart-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: var(--space-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  color: var(--primary-light);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.cart-qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.cart-qty-btn:hover {
  border-color: var(--primary);
}

.cart-qty-value {
  font-weight: 600;
  font-size: 0.85rem;
  min-width: 24px;
  text-align: center;
}

.cart-item-remove {
  color: var(--text-muted);
  font-size: 1rem;
  transition: color var(--transition-fast);
  align-self: flex-start;
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.cart-total-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cart-total-value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-light);
}

.checkout-btn {
  width: 100%;
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-glow);
}

.checkout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--primary-glow);
}

/* ============================================
   Checkout Page
   ============================================ */
.checkout-page {
  display: none;
  min-height: 100vh;
  background: var(--bg-primary); /* Ensure solid background to hide layers behind */
  padding: calc(var(--header-height) + var(--space-lg)) var(--space-md) var(--space-3xl);
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
}

.checkout-page.active {
  display: block;
}

.checkout-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.checkout-section {
  margin-bottom: var(--space-lg);
}

.checkout-section-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
}

.form-group select {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0A0' d='M6 8.825L0.375 3.2l.85-.85L6 7.125 10.775 2.35l.85.85z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--danger);
}

.error-text {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: var(--space-xs);
  display: none;
}

.error-text.visible {
  display: block;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.payment-option {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.payment-option:hover {
  border-color: var(--border-light);
}

.checkbox-group {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  margin-top: 12px;
  margin-bottom: 8px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin-top: 3px !important;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--primary);
}

.checkbox-group label {
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  color: var(--text-secondary) !important;
  cursor: pointer;
  user-select: none;
}

.checkbox-group label span {
  font-weight: 600;
  cursor: pointer;
}

.payment-option.selected {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.05);
}

.payment-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.payment-option.selected .payment-radio {
  border-color: var(--primary);
}

.payment-option.selected .payment-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}

.payment-info {
  flex: 1;
}

.payment-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.payment-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.payment-icon {
  font-size: 1.3rem;
}

/* Order Summary in Checkout */
.order-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  border: 1px solid var(--border);
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item-name {
  font-size: 0.85rem;
  flex: 1;
}

.order-item-qty {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 var(--space-md);
}

.order-item-total {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--primary-light);
}

.order-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-md);
  margin-top: var(--space-sm);
  border-top: 2px solid var(--border);
}

.order-grand-total span:first-child {
  font-weight: 700;
}

.order-grand-total span:last-child {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary-light);
}

.whatsapp-btn {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background: #25D366;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
  margin-top: var(--space-lg);
  box-shadow: 0 0 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
  background: #22c35e;
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(37, 211, 102, 0.4);
}

.whatsapp-btn:active {
  transform: translateY(0);
}

.whatsapp-btn i {
  font-size: 1.3rem;
}

/* ============================================
   Back Button
   ============================================ */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
  transition: all var(--transition-fast);
}

.back-btn:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.5s forwards;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-20px); }
}

/* ============================================
   Loading
   ============================================ */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.skeleton-image {
  width: 100%;
  aspect-ratio: 1;
}

.skeleton-text {
  height: 14px;
  margin: var(--space-md);
  border-radius: var(--radius-sm);
}

.skeleton-text.short {
  width: 60%;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0.3;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: 0.9rem;
}

/* ============================================
   Bottom Nav (Mobile)
   ============================================ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 var(--space-md);
  transition: transform var(--transition-normal), opacity var(--transition-fast);
}

/* Hide bottom nav when modal is open */
body.no-scroll .bottom-nav {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: var(--space-sm);
}

.bottom-nav-item i {
  font-size: 1.3rem;
}

.bottom-nav-item.active {
  color: var(--primary-light);
}

.bottom-nav-item .cart-badge {
  top: 0;
  right: -4px;
}

@media (max-width: 768px) {
  #favBtnHeader {
    display: none !important;
  }
}

/* ============================================
   RESPONSIVE - Tablet
   ============================================ */
@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .search-bar {
    display: block;
  }
  
  .mobile-search {
    display: none;
  }
  
  .hamburger {
    display: none;
  }
  
  .category-chips {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .products-section {
    padding: 0 var(--space-lg) var(--space-3xl);
  }
  
  .bottom-nav {
    display: none !important;
  }
  
  .main-content {
    padding-bottom: 0;
  }
  
  .product-modal {
    border-radius: var(--radius-xl);
    max-height: 80vh;
  }
  
  .modal-overlay {
    align-items: center;
    padding: var(--space-lg);
  }
}

/* ============================================
   RESPONSIVE - Desktop
   ============================================ */
@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
  }
  
  .products-section {
    padding: 0 var(--space-xl) var(--space-3xl);
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .header {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
  }
  
  .header-inner {
    height: var(--header-height);
    padding: 0 var(--space-xl);
  }

  /* Desktop Sub Header (Mega Menu row) */
  .desktop-sub-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    height: 48px;
    display: flex;
  }

  .desktop-sub-header-inner {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding: 0 var(--space-xl);
    height: 100%;
  }

  .category-dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
  }

  .category-dropdown-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 var(--space-lg);
    height: 38px;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background var(--transition-fast);
  }

  .category-dropdown-btn:hover {
    background: var(--primary-dark);
  }

  .category-dropdown-menu {
    position: absolute;
    top: 48px;
    left: 0;
    width: 500px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: 2px solid var(--primary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-normal);
    z-index: 1001;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xs);
    padding: var(--space-md);
  }

  .category-dropdown:hover .category-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mega-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    cursor: pointer;
  }

  .mega-menu-item:hover {
    background: var(--bg-secondary);
    color: var(--primary);
    padding-left: 28px; /* trendyol effect */
  }

  .mega-menu-item.active {
    color: var(--primary);
    background: rgba(239, 68, 68, 0.05);
  }

  .popular-categories {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    overflow: hidden;
  }

  .popular-cat-link {
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.05em;
    transition: color var(--transition-fast);
  }

  .popular-cat-link:hover,
  .popular-cat-link.active {
    color: var(--primary-light);
  }

  .main-content {
    /* To push content below the new enlarged header */
    padding-top: calc(var(--header-height) + 68px); 
  }

  .header {
    padding: 0 var(--space-xl);
  }
}

@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* ============================================
   Utility - Prevent scrolling
   ============================================ */
body.no-scroll {
  overflow: hidden;
}

/* ============================================
   Admin Styles
   ============================================ */
.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: var(--space-xl);
  min-height: 100vh;
}

.admin-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: var(--space-lg);
  color: var(--primary-light);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.upload-zone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  background: var(--bg-card);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(220, 38, 38, 0.05);
}

.upload-zone i {
  font-size: 3rem;
  color: var(--primary-light);
  margin-bottom: var(--space-md);
}

.upload-zone h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.upload-progress {
  margin-top: var(--space-lg);
  display: none;
}

.progress-bar {
  height: 8px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-full);
  transition: width var(--transition-fast);
  width: 0%;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.upload-results {
  margin-top: var(--space-lg);
  display: none;
}

.result-card {
  padding: var(--space-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.result-card i {
  font-size: 1.5rem;
}

.result-card.success i { color: var(--success); }
.result-card.warning i { color: var(--warning); }
.result-card.error i { color: var(--danger); }

.result-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
}

.result-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   Auth Modal Styles
   ============================================ */
.auth-error {
  padding: var(--space-md);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  text-align: center;
}

.google-btn {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-sm);
}

.google-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.guest-btn {
  width: 100%;
  padding: var(--space-md);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  transition: all var(--transition-fast);
}

.guest-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

/* ============================================
   User Avatar
   ============================================ */
.user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}

/* ============================================
   Order Cards
   ============================================ */
.order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.order-card:hover {
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
  gap: var(--space-sm);
}

.order-id {
  font-family: monospace;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
}

.order-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.status-badge {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-beklemede {
  background: rgba(234, 179, 8, 0.15);
  color: #EAB308;
}

.status-hazırlaniyor {
  background: rgba(59, 130, 246, 0.15);
  color: #3B82F6;
}

.status-yolda {
  background: rgba(168, 85, 247, 0.15);
  color: #A855F7;
}

.status-teslim-edildi {
  background: rgba(34, 197, 94, 0.15);
  color: #22C55E;
}

.status-iptal {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
}

.order-card-body {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-items-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.order-card-total {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
}

/* ============================================
   Admin Tabs
   ============================================ */
.admin-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 4px;
  margin-bottom: var(--space-lg);
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.admin-tab:hover {
  color: var(--text-primary);
}

.admin-tab.active {
  background: var(--primary);
  color: white;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* Admin order/member cards */
.admin-order-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.admin-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.admin-order-customer {
  font-weight: 600;
  font-size: 0.9rem;
}

.admin-order-items {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.admin-status-select {
  padding: 4px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  cursor: pointer;
}

.member-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  flex-shrink: 0;
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.member-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-meta {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Price Visibility Toggle */
body.prices-hidden .price-display {
  display: none !important;
}

/* Load More / Lazyload Button */
.load-more-btn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 20px -10px rgba(229, 9, 20, 0.4);
  text-align: center;
}

.load-more-btn:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px -10px rgba(229, 9, 20, 0.5);
}

.load-more-btn:active {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .load-more-btn {
    max-width: 100%;
    margin: 10px 0;
    padding: 16px;
    font-size: 0.95rem;
  }
}

/* ============================================
   Site Footer
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-3xl) var(--space-xl) calc(var(--space-3xl) + 80px);
  margin-top: var(--space-3xl);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-2xl);
}

.footer-section h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: var(--space-lg);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.footer-links a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  max-width: 1400px;
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ============================================
   Smart Search Predictions
   ============================================ */
.search-predictions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-height: 480px;
  overflow-y: auto;
  z-index: 2000;
  display: none;
  backdrop-filter: blur(20px);
  padding: var(--space-xs);
}

.search-predictions.active {
  display: block;
}

.prediction-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--transition-fast);
  color: var(--text-primary);
}

.prediction-item:hover {
  background: var(--bg-card);
}

.prediction-image {
  width: 48px;
  height: 48px;
  background: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.prediction-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.prediction-info {
  flex: 1;
}

.prediction-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.prediction-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

.mobile-search-wrapper {
  position: relative;
}

/* ============================================
   Policy Modal
   ============================================ */
#policyModal .product-modal {
  max-width: 800px;
}

.policy-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
  padding-bottom: 40px; /* Stronger separation for bottom nav area */
}

.policy-content h3 {
  color: var(--text-primary);
  margin: var(--space-lg) 0 var(--space-sm);
  font-size: 1.1rem;
}

.policy-content p {
  margin-bottom: var(--space-md);
}

@media (max-width: 768px) {
  .site-footer {
    padding: var(--space-2xl) var(--space-md) 100px;
  }
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* ============================================
   Final Navigation Overrides
   ============================================ */
/* Hide on Desktop/Tablet */
@media (min-width: 768px) {
  .bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Hide on Mobile when any modal/overlay is active */
body.no-scroll .bottom-nav {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ============================================
   Favorites System
   ============================================ */
.fav-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 34px;
  height: 34px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
  z-index: 10;
  transition: all var(--transition-normal);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.fav-btn:hover {
  background: white;
  color: var(--primary);
  border-color: var(--primary-light);
  transform: scale(1.1);
}

.fav-btn.active {
  color: var(--primary);
  border-color: var(--primary-light);
  background: white;
}

[data-color-scheme="dark"] .fav-btn {
  background: var(--bg-card);
  color: var(--text-primary);
}

[data-color-scheme="dark"] .fav-btn.active {
  background: var(--bg-card);
  color: var(--primary-light);
}

.fav-btn i {
  transition: transform var(--transition-fast);
}

.fav-btn.animating i {
  animation: heartPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* Favorites Grid in Profile */
.favorites-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
}

.fav-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-normal);
}

.fav-item:hover {
  transform: translateX(4px);
  border-color: var(--primary-light);
}

.fav-item-image {
  width: 60px;
  height: 60px;
  background: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.fav-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.fav-item-name {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.fav-item-price {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

.remove-fav-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: color var(--transition-fast);
}

.remove-fav-btn:hover {
  color: var(--danger);
}


