/* Walker's Tea Modern Redesign
   Variable System & Reset
*/

:root {
  /* Brand Colors */
  --color-primary: #054f30;
  --color-primary-hover: #098953;
  --color-secondary: #eef7ff;
  --color-secondary-hover: #ffffff;
  --color-neutral: #ffffff;
  --color-neutral-secondary: #f4f4f4;
  --color-inverse: #171d12;
  --color-accent: #d4a017; /* Gold/Yellow for badges */

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary), #0a3d28);
  --gradient-glass: linear-gradient(145deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
  --gradient-glass-dark: linear-gradient(145deg, rgba(23, 29, 18, 0.8), rgba(5, 79, 48, 0.8));

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Manrope', 'Arial', sans-serif;
  
  --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: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-huge: 4.5rem;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Glassmorphism settings */
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  --backdrop-blur: blur(12px);
  
  /* Animation Speeds */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s ease;
  --transition-slow: 0.8s ease;

  /* Z-indices */
  --z-nav: 1000;
  --z-modal: 2000;
  --z-overlay: 1500;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-neutral-secondary);
  color: var(--color-inverse);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  /* Add padding-top to prevent navbar overlap */
  padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

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

/* --- Layout Utilities --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  box-sizing: border-box;
  position: relative;
}

.section {
  padding: var(--spacing-md) 0;
}

.section-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Glassmorphism Components --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 16px;
}

.glass-nav {
  background: rgba(5, 79, 48, 0.85); /* Primary color with transparency */
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 32px;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-neutral);
  box-shadow: 0 4px 15px rgba(5, 79, 48, 0.3);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(5, 79, 48, 0.5);
}

.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-neutral);
}

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

.btn-white:hover {
  background: var(--color-secondary);
  transform: scale(1.05);
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

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

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

.animate-fade-in { animation: fadeIn 0.8s forwards; }
.animate-float { animation: float 4s ease-in-out infinite; }

/* --- Navigation --- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: var(--z-nav);
  padding: 1rem 0;
  /* Match hero section background for seamless detach */
  background: radial-gradient(circle at center, #0a3d28 0%, #032b1a 100%);
  transition: box-shadow 0.5s ease,
              backdrop-filter 0.5s ease,
              border-bottom 0.5s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}

.main-header.detached {
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 
              0 0 50px rgba(5, 79, 48, 0.5);
  backdrop-filter: blur(25px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.main-header.reattached {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(0px);
  border-bottom: 1px solid transparent;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 50px;
  flex-shrink: 1;
  min-width: 0;
}

.nav-logo img {
  height: 100%;
  width: auto;
  max-width: 100%;
  max-height: 50px;
  object-fit: contain;
  object-position: left center;
  transition: height 0.3s, max-height 0.3s;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  -ms-interpolation-mode: nearest-neighbor;
  image-rendering: auto;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  transform: translateZ(0);
}

.nav-menu {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--color-neutral);
  font-weight: 500;
  position: relative;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--color-secondary);
  transition: width 0.3s ease;
}

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

.cart-btn {
  position: relative;
  color: white;
  font-size: 1.5rem;
}

#cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--color-accent); /* Use gold for visibility */
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: bold;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  color: white;
  font-size: 1.5rem;
}

/* --- Hero Section --- */
.hero-section {
  min-height: calc(100vh - 80px);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  /* Premium radial gradient background matching brand */
  background: radial-gradient(circle at center, #0a3d28 0%, #032b1a 100%);
}

.hero-bg-shape {
  position: absolute;
  width: 50vw;
  height: 50vw;
  background: rgba(9, 137, 83, 0.2);
  filter: blur(80px);
  border-radius: 50%;
  animation: float 8s infinite alternate;
}

.hero-bg-1 { top: -10%; right: -10%; }
.hero-bg-2 { bottom: -10%; left: -10%; animation-delay: -4s; }

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: var(--text-5xl);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #fff, #a5f3d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text p {
  font-size: var(--text-xl);
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-image {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image img {
  background: transparent;
  mix-blend-mode: normal;
}

.hero-bottle {
  width: 100%;
  max-width: 500px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.5));
  position: relative;
  z-index: 3;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  cursor: pointer;
}

