/* JUONAI - BRAND STYLES */

/* ========================================
   COLOR SYSTEM - EXACT BRAND PALETTE
   ======================================== */
:root {
  /* Primary Brand Colors */
  --juonai-green: #173F35;
  --warm-coconut: #FFF8E8;
  --fresh-lime: #B8D83D;
  --tropical-orange: #F59A23;
  --juonai-charcoal: #17231F;
  --berry: #B83B62;
  
  /* System Colors */
  --white: #ffffff;
  --shadow-light: rgba(23, 63, 53, 0.1);
  --shadow-medium: rgba(23, 63, 53, 0.15);
  --border-light: rgba(23, 63, 53, 0.1);
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--warm-coconut);
  color: var(--juonai-charcoal);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY SYSTEM
   ======================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--juonai-charcoal);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--juonai-charcoal);
}

/* ========================================
   LAYOUT UTILITIES
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.section {
  padding: 4rem 0;
}

.section-large {
  padding: 6rem 0;
}

/* Prevent body scroll when mobile nav is open */
body.nav-open {
  overflow: hidden;
}

/* ========================================
   NAVIGATION
   ======================================== */
.navigation {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background-color: var(--warm-coconut);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}

.navigation.sticky {
  box-shadow: 0 2px 20px var(--shadow-light);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1rem;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--juonai-green);
  text-decoration: none;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  z-index: 1001;
}

.nav-menu {
  display: none;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu.active {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 248, 232, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
}

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

.nav-link {
  color: var(--juonai-charcoal);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.125rem;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.nav-link:hover {
  color: var(--juonai-green);
  background-color: var(--border-light);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

/* Mobile-first nav actions */
.nav-actions .btn {
  display: none; /* Hide WhatsApp button on mobile by default */
}

.nav-actions .cart-button {
  order: 1;
}

.nav-actions .menu-toggle {
  order: 2;
}

/* ========================================
   FONT AWESOME ICON ENHANCEMENTS
   ======================================== */
.btn i {
  margin-right: 0.5rem;
}

.btn-small i {
  margin-right: 0.25rem;
}

.nav-link i {
  margin-right: 0.5rem;
  opacity: 0.7;
}

.cart-button {
  position: relative;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--juonai-charcoal);
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.cart-button:hover {
  background-color: var(--border-light);
}

.cart-button i {
  font-size: 1.2rem;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--fresh-lime);
  color: var(--juonai-charcoal);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--juonai-charcoal);
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background-color: var(--border-light);
}

/* Desktop Navigation */
@media (min-width: 768px) {
  .logo {
    font-size: 1.5rem;
  }
  
  .nav-container {
    padding: 1rem;
  }
  
  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    background: none;
    gap: 2rem;
  }
  
  .nav-menu.active {
    position: static;
    background: none;
    flex-direction: row;
    justify-content: flex-start;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    animation: none;
  }
  
  .nav-link {
    font-size: 1rem;
    padding: 0.5rem 0;
  }
  
  .nav-actions {
    gap: 1rem;
  }
  
  .nav-actions .btn {
    display: inline-flex; /* Show WhatsApp button on desktop */
  }
  
  .menu-toggle {
    display: none;
  }
}

/* Mobile-specific improvements */
@media (max-width: 767px) {
  .navigation {
    height: 60px;
  }
  
  .nav-container {
    height: 100%;
    padding: 0 1rem;
  }
  
  .logo {
    font-size: 1.1rem;
  }
  
  .nav-actions {
    gap: 0.25rem;
  }
  
  /* Enhanced mobile menu */
  .nav-menu.active {
    padding-top: 80px; /* Account for header height */
  }
  
  .nav-menu.active .nav-link {
    font-size: 1.25rem;
    padding: 1rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin: 0.25rem 0;
    background-color: var(--white);
    box-shadow: 0 2px 8px var(--shadow-light);
  }
  
  /* Add WhatsApp link to mobile menu */
  .nav-menu.active::after {
    content: "";
    display: block;
    margin: 1rem 0;
  }
  
  /* Mobile cart button adjustments */
  .cart-button {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  .menu-toggle {
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Mobile-only menu items */
  .mobile-only {
    display: list-item;
  }
  
  .whatsapp-link {
    background-color: var(--fresh-lime) !important;
    color: var(--juonai-charcoal) !important;
    font-weight: 600;
  }
  
  .close-menu {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    background-color: var(--juonai-green) !important;
    color: var(--warm-coconut) !important;
    font-weight: 600;
    width: 100%;
  }
}

/* Hide mobile-only items on desktop */
@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--fresh-lime);
  color: var(--juonai-charcoal);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(184, 216, 61, 0.3);
}

