/* ===================================
   Nutri Kitchen - Main Stylesheet
   Design System based on Brand Colors
   =================================== */

/* === CSS Custom Properties === */
/* === CSS Custom Properties === */
:root {
  /* Brand Colors - Reference: Naturally Yours */
  --primary-green: #2b6555;     /* Dark Green */
  --primary-dark: #1e4d40;      /* Darker shade */
  --primary-light: #4c8c7a;     /* Lighter shade */
  --accent-orange: #d4af37;     /* Gold Accent (Replacing Orange) */
  --accent-yellow: #f9f2ea;     /* Light Beige/Cream */
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --off-white: #f9f2ea;         /* Cream Background */
  --light-gray: #e6e6e6;
  --medium-gray: #666666;
  --dark-gray: #333333;
  --black: #202124;             /* Soft Black */
  
  /* Semantic Colors */
  --success: #2b6555;
  --warning: #d4af37;
  --error: #D32F2F;
  --info: #0277BD;
  
  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3.5rem;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --shadow-xl: 0 12px 32px rgba(0,0,0,0.15);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--black);
  background-color: var(--white);
  overflow-x: hidden;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--black);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-md);
  color: var(--dark-gray);
}

a {
  color: var(--primary-green);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-dark);
}

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

/* === Container === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-lg);
}

/* === Navigation === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-fixed);
  transition: all var(--transition-base);
  height: 80px;
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  box-shadow: var(--shadow-md);
  height: 70px;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-lg);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--primary-green);
  text-transform: uppercase;
  letter-spacing: -0.02em;
}

.nav-logo img {
  height: 60px;
  width: auto;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.nav-logo:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}


.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--space-2xl);
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-weight: 500;
  color: var(--black);
  position: relative;
  padding: var(--space-xs) 0;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  text-transform: capitalize;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-green);
  transition: width var(--transition-base);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-green);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.cart-icon {
  display: flex;
  position: relative;
  cursor: pointer;
  color: var(--primary-green);
  transition: color var(--transition-base);
  align-items: center;
}

.cart-icon:hover {
  color: var(--primary-dark);
}

.cart-icon svg, .nav-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.2px;
}


.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--primary-green);
  color: var(--white);
  border-radius: var(--radius-full);
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  border: 1.5px solid var(--white);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* === Auth & Icon Styling === */
.auth-link, .cart-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all var(--transition-base);
}

.nav-icon {
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.auth-link:hover .nav-icon, .cart-icon:hover svg {
  transform: translateY(-2px);
  color: var(--primary-dark);
}

.nav-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark-gray);
  text-transform: capitalize;
  letter-spacing: 0.2px;
}

.logout-link {
  color: var(--medium-gray) !important;
  opacity: 0.7;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
}

.logout-link:hover {
  opacity: 1;
  color: var(--error) !important;
  transform: translateX(2px);
}

#nav-auth-container, #nav-logout-container {
  display: flex;
  align-items: center;
}


.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--space-sm);
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: all var(--transition-base);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-primary);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--accent-orange);
  color: var(--white);
  border-color: var(--accent-orange);
}

.btn-secondary:hover {
  background: #c5a028;
  border-color: #c5a028;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: var(--white);
  color: var(--primary-green);
  border: 2px solid var(--primary-green);
}

.btn-outline:hover {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-base);
}

.btn-sm {
  padding: 8px 16px;
  font-size: var(--text-xs);
}

/* === Hero Section === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background-image: url('../images/nutriKitchenHerobanner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f7fa;
  padding-top: 80px;
}

.hero-bg {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  padding: var(--space-2xl);
}

.hero-title {
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  margin-bottom: var(--space-lg);
  color: var(--white);
  font-weight: 800;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: var(--text-xl);
  color: var(--white);
  margin-bottom: var(--space-2xl);
  font-weight: 400;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-cta {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

/* === Section Styles === */
.section {
  padding: var(--space-3xl) 0;
}

/* Parallax Section */
.parallax-section {
  position: relative;
  overflow: hidden;
}

/* Millet Plant Parallax Background */
.millet-parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%;
  background-image: url('../images/millet-plant-bg.svg');
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0.08; /* Lowered opacity for subtle, elegant effect */
  z-index: 0;
  pointer-events: none;
}

/* Ensure container content is above parallax background */
.parallax-section .container {
  position: relative;
  z-index: 1;
}