.hero-bottle:hover {
  transform: scale(1.05) translateY(-10px);
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.6)) drop-shadow(0 0 30px rgba(248, 197, 26, 0.3));
}

/* Double Helix Animation */
.double-helix-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.double-helix {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.helix-path {
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: blur(1px);
}

.helix-1 {
  animation: helixFlow1 25s linear infinite;
  transform-origin: center;
}

.helix-1b {
  animation: helixFlow1 25s linear infinite;
  animation-delay: -12.5s;
}

.helix-2 {
  animation: helixFlow2 25s linear infinite;
  transform-origin: center;
  animation-delay: -12.5s;
}

.helix-2b {
  animation: helixFlow2 25s linear infinite;
}

@keyframes helixFlow1 {
  0% {
    transform: translateX(-30%) translateY(0) scaleY(1);
    opacity: 0.3;
  }
  25% {
    opacity: 0.6;
  }
  50% {
    transform: translateX(0%) translateY(0) scaleY(1.1);
    opacity: 0.5;
  }
  75% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(30%) translateY(0) scaleY(1);
    opacity: 0.3;
  }
}

@keyframes helixFlow2 {
  0% {
    transform: translateX(-30%) translateY(0) scaleY(1);
    opacity: 0.3;
  }
  25% {
    opacity: 0.6;
  }
  50% {
    transform: translateX(0%) translateY(0) scaleY(0.9);
    opacity: 0.5;
  }
  75% {
    opacity: 0.6;
  }
  100% {
    transform: translateX(30%) translateY(0) scaleY(1);
    opacity: 0.3;
  }
}

/* --- Product Grid (Preserving Logic) --- */
#product-section {
  background-color: var(--color-neutral-secondary);
  padding: var(--spacing-xl) 0;
}

.product-list-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Product Section Header */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-inverse);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: #666;
  font-weight: 400;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* IMPORTANT: Preserving classes for JS */
.product-card { 
  display: flex; /* Flex is set by JS usually, but we set default */
  flex-direction: column;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1.5rem;
  align-items: center;
  text-align: center;
  position: relative;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.product-card.template {
  display: none !important; /* Hide template */
}

.main-product-image {
  height: 180px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin-bottom: 1rem;
  transition: transform 0.4s ease;
}

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

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  text-align: center;
  width: 100%;
}

.current-price {
  display: none; /* Hide current price display - price is shown in selected option */
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  width: 100%;
  flex-grow: 1;
}

.option-button {
  border: 2px solid transparent !important;
  background: #f5f5f5;
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: left;
  position: relative;
  min-height: 60px;
  justify-content: center;
}

.option-button:hover {
  background: #e8e8e8;
}

.option-button.is-active {
  background: white !important;
  border-color: var(--color-primary) !important;
  box-shadow: 0 2px 8px rgba(5,79,48,0.1);
}

.option-button img {
  display: none;
}

.qty-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-inverse);
  margin-bottom: 0.15rem;
  line-height: 1.2;
}

.opt-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.1rem;
  line-height: 1.2;
}

.unit-price-text {
  font-size: 0.75rem;
  color: #666;
  font-weight: 400;
  line-height: 1.2;
}

.div-block-4 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
}

.add-to-cart {
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

/* Free Shipping Badge - Simple text with checkmark, not button-like */
.free-shipping-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0.75rem 0;
  width: 100%;
  box-sizing: border-box;
}

.free-shipping-badge svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  stroke-width: 2.5;
}

/* Availability Note */
.availability-note {
  font-size: 0.8rem;
  color: #d32f2f;
  text-align: center;
  padding: 0.5rem;
  margin: 0.5rem 0;
  background: #ffebee;
  border-left: 3px solid #d32f2f;
  border-radius: 4px;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
}