.btn-secondary {
  background-color: rgba(255, 248, 232, 0.9);
  color: var(--juonai-green);
  border: 2px solid var(--juonai-green);
}

.btn-secondary:hover {
  background-color: var(--juonai-green);
  color: var(--warm-coconut);
}

.btn-dark {
  background-color: var(--juonai-green);
  color: var(--warm-coconut);
}

.btn-dark:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(23, 63, 53, 0.3);
}

.btn-small {
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  background: linear-gradient(rgba(23, 63, 53, 0.7), rgba(23, 63, 53, 0.7)), url('/static/images/hero/hero.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--warm-coconut);
  position: relative;
  overflow: hidden;
  margin-top: 60px; /* Account for fixed header */
  /* Cap height as specified */
  height: 70vh; /* Mobile height limit */
  min-height: 500px;
  max-height: 600px;
}

@media (min-width: 768px) {
  .hero {
    height: 80vh; /* Desktop height limit */
    max-height: 700px;
  }
}

.hero-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  text-align: center;
  height: 100%;
}

.hero-content {
  text-align: center;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out 0.2s forwards;
  max-width: 800px;
}

.hero-title {
  color: var(--warm-coconut);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--warm-coconut);
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-features {
  font-size: 0.9rem;
  opacity: 0.8;
  color: var(--warm-coconut);
}

/* ========================================
   PRODUCT CARDS
   ======================================== */
.product-grid {
  display: grid;
  gap: 1.5rem;                        /* Reduced from 2rem */
  margin-top: 2rem;                   /* Reduced from 3rem */
}

/* Desktop: 3 columns */
@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
  }
  
  /* Desktop product cards optimizations */
  .product-card {
    padding: 14px;                   /* Slightly more padding for desktop */
  }
  
  /* Better text sizing for desktop with smaller images */
  .product-name {
    font-size: 1rem;                 /* Larger name on desktop */
    margin-bottom: 6px;
  }
  
  .product-ingredients {
    font-size: 0.8rem;               /* Larger ingredients text */
    margin-bottom: 10px;
  }
  
  .product-description {
    font-size: 0.85rem;              /* Larger description text */
    margin-bottom: 12px;
    height: auto;                    /* Allow more description lines on desktop */
    -webkit-line-clamp: 3;           /* Show up to 3 lines instead of 2 */
  }
  
  .product-price {
    font-size: 1.1rem;               /* Larger price on desktop */
  }
}

/* Tablet: 2 columns */
@media (min-width: 480px) and (max-width: 767px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;                        /* Reduced from 24px */
    align-items: stretch;
  }
}

/* Mobile: up to 2 columns, minimum 160px */
@media (max-width: 479px) {
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); /* Reduced from 170px */
    gap: 12px;                        /* Reduced from 16px */
    align-items: stretch;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--warm-coconut);
  border: 1px solid rgba(23,63,53,0.1);
  border-radius: 10px;                /* Reduced from 12px */
  padding: 12px;                      /* Reduced from 16px */
  box-shadow: 0 2px 8px rgba(23,63,53,0.06);
  transition: transform 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-3px);
}

/* Fixed aspect ratio image container */
.product-image-container {
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: 6px;
  margin-bottom: 8px;
}