.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--accent-orange));
  border-radius: var(--radius-full);
}

.section-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--medium-gray);
}

/* === Product Grid === */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: var(--space-2xl);
}

.product-card {
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--primary-green);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.product-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: var(--white);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-lg);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 12px;
  will-change: transform;
}

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

.product-info {
  padding: var(--space-lg);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.product-category {
  font-size: 0.7rem;
  color: var(--medium-gray);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-xs);
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--black);
  line-height: 1.4;
}

.product-description {
  font-size: var(--text-sm);
  color: var(--medium-gray);
  margin-bottom: var(--space-md);
  line-height: 1.6;
  flex-grow: 1;
  position: relative;
  cursor: help;
}

/* Desktop: Show truncated text with hover tooltip */
.product-description .description-short {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description .description-full {
  display: none;
}

/* Hover tooltip */
.description-hover-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: white;
  color: var(--dark-gray);
  padding: 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  width: 280px;
  max-width: 90vw;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--light-gray);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  pointer-events: none;
  text-align: left;
}

/* Tooltip arrow */
.description-hover-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: white;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.product-description:hover .description-hover-tooltip {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 15px);
}

/* Mobile: Show full text, hide tooltip */
@media (max-width: 768px) {
  .product-description {
    cursor: default;
  }
  
  .product-description .description-short {
    display: none;
  }
  
  .product-description .description-full {
    display: block;
  }
  
  .description-hover-tooltip {
    display: none;
  }
}

/* Description Overlay (Desktop only) */
.description-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.description-overlay.active {
  opacity: 1;
}

.description-overlay-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  text-align: center;
}

.description-overlay.active .description-overlay-content {
  transform: scale(1);
}

.description-overlay-content h3 {
  color: var(--primary-green);
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.description-overlay-content p {
  color: var(--dark-gray);
  line-height: 1.7;
  margin-bottom: 20px;
  text-align: left;
}

.description-overlay-content .btn {
  margin-top: 10px;
}

.product-footer {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-green);
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.product-price small {
  font-size: var(--text-sm);
  color: var(--medium-gray);
  font-weight: 400;
  text-decoration: line-through;
}

.price-weight-label {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--medium-gray);
  text-decoration: none !important;
}

.shipping-free-badge {
  font-size: 0.75rem;
  color: var(--success);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: -8px;
}

.product-footer .btn {
  width: 100%;
  border-radius: var(--radius-md);
}

/* === Coming Soon Styles === */
.coming-soon-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-orange);
  color: var(--white);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
  box-shadow: var(--shadow-sm);
  text-decoration: none !important;
  transition: all 0.3s ease;
}

/* Mobile Center Positioning for Badge */
@media (max-width: 768px) {
  .carousel-slide .coming-soon-badge,
  .product-card.coming-soon .coming-soon-badge {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) rotate(-10deg) !important;
    font-size: 0.9rem;
    padding: 10px 20px;
    background: var(--accent-orange);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    border: 2px solid white;
    white-space: nowrap;
    pointer-events: none; /* Let clicks pass through to the slide/card if needed */
  }
}

.product-card.coming-soon {
  cursor: default;
}

.product-card.coming-soon .product-image {
  filter: grayscale(0.5) opacity(0.8);
}

.btn-coming-soon {
  background: #cbd5e1 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.btn-coming-soon:hover {
  transform: none !important;
  box-shadow: none !important;
}

/* === Footer === */
.footer {
  background: var(--black);
  color: var(--white);
  padding: 80px 0 40px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 60px;
}

@media (max-width: 968px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

@media (max-width: 576px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 24px;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-section p {
  color: #a0a0a0;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #a0a0a0;
  transition: color var(--transition-base);
  font-size: 0.95rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--primary-light);
  padding-left: 4px; /* Subtle movement */
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #a0a0a0;
  font-size: 0.9rem;
}

.footer-bottom p {
  color: #a0a0a0;
  margin: 0;
}

/* === Utility Classes === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* === Responsive Design === */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--white);
    flex-direction: column;
    padding: var(--space-2xl);
    transition: left var(--transition-base);
    box-shadow: var(--shadow-xl);
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
  }
  
  .hero-cta {
    flex-direction: column;
  }
  
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }

  /* Reduce excessive whitespace on mobile */
  .section {
    padding: var(--space-xl) 0; /* Reduced from 3xl */
  }

  .footer {
    padding: 40px 0 20px; /* Reduced from 80px */
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-price {
    justify-content: center;
  }

  p {
    text-align: left;
  }
}