/* --- Features Section --- */
.process-section {
  background: white;
  position: relative;
}

.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  font-size: 4rem;
  font-weight: 900;
  color: rgba(5, 79, 48, 0.1);
  position: relative;
  z-index: 0;
  line-height: 0.8;
  margin-bottom: -1rem;
}

.step-content {
  position: relative;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  z-index: 1;
  padding: 1rem;
}

/* --- Footer --- */
.footer {
  background: var(--color-inverse);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer h4 {
  color: var(--color-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #aaa;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: white;
}

/* Footer Logo - Crisp Rendering */
.footer img[alt*="Walker's Tea"],
.footer-grid img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: auto;
  image-rendering: high-quality;
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* --- Cart Modal (Preserving Logic Selectors) --- */
#cart-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  display: none; /* JS toggles flex */
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: fadeIn 0.3s forwards;
}

#cart-content {
  background: white;
  width: 90%;
  max-width: 500px;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

#close-cart {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 2rem;
  background: none;
  cursor: pointer;
  line-height: 1;
  color: #666;
}

#cart-items-list {
  flex-grow: 1;
  overflow-y: auto;
  margin: 1.5rem 0;
  max-height: 50vh;
}

#cart-items-list::-webkit-scrollbar {
  width: 6px;
}
#cart-items-list::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 3px;
}

#cart-items-list > div {
  padding: 1rem !important;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  transition: background 0.2s;
}

#cart-items-list > div:hover {
  background: #f9f9f9;
}

#final-checkout {
  width: 100%;
  display: block;
  text-align: center;
  padding: 1.2rem;
  background: var(--color-primary);
  color: white;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  margin-top: 1rem;
}

#final-checkout:hover {
  background: var(--color-primary-hover);
}

/* --- Responsive --- */

/* ============================================
   TABLET STYLES (768px - 1024px)
   ============================================ */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  /* Navigation - Keep desktop menu but adjust spacing */
  .nav-container {
    padding: 0.75rem 0;
    gap: 1rem;
  }
  
  .nav-menu {
    display: flex !important;
    gap: 1.25rem;
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
  }
  
  .nav-link {
    font-size: 0.8rem;
    white-space: nowrap;
  }
  
  /* Header Logo - Better scaling */
  .nav-logo {
    display: flex;
    align-items: center;
    max-width: 160px;
    min-width: 120px;
    flex-shrink: 1;
    height: 45px;
  }
  
  .nav-logo img {
    height: 100%;
    width: auto;
    max-width: 100%;
    max-height: 45px;
    object-fit: contain;
    object-position: left center;
  }
  
  .mobile-toggle {
    display: none !important;
  }
  
  .nav-actions {
    gap: 15px;
    flex-shrink: 0;
  }
  
  /* Container adjustments */
  .container {
    width: 95%;
    padding: 0 1.5rem;
  }
  
  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
    padding: 2rem 0;
  }
  
  .hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.1;
  }
  
  .hero-text p {
    font-size: 1.1rem;
  }
  
  .hero-bottle {
    max-width: 400px;
    margin: 0 auto;
  }
  
  /* Product Grid - 2 columns on tablet */
  .product-grid,
  .product-list-wrapper {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .product-card {
    padding: 1.25rem;
  }
  
  .main-product-image {
    height: 160px;
  }
  
  /* Section Headers */
  .section-header {
    margin-bottom: 3rem;
  }
  
  .section-title {
    font-size: 2.25rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
  }
  
  /* Process Section - 3 columns */
  .process-section .container > div:last-child {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  .step-card {
    padding: 1.5rem;
  }
  
  .step-number {
    font-size: 3.5rem;
  }
  
  /* Endless Possibilities - 2 columns */
  .possibilities-grid,
  .endless-possibilities-section .container > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  /* Override inline style for possibilities grid */
  .endless-possibilities-section .container > div[style*="repeat(auto-fit, minmax(250px, 1fr))"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  .endless-possibilities-section h2 {
    font-size: 2.5rem !important;
  }
  
  .endless-possibilities-section p:first-of-type {
    font-size: 1.3rem !important;
  }
  
  /* Testimonials Grid - 2 columns (target testimonials section specifically) */
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  /* Override inline styles for testimonials - target divs with grid that contain glass-card */
  .section .container > div[style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  /* Footer - 3 columns */
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
  }
  
  /* Process steps - keep 3 columns on tablet (more specific selector) */
  .process-section .container > div[style*="grid-template-columns: repeat(auto-fit, minmax(250px, 1fr))"] {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
  }
  
  /* Cart Modal */
  #cart-content {
    width: 85%;
    max-width: 450px;
    padding: 1.75rem;
  }
  
  /* About Page */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
  
  .team-img {
    width: 140px;
    height: 140px;
  }
  
  /* Locations Page */
  .locations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  .location-card {
    padding: 1.25rem;
  }
  
  /* Contact Page */
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .contact-card {
    padding: 2.5rem 2rem;
  }
  
  /* Wholesale Page */
.wholesale-layout {
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.wholesale-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 1rem;
}

.wholesale-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 16px;
  border: 3px solid var(--color-primary);
  opacity: 0.35;
  z-index: 0;
}

.wholesale-image-wrapper::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(5, 79, 48, 0.06), transparent 50%);
  z-index: 0;
  pointer-events: none;
}