/* Desktop: smaller images for more text space */
@media (min-width: 768px) {
  .product-image-container {
    aspect-ratio: 4/3;               /* Rectangular instead of square - less height */
    margin-bottom: 12px;             /* Slightly more space below for text */
  }
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.3s ease;
}

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

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: 0.9rem;                  /* Reduced from 1rem */
  font-weight: 600;
  margin-bottom: 3px;                 /* Reduced from 4px */
  color: var(--juonai-green);
  line-height: 1.2;
  height: 1.08em;                     /* Adjusted for smaller font */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-ingredients {
  font-size: 0.7rem;                  /* Reduced from 0.75rem */
  color: var(--tropical-orange);
  margin-bottom: 6px;                 /* Reduced from 8px */
  font-weight: 500;
  line-height: 1.2;
  height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-description {
  font-size: 0.75rem;                 /* Reduced from 0.8rem */
  margin-bottom: 8px;                 /* Reduced from 12px */
  color: var(--juonai-charcoal);
  opacity: 0.8;
  line-height: 1.3;
  height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Price row pinned to bottom */
.product-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 6px;                           /* Reduced from 8px */
  padding-top: 8px;                   /* Reduced from 12px */
}

.product-price {
  font-size: 1rem;                    /* Reduced from 1.1rem */
  font-weight: 600;
  color: var(--juonai-green);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 479px) {
  .product-price {
    font-size: 0.9rem;               /* Smaller on mobile to fit better */
  }
  
  /* Keep mobile images square for better mobile layout */
  .product-image-container {
    aspect-ratio: 1/1;
  }
}

.add-to-cart {
  background-color: var(--fresh-lime);
  color: var(--juonai-charcoal);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  flex-shrink: 0; /* button should not compress */
  white-space: nowrap;
}

.add-to-cart:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(184, 216, 61, 0.3);
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tropical-orange);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

/* ========================================
   SECTION STYLES
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--juonai-charcoal);
  opacity: 0.8;
  max-width: 600px;
  margin: 0 auto;
}

.dark-section {
  background-color: var(--juonai-green);
  color: var(--warm-coconut);
}

.dark-section .section-title,
.dark-section .section-subtitle {
  color: var(--warm-coconut);
}

/* ========================================
   CART STYLES
   ======================================== */

/* Floating Cart Bar */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--juonai-green);
  color: var(--warm-coconut);
  padding: 12px 16px;
  display: none;
  justify-content: space-between;
  align-items: center;
  transform: translateY(100%);
  transition: transform 0.2s ease;
  z-index: 1000;
  cursor: pointer;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cart-bar.active {
  display: flex;
  transform: translateY(0);
}

.cart-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-bar .btn {
  padding: 8px 16px;
  font-size: 0.8rem;
}

/* Desktop: centered rounded bar */
@media (min-width: 768px) {
  .cart-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100%);
    border-radius: 24px 24px 0 0;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .cart-bar.active {
    transform: translateX(-50%) translateY(0);
  }
}

/* Cart Drawer Overlay */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(23, 63, 53, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background-color: var(--white);
  z-index: 1600;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer.active {
  transform: translateX(0);
}

/* Mobile: slide up from bottom */
@media (max-width: 767px) {
  .cart-drawer {
    right: 0;
    left: 0;
    top: auto;
    bottom: 0;
    height: 100dvh;
    max-width: none;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
  }
  
  .cart-drawer.active {
    transform: translateY(0);
  }
}

/* Cart Header */
.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--warm-coconut);
  flex-shrink: 0;
}

.cart-header h3 {
  margin: 0;
  color: var(--juonai-green);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
}

.cart-item-count {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--tropical-orange);
  display: block;
  margin-top: 2px;
}

/* Cart Items Container - Scrollable Area */
.cart-items {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 20px 2rem 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Custom scrollbar styling for cart items */
.cart-items::-webkit-scrollbar {
  width: 6px;
}

.cart-items::-webkit-scrollbar-track {
  background: transparent;
}

.cart-items::-webkit-scrollbar-thumb {
  background-color: var(--border-light);
  border-radius: 3px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
  background-color: var(--fresh-lime);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

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

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* Ensure flex item can shrink below content size */
}

.cart-item-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--juonai-green);
  margin: 0 0 4px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.cart-item-notes {
  font-size: 0.75rem;
  color: var(--juonai-charcoal);
  opacity: 0.7;
  margin: 0 0 8px 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
}

.cart-item-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  gap: 8px;
  flex-wrap: wrap;
}

/* Quantity Controls */
.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  background-color: var(--border-light);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--juonai-charcoal);
  transition: background-color 0.2s ease;
}

.quantity-btn:hover {
  background-color: var(--fresh-lime);
}