/* === About Us - Storytelling Styles === */
.about-story-section {
  padding: var(--space-4xl) 0;
  overflow: hidden;
  background: white;
}

.story-row {
  display: flex;
  align-items: center;
  gap: var(--space-4xl);
  margin-bottom: var(--space-5xl);
}

.story-row:nth-child(even) {
  flex-direction: row-reverse;
}

.story-content {
  flex: 1.2;
}

.story-image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: center;
}

.pencil-drawing-wrap {
  padding: var(--space-md);
  background: white;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-sm);
  transform: rotate(-1.5deg);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 420px;
  width: 100%;
  border: 1px solid #f0f0f0;
}

.story-row:nth-last-child(even) .pencil-drawing-wrap,
.story-row:nth-child(even) .pencil-drawing-wrap {
  transform: rotate(1.5deg);
}

.pencil-drawing-wrap:hover {
  transform: rotate(1.5deg) scale(1.08) translateY(-10px);
  box-shadow: var(--shadow-2xl);
  z-index: 5;
}

.story-row:nth-child(even) .pencil-drawing-wrap:hover {
  transform: rotate(-1.5deg) scale(1.08) translateY(-10px);
}

.pencil-drawing-wrap img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #f8f8f8;
  filter: sepia(0.1) contrast(1.05); /* Subtle warm paper feel */
}

.story-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  color: var(--primary-green);
  margin-top: 30px;
  margin-bottom: var(--space-lg);
  position: relative;
  display: inline-block;
  line-height: 1.2;
}

.story-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 80px;
  height: 5px;
  background: var(--accent-orange);
  border-radius: 10px;
}

.story-text {
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--dark-gray);
  margin-bottom: var(--space-lg);
}

.philosophy-box {
  background: var(--off-white);
  padding: var(--space-4xl) var(--space-xl);
  border-bottom: 10px solid var(--primary-green);
  text-align: center;
  margin-top: 50px;
  border-radius: var(--radius-xl);
  position: relative;
}

.philosophy-content {
  max-width: 850px;
  margin: 0 auto;
}

.philosophy-box h2 {
  font-size: 2.8rem;
  margin-bottom: var(--space-md);
}

@media (max-width: 992px) {
  .story-row, .story-row:nth-child(even) {
    flex-direction: column;
    gap: var(--space-3xl);
    text-align: left;
  }
  
  .story-title {
    margin-top: 30px;
  }

  .story-title::after {
    left: 0;
    transform: none;
  }

  .philosophy-box {
    text-align: left;
    padding: var(--space-xl) 24px; /* Added horizontal padding */
  }

  .story-image {
    width: 100%;
    max-width: 500px;
  }
}

/* === Products Page Specifics === */
.products-header {
  padding: 120px 0 80px;
  background-image: url('../images/nutriKitchenHerobanner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #f5f7fa;
  color: var(--white);
  text-align: center;
  margin-top: 80px;
  position: relative;
}

.products-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.products-header .container {
  position: relative;
  z-index: 1;
}

.products-header h1 {
  font-size: var(--text-4xl);
  color: var(--white);
  margin-bottom: var(--space-sm);
  font-weight: 800;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.products-header p {
  color: var(--white);
  font-size: var(--text-xl);
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4);
}

.filter-section {
  background: var(--white);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--light-gray);
  position: sticky;
  top: 70px;
  z-index: 90; /* Below navbar */
}

.filter-controls {
  display: flex;
  gap: var(--space-lg);
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.filter-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--light-gray);
  background: var(--white);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--medium-gray);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary-green);
  color: var(--white);
  border-color: var(--primary-green);
}

.search-sort {
  display: flex;
  gap: var(--space-md);
}

.search-box, .sort-select {
  padding: 10px 16px;
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
}

.search-box:focus, .sort-select:focus {
  outline: none;
  border-color: var(--primary-green);
}

.search-box {
  min-width: 250px;
}

/* === Cart Page Specifics === */
.cart-header {
  padding: 80px 0 40px;
  background: var(--off-white);
  text-align: center;
  margin-top: 80px;
}

.cart-header h1 {
  color: var(--primary-green);
}

.cart-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 120px 100px 40px;
  gap: var(--space-xl);
  align-items: center;
  background: var(--white);
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
}