.wholesale-image {
  width: 100%;
  max-width: 560px;
  height: auto;
  border-radius: 16px;
  border: 4px solid var(--color-primary);
  box-shadow:
    0 4px 0 rgba(5, 79, 48, 0.2),
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  display: block;
  position: relative;
  z-index: 1;
  background: #fff;
}
  
  /* Terms & Privacy Pages */
  .section {
    padding: 4rem 0;
  }
  
  .section .container[style*="max-width: 900px"] {
    padding: 0 2rem;
  }
  
  /* Video Container */
  .process-section > .container > div:last-child {
    max-width: 700px;
  }
  
  /* Button adjustments */
  .btn {
    padding: 10px 28px;
    font-size: 0.9rem;
  }
  
  /* Typography adjustments */
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  /* Body padding adjustment */
  body {
    padding-top: 75px;
  }
  
  /* Section spacing */
  .section {
    padding: 3rem 0;
  }
  
  #product-section {
    padding: 4rem 0;
  }
  
  /* Hero section adjustments */
  .hero-section {
    min-height: calc(100vh - 75px);
    padding: 2rem 0;
  }
  
  /* About page hero */
  .about-hero {
    padding: 6rem 0;
  }
  
  /* FAQ section */
  .faq-item {
    margin-bottom: 0.75rem;
  }
  
  .faq-question {
    padding: 0.875rem;
    font-size: 0.95rem;
  }
  
  .faq-answer {
    padding: 0 0.875rem 0.875rem;
    font-size: 0.9rem;
  }
  
  /* Timeline items */
  .timeline-item {
    padding-left: 1.75rem;
    margin-bottom: 1.5rem;
  }
  
  /* Form inputs */
  .form-input {
    padding: 10px;
    font-size: 0.95rem;
  }
  
  /* Video container */
  .process-section > .container > div:last-child[style*="padding-bottom: 56.25%"] {
    margin-top: 3rem;
  }
  
  /* Ensure buttons are touch-friendly */
  .btn,
  .add-to-cart,
  button {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Cart button adjustments */
  .cart-btn {
    font-size: 1.3rem;
  }
  
  #cart-count {
    height: 18px;
    width: 18px;
    font-size: 0.7rem;
  }
  
  /* Option buttons - ensure they're readable */
  .option-button {
    padding: 0.55rem 0.7rem;
    min-height: 65px;
  }
  
  .qty-text {
    font-size: 0.9rem;
  }
  
  .opt-price {
    font-size: 1rem;
  }
  
  .unit-price-text {
    font-size: 0.8rem;
  }
  
  /* Locations page state sections */
  .state-section {
    margin-bottom: 3rem;
  }
  
  .state-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }
  
  /* Contact page hero */
  .section[style*="padding-top: 8rem"] {
    padding-top: 6rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Wholesale form */
  .wholesale-layout > div:first-child h1 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
  }
  
  .wholesale-layout > div:first-child p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  /* Glass cards padding */
  .glass-card {
    padding: 1.75rem;
  }
  
  /* Testimonial cards */
  .glass-card[style*="padding: 2rem"] {
    padding: 1.75rem !important;
  }
  
  /* Ensure all text is readable */
  p {
    font-size: 1rem;
    line-height: 1.7;
  }
  
  /* Hero buttons spacing */
  .hero-text > div[style*="display: flex"] {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  
  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Footer adjustments */
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  /* Footer Logo - Scale properly on tablet */
  .footer img[alt*="Walker's Tea"],
  .footer-grid img,
  .footer-grid > div:first-child img {
    width: auto !important;
    max-width: 160px !important;
    height: auto !important;
    max-height: 55px !important;
    object-fit: contain !important;
    object-position: left center !important;
    margin-bottom: 1.25rem !important;
  }
  
  /* Ensure footer logo container doesn't overflow */
  .footer-grid > div:first-child {
    min-width: 0;
    overflow: hidden;
  }
  
  .footer h4 {
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
  }
  
  .footer-links li {
    margin-bottom: 0.7rem;
  }
  
  .footer-links a {
    font-size: 0.9rem;
  }
  
  .copyright {
    padding-top: 1.5rem;
    font-size: 0.85rem;
  }
  
  /* Ensure modals are properly sized */
  #cart-modal {
    padding: 1rem;
  }
  
  #cart-content {
    max-height: 80vh;
  }
  
  /* Prevent horizontal scroll */
  html, body {
    overflow-x: hidden;
    max-width: 100%;
  }
  
  /* Ensure all containers respect max-width */
  .container {
    max-width: 100%;
  }
}