.quantity-btn:focus {
  background-color: var(--fresh-lime);
  outline: 2px solid var(--juonai-green);
  outline-offset: 1px;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantity {
  font-weight: 600;
  min-width: 24px;
  text-align: center;
  font-size: 0.9rem;
}

.cart-item-price {
  font-weight: 600;
  color: var(--juonai-green);
  font-size: 0.9rem;
  white-space: nowrap;
}

.remove-item {
  background: none;
  border: none;
  color: var(--juonai-charcoal);
  cursor: pointer;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remove-item:hover {
  opacity: 1;
  background-color: var(--border-light);
}

.remove-item:focus {
  opacity: 1;
  background-color: var(--fresh-lime);
  outline: 2px solid var(--juonai-green);
  outline-offset: 1px;
}

/* Cart Total */
.cart-total {
  padding: 16px 20px;
  border-top: 2px solid var(--border-light);
  background-color: var(--warm-coconut);
  flex-shrink: 0;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--juonai-green);
  margin-bottom: 16px;
}

/* Delivery Form */
.cart-checkout {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background-color: var(--white);
  flex-shrink: 0;
}

.checkout-form h4 {
  margin: 0 0 16px 0;
  color: var(--juonai-green);
  font-size: 1rem;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--juonai-green);
  font-size: 0.85rem;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: var(--white);
  transition: border-color 0.2s ease;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--fresh-lime);
}

.form-input::placeholder {
  color: var(--juonai-charcoal);
  opacity: 0.6;
}

textarea.form-input {
  resize: vertical;
  min-height: 60px;
  max-height: 120px;
}

/* Location Button */
.location-btn {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  background-color: var(--border-light);
  color: var(--juonai-charcoal);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.location-btn:hover {
  background-color: var(--fresh-lime);
  border-color: var(--fresh-lime);
}

/* WhatsApp Order Button */
#whatsapp-order-btn {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 16px;
}

#whatsapp-order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Checkout Navigation */
.checkout-navigation {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
}

/* Order Summary */
.order-summary {
  margin-bottom: 2rem;
  padding: 1rem;
  background-color: var(--warm-coconut);
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.order-summary h4 {
  margin: 0 0 1rem 0;
  color: var(--juonai-green);
  font-size: 0.9rem;
}

.summary-items {
  margin-bottom: 1rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.85rem;
}

.summary-name {
  color: var(--juonai-charcoal);
}

.summary-price {
  font-weight: 600;
  color: var(--juonai-green);
}

.summary-total {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-light);
  text-align: right;
  color: var(--juonai-green);
}

/* Empty Cart State */
.empty-cart {
  text-align: center;
  padding: 40px 20px;
}

.empty-cart h3 {
  margin-bottom: 8px;
  color: var(--juonai-green);
}

.empty-cart p {
  margin-bottom: 20px;
  opacity: 0.7;
}