.cart-item:first-child {
  border-top: 1px solid var(--light-gray);
}

.cart-item-image img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  background: var(--off-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xs);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.cart-item-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.2;
  color: var(--black);
}

.cart-item-category {
  font-size: 0.75rem;
  margin-bottom: 0;
  color: var(--medium-gray);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0;
  color: var(--medium-gray);
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--light-gray);
  border-radius: var(--radius-md);
  padding: 2px;
  width: fit-content;
  background: var(--white);
  height: 40px;
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--dark-gray);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.quantity-btn:hover {
  background: var(--off-white);
  color: var(--primary-green);
}

.cart-item-quantity input {
  width: 36px;
  text-align: center;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  background: transparent;
  color: var(--black);
  -moz-appearance: textfield;
  appearance: none;
}

.cart-item-quantity input::-webkit-outer-spin-button,
.cart-item-quantity input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

.cart-item-total p {
  margin-bottom: 0;
  font-weight: 800;
  color: var(--black);
  font-size: 1.1rem;
  text-align: right;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--medium-gray);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  opacity: 0.6;
}

.cart-item-remove:hover {
  background-color: #fff5f5;
  color: var(--error);
  opacity: 1;
  transform: rotate(90deg);
}


.cart-summary {
  background: var(--off-white);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.summary-total {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--primary-green);
}

.empty-cart {
  text-align: center;
  padding: var(--space-3xl);
  background: var(--off-white);
  border-radius: var(--radius-lg);
}

@media (max-width: 968px) {
  .cart-container {
    grid-template-columns: 1fr;
  }
  
  .cart-item {
    grid-template-columns: 80px 1fr;
    gap: var(--space-md);
    position: relative;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: var(--space-md);
  }
  
  .cart-item-quantity {
    grid-column: 2 / -1;
    width: fit-content;
    margin-top: var(--space-xs);
  }

  .quantity-btn {
    width: 44px; /* Larger touch target for mobile */
    height: 44px;
  }
  
  .cart-item-total {
    position: absolute;
    bottom: var(--space-md);
    right: 0;
    font-weight: 700;
  }
  
  .cart-item-remove {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 1;
    padding: 12px;
  }

  /* Sticky Bottom Bar for Mobile Cart */
  .cart-summary {
    position: static;
    margin-top: var(--space-xl);
  }

  /* Optional: Enhance visual feedback for touches */
  .btn, .quantity-btn, .cart-item-remove {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 var(--space-md);
  }

  .cart-item {
    grid-template-columns: 70px 1fr;
    padding: var(--space-md) 0;
  }

  .cart-item-image img {
    width: 70px !important;
    height: 70px !important;
  }

  .cart-item-name {
    font-size: 1rem;
    padding-right: 30px;
  }

  .summary-total {
    font-size: 1.25rem;
  }
.cart-header p {
  text-align: center;
}

.checkout-header p {
  text-align: center;
}
}

/* === Checkout Specifics === */
.checkout-header {
  padding: 80px 0 40px;
  background: var(--off-white);
  text-align: center;
  margin-top: 80px;
}

.checkout-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  margin-top: var(--space-xl);
}

.checkout-form {
  background: var(--white);
  /* clean look without heavy shadows/borders */
}

.form-section {
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--light-gray);
}

.form-section:last-child {
  border-bottom: none;
}

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

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 500;
  color: var(--dark-gray);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--light-gray);
  border-radius: 4px;
  font-family: var(--font-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-base);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 2px rgba(43, 101, 85, 0.1);
}

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

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

.payment-method {
  border: 1px solid var(--light-gray);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: center;
  transition: all var(--transition-base);
}

.payment-method:hover, .payment-method.selected {
  border-color: var(--primary-green);
  background: var(--off-white);
  color: var(--primary-green);
}

@media (max-width: 968px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }

  .order-summary {
    order: -1; /* Show summary first on mobile for context */
    margin-bottom: var(--space-xl);
  }
}

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr; /* Stack form rows on small mobile */
    gap: 0;
  }

  .form-input {
    font-size: 16px; /* Prevent iOS zoom on focus */
    padding: 10px 12px; /* Reduced padding for mobile */
  }

  .btn-lg {
    padding: 18px 24px;
    font-size: 1.1rem;
  }
}

/* Additional mobile input field optimization for all devices */
@media (max-width: 768px) {
  .form-input, 
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    padding: 8px 10px !important;
  }
}