@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-text h1 {
    font-size: 3rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  /* Prevent horizontal overflow */
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }
  
  /* Ensure all containers are centered and don't overflow */
  .container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure all sections are centered */
  .section {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }
  
  /* Center all section headers */
  .section-header {
    text-align: center !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Reduce header height on mobile */
  .main-header {
    padding: 0.5rem 0;
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }
  
  /* Mobile Navigation Layout: Menu (left) | Logo (center) | Cart (right) */
  .nav-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 0.35rem 1rem;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 50px;
    gap: 0.5rem;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }
  
  /* Adjust body padding to match reduced header height */
  body {
    padding-top: 65px;
    width: 100% !important;
    max-width: 100vw !important;
  }
  
  .nav-menu {
    display: none; /* Need JS for mobile menu later */
  }
  
  /* Mobile Toggle - Position absolutely relative to nav-container (left side) */
  .nav-container .nav-actions .mobile-toggle {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    z-index: 4;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
  }
  
  /* Logo - Center column, perfectly centered */
  .nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 140px;
    min-width: 100px;
    height: 36px;
    grid-column: 2;
    justify-self: center;
    margin: 0 auto;
    z-index: 2;
  }
  
  .nav-logo img {
    max-height: 36px;
    object-position: center center;
    margin: 0 auto;
  }
  
  /* On small screens, shrink logo first to prevent overlap */
  @media (max-width: 400px) {
    .nav-logo {
      max-width: 100px !important;
      min-width: 80px !important;
    }
    
    .nav-logo img {
      max-height: 30px !important;
    }
  }
  
  /* Only hide logo if screen is so small the logo would cover the menu button */
  /* Menu button is at left: 1rem (16px) + 40px width = ~56px from left edge */
  /* Logo centered on 280px screen: ~140px from left, but with smaller logo (100px) it's ~90px from left */
  /* At 280px or less, logo center would be at ~140px, left edge at ~90px, which is close to menu */
  /* So hide at 280px or less to prevent any overlap */
  @media (max-width: 280px) {
    .nav-logo {
      display: none !important;
    }
    
    .nav-container {
      grid-template-columns: auto 1fr !important;
    }
    
    .mobile-toggle {
      left: 0.75rem !important;
    }
    
    .nav-actions {
      grid-column: 2 !important;
    }
  }
  
  /* Fix for other pages - ensure all grids are centered */
  .team-grid,
  .contact-grid,
  .locations-grid,
  .wholesale-layout {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    grid-template-columns: 1fr !important;
    padding: 0 !important;
  }
  
  /* Fix inline max-width styles on mobile */
  div[style*="max-width"] {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    box-sizing: border-box !important;
  }
  
  /* Fix containers with inline max-width */
  .container[style*="max-width: 900px"],
  .container[style*="max-width: 800px"],
  .container[style*="max-width: 700px"],
  .container[style*="max-width: 600px"] {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 1rem !important;
  }
  
  /* Fix possibilities grid inline styles */
  .possibilities-grid[style*="max-width: 1200px"] {
    max-width: 100% !important;
    width: 100% !important;
  }
  
  /* Fix about page timeline */
  .timeline-item {
    padding-left: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Fix team cards */
  .team-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem 1rem !important;
  }
  
  .team-img {
    width: 120px !important;
    height: 120px !important;
  }
  
  /* Fix contact cards */
  .contact-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2rem 1.5rem !important;
  }
  
  /* Fix location cards */
  .location-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.25rem 1rem !important;
  }
  
  /* Fix wholesale layout */
  .wholesale-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
    width: 100% !important;
  }
  
  /* Fix form inputs */
  .form-input,
  textarea.form-input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix buttons with inline width: 100% */
  button[style*="width: 100%"],
  .btn[style*="width: 100%"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix state sections */
  .state-section {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .state-title {
    width: 100% !important;
    text-align: center !important;
  }
  
  /* Fix FAQ items */
  .faq-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .faq-question,
  .faq-answer {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix about hero */
  .about-hero {
    width: 100% !important;
    padding: 4rem 1rem !important;
  }
  
  /* Fix section headers with inline styles */
  section[style*="padding-top: 8rem"] {
    padding-top: 4rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Fix any divs with fixed widths in inline styles */
  div[style*="width: 80px"],
  div[style*="width: 120px"],
  div[style*="width: 150px"],
  div[style*="width: 220px"] {
    max-width: 100% !important;
  }
  
  /* Ensure all centered content stays centered */
  p[style*="max-width"],
  div[style*="max-width"] {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Nav Actions - Right column, only show cart */
  .nav-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0 !important;
    grid-column: 3;
    justify-self: end;
    z-index: 3;
    width: auto;
    position: static; /* Allow mobile-toggle to position relative to nav-container */
  }
  
  /* Ensure cart button is visible and properly sized */
  .cart-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    position: relative;
  }
  
  .cart-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .mobile-toggle svg {
    width: 20px;
    height: 20px;
  }
  
  /* Buttons - Make them responsive and smaller on mobile */
  .btn {
    padding: 10px 20px !important;
    font-size: 0.85rem !important;
    white-space: nowrap;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Hero buttons container - center and wrap */
  .hero-text > div[style*="display: flex"] {
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
  }
  
  /* Hero section - ensure centered */
  .hero-content {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
  }
  
  .hero-text {
    width: 100% !important;
    text-align: center !important;
  }
  
  .hero-image {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  
  /* Product grid - ensure centered */
  .product-grid,
  .product-list-wrapper {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  
  .product-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
  
  /* Process section - center all content */
  .process-section .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Endless possibilities - center */
  .endless-possibilities-section .container > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  .possibilities-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Testimonials - center */
  .section .container > div[style*="grid-template-columns: repeat(auto-fit, minmax(300px, 1fr))"] {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Footer - center */
  .footer-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    text-align: center !important;
  }
  
  .footer-grid > div {
    text-align: center !important;
    width: 100% !important;
  }
  
  /* Footer Logo - Mobile */
  .footer img[alt*="Walker's Tea"],
  .footer-grid img,
  .footer-grid > div:first-child img {
    max-width: 140px !important;
    max-height: 45px !important;
    margin: 0 auto !important;
  }
  
  /* Ensure all images don't overflow */
  img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  
  /* Video container - center */
  .process-section > .container > div[style*="padding-bottom: 56.25%"] {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  
  /* Cart modal - ensure it doesn't overflow */
  #cart-content {
    width: 95% !important;
    max-width: 95% !important;
    margin: 0 auto !important;
  }
  
  /* Option buttons - ensure they fit */
  .option-button {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Add to cart button - ensure it fits */
  .add-to-cart {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }
  
  /* Free shipping badge - responsive */
  .free-shipping-badge {
    font-size: 0.8rem !important;
    margin: 0.5rem 0 !important;
  }
  
  .free-shipping-badge svg {
    width: 16px !important;
    height: 16px !important;
  }
  
  /* Availability note - responsive */
  .availability-note {
    font-size: 0.75rem !important;
    padding: 0.4rem !important;
    margin: 0.4rem 0 !important;
  }
}

/* Extra small phones (below 480px) - even more aggressive centering and button shrinking */
@media (max-width: 480px) {
  /* Even smaller buttons */
  .btn {
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px !important;
  }
  
  /* Smaller hero text */
  .hero-text h1 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .hero-text p {
    font-size: 1rem !important;
  }
  
  /* Tighter container padding */
  .container {
    padding: 0 0.75rem !important;
  }
  
  /* Smaller section titles */
  .section-title {
    font-size: 1.75rem !important;
  }
  
  /* Smaller product card padding */
  .product-card {
    padding: 1rem !important;
  }
  
  /* Smaller option buttons */
  .option-button {
    padding: 0.5rem 0.6rem !important;
    min-height: 55px !important;
  }
  
  .qty-text {
    font-size: 0.8rem !important;
  }
  
  .opt-price {
    font-size: 0.9rem !important;
  }
  
  .unit-price-text {
    font-size: 0.7rem !important;
  }
  
  /* Ensure all text containers are centered */
  * {
    box-sizing: border-box !important;
  }
  
  /* Force center alignment for all text content */
  .section-header,
  .section-title,
  .section-subtitle {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Very small phones (below 320px) - optimize further */
@media (max-width: 320px) {
  /* Even tighter padding */
  .container {
    padding: 0 0.5rem !important;
  }
  
  /* Smaller text */
  h1 {
    font-size: 1.75rem !important;
  }
  
  h2 {
    font-size: 1.5rem !important;
  }
  
  /* Smaller buttons */
  .btn {
    padding: 6px 12px !important;
    font-size: 0.7rem !important;
  }
  
  /* Smaller cards */
  .product-card,
  .contact-card,
  .location-card,
  .team-card {
    padding: 1rem 0.75rem !important;
  }
}

/* Endless Possibilities Section Styles */
.possibility-card {
  position: relative;
}

.possibility-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(5, 79, 48, 0.05), rgba(9, 137, 83, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 16px;
  pointer-events: none;
}

.possibility-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(5, 79, 48, 0.15) !important;
}

.possibility-card:hover::before {
  opacity: 1;
}

.possibility-card:hover > div:first-child {
  transform: scale(1.1);
  transition: transform 0.3s ease;
}

.possibility-card > div:first-child {
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .endless-possibilities-section {
    padding: 4rem 0 !important;
  }

  .endless-possibilities-section h2 {
    font-size: 2rem !important;
  }

  .endless-possibilities-section p:first-of-type {
    font-size: 1.25rem !important;
  }
}