/* Mobile optimizations for cart items */
@media (max-width: 480px) {
  .cart-item-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .cart-item-actions > div {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .cart-item-price {
    margin-left: auto;
  }
  
  .remove-item {
    position: absolute;
    right: 0;
    top: 16px;
  }
  
  .cart-item {
    position: relative;
    padding-right: 40px;
  }
}

/* Error States */
.field-error,
.location-error,
.cart-error {
  font-size: 0.75rem;
  color: var(--berry);
  margin-top: 4px;
}

/* Add to Cart Button States */
.add-to-cart-btn.added {
  background-color: var(--juonai-green) !important;
  color: var(--fresh-lime) !important;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .cart-bar,
  .cart-drawer,
  .cart-overlay {
    transition: none;
  }
  
  .cart-bar.active,
  .cart-drawer.active {
    transition: none;
  }
}

/* ========================================
   MODAL STYLES
   ======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--warm-coconut);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90%;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.3s ease;
}

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

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--juonai-charcoal);
}

.modal-body {
  padding: 2rem;
}

/* ========================================
   FORM STYLES
   ======================================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--juonai-charcoal);
}

.form-input:not(.search-input) {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-size: 0.9rem;
  background-color: var(--white);
  transition: border-color 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.form-input:not(.search-input):focus {
  outline: none;
  border-color: var(--fresh-lime);
}

/* Global input reset - prevent interference with search input */
input {
  font-family: inherit;
}

/* Prevent any global input styling from affecting search */
input:not(.search-input) {
  /* Global input styles go here if needed */
}

/* 
DIAGNOSIS: Search input was too large due to:
1. Invalid display:flex on input element (inputs can't be flex containers)
2. Large mobile padding (12px top/bottom = 24px total) inflating height
3. Missing box-sizing: border-box causing padding to add ON TOP of height
4. Conflicting min-height and height declarations
*/

.search-container {
  padding: 0 !important;
  margin: 12px 0 !important;          /* Increased from 8px to 12px */
  width: 100% !important;
  max-height: 40px !important;        /* Increased from 32px to 40px */
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
  position: relative !important;
}

.search-input {
  box-sizing: border-box !important;
  display: block !important;
  width: 100% !important;
  max-width: 480px !important;        /* Increased from 420px to 480px */
  height: 40px !important;            /* Increased from 32px to 40px */
  padding: 0 14px 0 36px !important;  /* Slightly increased padding */
  margin: 0 !important;
  font-size: 14px !important;         /* Increased from 13px to 14px */
  line-height: 1.2 !important;
  border: 1px solid rgba(23, 35, 31, 0.12) !important; /* Slightly darker border */
  border-radius: 20px !important;     /* Increased from 16px to 20px */
  background-color: #F8F8F8 !important; /* Slightly warmer background */
  transition: all 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  font-size: 13px !important;         /* Increased from 12px to 13px */
  line-height: 1.2 !important;
  color: rgba(23, 35, 31, 0.45) !important; /* Slightly darker placeholder */
}

/* Explicitly override any global input styling */
input[type="search"].search-input,
input[type="text"].search-input {
  height: 40px !important;            /* Match increased height */
  padding: 0 14px 0 36px !important;  /* Match increased padding */
  line-height: 1.2 !important;
  font-size: 14px !important;
}

.search-input:focus {
  outline: none !important;
  border-color: var(--fresh-lime) !important;
  box-shadow: 0 0 0 3px rgba(184, 216, 61, 0.15) !important; /* Slightly larger focus ring */
}

.search-icon {
  position: absolute;
  left: 12px;                         /* Adjusted for new padding */
  top: 50%;
  transform: translateY(-50%);
  color: var(--juonai-charcoal);
  opacity: 0.5;                       /* Slightly more visible */
  font-size: 14px;                    /* Increased from 12px to 14px */
  pointer-events: none;
  z-index: 1;
}
  pointer-events: none; /* Prevent icon from interfering with input clicks */
}

/* ========================================
   FILTER STYLES
   ======================================== */
.filters-container {
  position: relative;
  margin-bottom: 24px; /* Clear separation from products grid */
  overflow: visible; /* Ensure no parent overflow clipping */
}

.filters {
  display: flex;
  gap: 8px;                          /* Slightly increased from 6px */
  padding: 3px 0;                    /* Slightly increased from 2px */
}

/* Mobile: horizontal scroll */
@media (max-width: 767px) {
  .filters-container {
    margin: 0 -1rem 24px -1rem;      /* Extend beyond container padding */
  }
  
  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    gap: 8px;                        
    padding: 3px 1rem 8px 1rem;      /* Use 1rem to match container padding */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .filters::-webkit-scrollbar {
    display: none;
  }
}

/* Desktop: wrap normally */
@media (min-width: 768px) {
  .filters {
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 3px 0;                  /* Slightly increased padding */
    gap: 8px;                        
  }
}

.filter-button {
  background-color: var(--warm-coconut);
  border: 1px solid rgba(23,63,53,0.2);
  padding: 6px 14px;                  /* Slightly increased from 4px 12px */
  min-height: 28px;                   /* Increased from 24px to 28px */
  border-radius: 14px;                /* Adjusted for new height */
  font-weight: 500;
  font-size: 0.8rem;                  /* Increased from 0.75rem */
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  scroll-snap-align: start;
}

.filter-button:hover,
.filter-button.active {
  background-color: var(--fresh-lime);
  border-color: var(--fresh-lime);
  color: var(--juonai-green);
}

.filters-scroll-hint {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(to right, rgba(255, 248, 232, 0), var(--warm-coconut));
  padding: 4px 12px 4px 24px;        /* Reduced padding to match minimal design */
  font-size: 0.7rem;                 /* Smaller font */
  color: var(--juonai-charcoal);
  opacity: 0.6;                      /* More subtle */
  pointer-events: none;
}
  color: var(--juonai-charcoal);
  opacity: 0.7;
  font-size: 12px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

@media (min-width: 768px) {
  .filters-scroll-hint {
    display: none;
  }
}

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

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

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

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 767px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 16px;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ========================================
   UTILITY CLASSES - 4PX SPACING SYSTEM
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Margin utilities following 4px system */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

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

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
