/* Tara Formula inspired design */

:root {
  --primary-cream: #f7f3ef;
  --secondary-cream: #f0ebe7;
  --warm-beige: #e8ddd4;
  --sage-green: #8b9a7a;
  --deep-forest: #495c3c;
  --charcoal: #2c2c2c;
  --soft-brown: #8b7355;
  --text-primary: #2c2c2c;
  --text-secondary: #666666;
  --text-light: #999999;
  --accent-green: #7a8471;
  --warm-white: #fefcfa;
  --border-light: #e8ddd4;
  --shadow-subtle: rgba(44, 44, 44, 0.05);
  --shadow-medium: rgba(44, 44, 44, 0.1);
  --shadow-strong: rgba(44, 44, 44, 0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background-color: var(--warm-white);
  line-height: 1.7;
  margin: 0;
  padding: 0;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 0.01em;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Spectral SC", "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, serif;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 1.5rem 0;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

h1 { 
  font-size: 3rem; 
  font-weight: 200; 
  letter-spacing: 0.03em;
  font-family: "Spectral SC", serif;
}
h2 { 
  font-size: 2.25rem; 
  font-weight: 300; 
  letter-spacing: 0.02em;
  font-family: "Spectral SC", serif;
}
h3 { 
  font-size: 1.75rem; 
  font-weight: 300; 
}
h4 { 
  font-size: 1.5rem; 
  font-weight: 400; 
}

p {
  margin: 0 0 1.5rem 0;
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  font-family: "IM Fell English", serif;
}

/* Modern button styles inspired by Tara */
.btn-primary {
  background-color: var(--sage-green);
  color: var(--warm-white);
  border: 1px solid var(--charcoal);
  padding: 16px 32px;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 50px;
  font-family: inherit;
}

.btn-primary:hover {
  background-color: var(--deep-forest);
  border-color: var(--deep-forest);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--shadow-medium);
}

.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-primary);
  padding: 16px 32px;
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  border-radius: 0;
  font-family: inherit;
}

.btn-secondary:hover {
  background-color: var(--text-primary);
  color: var(--warm-white);
}

/* Card styles */
.product-card {
  background: var(--warm-white);
  border: none;
  transition: all 0.4s ease;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--shadow-subtle);
}

.product-card:hover {
  box-shadow: 0 12px 32px var(--shadow-medium);
  transform: translateY(-8px);
}

/* Navigation */
.navbar {
  background-color: var(--warm-white);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 4px var(--shadow-subtle);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-link {
  color: var(--text-primary);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
}

.nav-link:hover {
  color: var(--sage-green);
}

/* Form elements */
input:not(.btn):not([type="submit"]):not([type="button"]), textarea, select {
  border: 1px solid var(--border-light);
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  background-color: var(--warm-white);
  transition: all 0.3s ease;
  border-radius: 0;
  width: 100%;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Specific styling for select dropdowns */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}

input:not(.btn):not([type="submit"]):not([type="button"]):focus, textarea:focus, select:focus {
  border-color: var(--sage-green);
  outline: none;
  box-shadow: 0 0 0 2px rgba(139, 154, 122, 0.1);
}

/* Hero section */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100vw;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero h1 {
  font-size: 13rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  letter-spacing: 0.02em;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);
  font-family: "Spectral SC", serif;
  text-align: center;
  width: 100%;
  margin: 0 auto 1.5rem auto;
  display: block;
}

.hero p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 auto 2rem;
  font-weight: 400;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  font-family: "IM Fell English", serif;
}

@media (max-width: 480px) {
  .hero {
    min-height: 80vh;
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin: 0 auto 1.5rem auto;
    padding: 0 20px;
    font-family: "Spectral SC", serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9), 0 0 25px rgba(0,0,0,0.7);
    text-align: center;
    width: 100%;
    display: block;
  }

  .hero p {
    font-size: 1.1rem;
    padding: 0 20px;
    margin: 0 auto 2rem;
    line-height: 1.5;
    max-width: 90%;
    font-weight: 400;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  }
}

@media (max-width: 768px) and (min-width: 481px) {
  .hero {
    min-height: 85vh;
    padding: 60px 0 40px;
  }

  .hero h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    padding: 0 25px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.9), 0 0 25px rgba(0,0,0,0.7);
  }

  .hero p {
    font-size: 1.2rem;
    padding: 0 25px;
    margin: 0 auto 2rem;
    line-height: 1.5;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .hero h1 {
    font-size: 3.2rem;
  }

  .hero p {
    font-size: 1.15rem;
  }
}

/* Category cards */
.category-card {
  border: none;
  overflow: hidden;
  position: relative;
  transition: all 0.4s ease;
  border-radius: 0;
  box-shadow: 0 4px 16px var(--shadow-subtle);
}

.category-card:hover {
  box-shadow: 0 16px 48px var(--shadow-medium);
  transform: translateY(-8px);
}

.category-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(44, 44, 44, 0.85);
  color: var(--warm-white);
  padding: 32px;
  text-align: center;
  font-weight: 300;
  font-size: 1.5rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Grid layouts */
.grid-container {
  display: grid;
  gap: 3rem;
}

.grid-2 { grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Sections */
.section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 80px;
}

.section-header h2 {
  font-size: 3rem;
  font-weight: 200;
  margin-bottom: 2rem;
  color: var(--text-primary);
  letter-spacing: 0.03em;
  font-family: "Spectral SC", serif;
  text-align: center;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  font-weight: 300;
  line-height: 1.7;
  font-family: "IM Fell English", serif;
  text-align: center;
}

/* Story section specific styling */
.story-section {
  text-align: center;
}

.story-section h2 {
  text-align: center;
  margin: 0 auto 2rem auto;
}

.story-section p {
  text-align: center;
  margin: 0 auto 2rem auto;
  max-width: 800px;
}

/* Testimonial section */
.testimonial {
  background-color: var(--secondary-cream);
  padding: 60px 40px;
  text-align: center;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.testimonial-text {
  font-size: 1.2rem;
  font-style: italic;
  margin-bottom: 30px;
  color: var(--text-primary);
  font-weight: 300;
  line-height: 1.7;
  font-family: "IM Fell English", serif;
}

.testimonial-author {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Footer */
.footer {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('/static/uploads/Images/Page Images/footerbackground.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-top: none;
  padding: 60px 0 30px;
  color: white;
  position: relative;
}

@media (max-width: 768px) {
  .footer {
    padding: 40px 0 20px;
  }

  .footer .grid {
    gap: 2rem;
  }

  .footer h3, .footer h4, .footer h5 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
  }

  .footer ul li {
    margin-bottom: 0.5rem;
  }

  .footer .space-y-2 > * + * {
    margin-top: 0.5rem;
  }

  .footer .space-y-4 > * + * {
    margin-top: 1rem;
  }

  .footer .flex.space-x-4 {
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .footer .flex.justify-center.items-center.space-x-4 {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .footer .flex.items-center.space-x-1 {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
  }
}

.footer h3, .footer h4 {
  color: white;
  font-weight: 500;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.footer h5 {
  color: white;
  font-weight: 500;
  letter-spacing: 0.02em;
}

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

.footer ul li {
  margin-bottom: 1rem;
}

.footer a {
  color: white;
  text-decoration: none;
  font-size: 16px;
  transition: all 0.3s ease;
  opacity: 0.9;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.footer a:hover {
  opacity: 1;
  color: var(--sage-green);
  text-shadow: 0 0 8px rgba(139, 154, 122, 0.5);
}

.footer p {
  color: white;
  font-family: "IM Fell English", serif;
}

.footer span {
  color: white;
}

/* Cart styles */
.cart-item {
  border-bottom: 1px solid var(--border-light);
  padding: 30px 0;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 15px;
}

.quantity-btn {
  background: var(--charcoal);
  border: 1px solid var(--charcoal);
  color: var(--warm-white);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: 400;
  transition: all 0.3s ease;
  border-radius: 0;
}

.quantity-btn:hover {
  background: var(--deep-forest);
}

.quantity-input {
  width: 80px;
  text-align: center;
  border: 1px solid var(--border-light);
  padding: 10px;
  margin: 0;
  color: var(--text-primary);
  border-radius: 0;
}

/* Mobile navigation - removed centering override */

/* Mobile menu improvements */
.navbar {
  position: relative;
}

#mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--warm-white);
  border-top: 1px solid var(--border-light);
  box-shadow: 0 4px 12px var(--shadow-medium);
  z-index: 9999;
  width: 100%;
  transition: all 0.3s ease;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
}

#mobile-menu.hidden {
  display: none !important;
  transform: translateY(-10px);
  opacity: 0;
  visibility: hidden;
}

#mobile-menu:not(.hidden) {
  display: block !important;
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

/* Mobile navigation link styles */
.mobile-nav-link {
  display: block;
  padding: 18px 25px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 16px;
  font-weight: 400;
  transition: all 0.2s ease;
  background: var(--warm-white);
}

.mobile-nav-link:hover {
  background-color: var(--secondary-cream);
  color: var(--sage-green);
  padding-left: 30px;
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

/* Mobile menu container styling */
#mobile-menu > div {
  background: var(--warm-white);
  width: 100%;
}

#mobile-menu .btn-primary {
  margin: 15px 25px;
  width: calc(100% - 50px);
  border-radius: 6px;
  text-align: center;
  display: block;
}

/* Tablet/iPad Responsive Design */
@media (min-width: 481px) and (max-width: 768px) {
  .container {
    padding: 0 20px !important;
    max-width: 100%;
  }

  body {
    font-size: 17px;
  }

  /* iPad Navigation Fixes - Improved */
  .navbar {
    padding: 0 8px !important;
    position: relative;
  }

  .navbar .h-16.md\\:h-20 {
    height: 70px !important;
  }

  .navbar .max-w-7xl {
    padding: 0 8px !important;
    max-width: 100% !important;
  }

  .navbar .flex.justify-between.items-center {
    height: 70px;
    gap: 4px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* Logo section - make more compact */
  .navbar .flex-shrink-0 {
    flex-shrink: 0;
    min-width: 120px;
  }

  .navbar .flex-shrink-0 img {
    height: 35px !important;
    max-height: 35px !important;
  }

  .navbar .flex-shrink-0 span {
    font-size: 14px !important;
    display: none; /* Hide text on small tablets to save space */
  }

  /* Desktop nav links on iPad - more compact */
  .navbar .hidden.md\\:block {
    display: block !important;
    flex: 1;
    max-width: calc(100% - 240px); /* Leave space for logo and user section */
  }

  .navbar .hidden.md\\:flex {
    display: flex !important;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
    justify-content: center;
    flex: 1;
    overflow: hidden;
  }

  .navbar .hidden.md\\:flex .flex.items-center.space-x-8 {
    gap: 2px;
    flex-wrap: nowrap;
    overflow: hidden;
  }

  .navbar .hidden.md\\:flex .flex.items-center.space-x-6 {
    gap: 2px;
    flex-wrap: nowrap;
  }

  .navbar .hidden.md\\:flex .flex.items-center.space-x-4 {
    gap: 2px;
    flex-wrap: nowrap;
  }

  /* Navigation links - more compact */
  .navbar .nav-link {
    padding: 4px 6px;
    font-size: 11px;
    white-space: nowrap;
    font-weight: 500;
    min-width: auto;
  }

  /* User section - right side with guaranteed space */
  .navbar .hidden.md\\:flex:last-child {
    gap: 2px;
    flex-shrink: 0;
    min-width: 120px;
    justify-content: flex-end;
    align-items: center;
  }

  /* User greeting - much more compact */
  .navbar .text-sm.font-medium {
    font-size: 9px;
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    display: none; /* Hide on smallest tablets */
  }

  /* Admin button styling for iPad */
  .navbar .btn-primary {
    padding: 3px 6px;
    font-size: 9px;
    min-width: auto;
    white-space: nowrap;
    border-radius: 3px;
  }

  /* Cart icon section - ensure it's visible with priority */
  .navbar .relative.transition-all {
    padding: 4px;
    flex-shrink: 0;
    min-width: 35px;
    order: 1; /* Ensure cart appears first in user section */
  }

  /* Cart countdown timer on tablet - hide to save space */
  #cart-countdown-desktop {
    display: none !important;
  }

  /* Ensure cart icon is always visible with priority */
  .navbar a[href*="cart"] {
    flex-shrink: 0;
    min-width: 35px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    order: 1;
    background-color: rgba(139, 154, 122, 0.1);
    border-radius: 4px;
    padding: 6px;
  }

  /* User actions section - reorder for better visibility */
  .navbar .flex.items-center.space-x-3 {
    gap: 2px;
    flex-wrap: nowrap;
    align-items: center;
  }

  /* Orders and Logout links - make more prominent */
  .navbar a[href*="orders"] {
    font-size: 9px;
    padding: 3px 5px;
    white-space: nowrap;
    order: 2;
  }

  .navbar a[href*="logout"] {
    font-size: 9px;
    padding: 3px 5px;
    white-space: nowrap;
    background-color: var(--sage-green);
    color: white !important;
    border-radius: 3px;
    order: 3;
  }

  /* Force mobile menu for very small tablets */
  @media (max-width: 650px) {
    .navbar .hidden.md\\:block {
      display: none !important;
    }

    .navbar .hidden.md\\:flex {
      display: none !important;
    }

    .navbar .sm\\:hidden {
      display: block !important;
    }

    .navbar .hidden.sm\\:flex {
      display: flex !important;
    }
  }

  .hero {
    min-height: 75vh;
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    padding: 0 30px;
  }

  .hero p {
    font-size: 1.1rem;
    padding: 0 30px;
    max-width: 80%;
  }

  .section {
    padding: 70px 0;
  }

  .section-header h2 {
    font-size: 2.75rem;
    margin-bottom: 3rem;
  }

  .section-header p {
    font-size: 1.1rem;
    max-width: 85%;
  }

  /* Grid optimizations for tablets */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  /* Product cards for tablets */
  .product-card {
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
  }

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

  .product-info {
    padding: 25px 20px;
  }

  .product-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
  }

  .product-price {
    font-size: 1.1rem;
    margin-bottom: 18px;
  }

  /* Button optimizations */
  .btn-primary, .btn-secondary {
    padding: 14px 28px;
    font-size: 14px;
    min-width: 140px;
  }

  /* Category cards for tablets */
  .category-card {
    height: 300px;
    margin-bottom: 2rem;
  }

  .category-title {
    padding: 25px;
    font-size: 1.4rem;
  }

  /* Footer for tablets */
  .footer {
    padding: 50px 0 25px;
  }

  .footer .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  /* Navigation for tablets */
  .navbar .h-16 {
    height: 75px;
  }

  .nav-link {
    padding: 0.875rem 1.25rem;
    font-size: 15px;
  }

  /* Form elements */
  input:not(.btn):not([type="submit"]):not([type="button"]), textarea, select {
    padding: 14px 18px;
    font-size: 16px;
  }

  /* Tablet-specific spacing */
  .mb-small { margin-bottom: 2rem; }
  .mb-medium { margin-bottom: 3.5rem; }
  .mb-large { margin-bottom: 7rem; }

  .mt-small { margin-top: 2rem; }
  .mt-medium { margin-top: 3.5rem; }
  .mt-large { margin-top: 7rem; }
}

/* iPad Portrait and Large Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container {
    padding: 0 30px !important;
    max-width: calc(100vw - 60px);
  }

  /* iPad Pro Navigation Optimization */
  .navbar {
    padding: 0 15px !important;
  }

  .navbar .h-16.md\\:h-20 {
    height: 75px !important;
  }

  .navbar .max-w-7xl {
    padding: 0 10px !important;
    max-width: 100% !important;
  }

  .navbar .flex.justify-between.items-center {
    height: 75px;
    gap: 8px;
    width: 100%;
  }

  /* Logo optimization for large tablets */
  .navbar .flex-shrink-0 {
    flex-shrink: 0;
    min-width: 150px;
  }

  .navbar .flex-shrink-0 img {
    height: 40px !important;
    max-height: 40px !important;
  }

  .navbar .flex-shrink-0 span {
    font-size: 16px !important;
  }

  /* Ensure desktop nav is visible and properly spaced */
  .navbar .hidden.md\\:block {
    display: block !important;
    flex: 1;
  }

  .navbar .hidden.md\\:flex {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
  }

  .navbar .flex.items-center.space-x-8 {
    gap: 6px;
  }

  .navbar .flex.items-center.space-x-6 {
    gap: 5px;
  }

  .navbar .flex.items-center.space-x-4 {
    gap: 4px;
  }

  .navbar .flex.items-center.space-x-3 {
    gap: 3px;
  }

  /* Navigation links styling for iPad Pro */
  .navbar .nav-link {
    padding: 6px 8px;
    font-size: 12px;
    white-space: nowrap;
    font-weight: 500;
  }

  /* User section - ensure cart is always visible */
  .navbar .hidden.md\\:flex:last-child {
    gap: 4px;
    flex-shrink: 0;
    min-width: 150px;
    justify-content: flex-end;
  }

  /* User greeting optimization */
  .navbar .text-sm.font-medium {
    font-size: 10px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Admin button for iPad Pro */
  .navbar .btn-primary {
    padding: 4px 8px;
    font-size: 10px;
    min-width: auto;
    white-space: nowrap;
  }

  /* Cart icon spacing - ensure visibility with background */
  .navbar .relative.transition-all {
    padding: 6px;
    flex-shrink: 0;
    min-width: 40px;
  }

  /* Cart countdown timer styling - show on larger tablets */
  #cart-countdown-desktop {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  /* Ensure all user action buttons are compact but visible */
  .navbar a[href*="orders"],
  .navbar a[href*="logout"] {
    font-size: 10px;
    padding: 4px 6px;
    white-space: nowrap;
  }

  /* Force cart icon to always be visible with highlight */
  .navbar a[href*="cart"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 40px;
    background-color: rgba(139, 154, 122, 0.1);
    border-radius: 4px;
    padding: 6px;
  }

  /* Logout button styling */
  .navbar a[href*="logout"] {
    background-color: var(--sage-green);
    color: white !important;
    border-radius: 4px;
    font-weight: 600;
  }

  .hero h1 {
    font-size: 4rem;
  }

  .hero p {
    font-size: 1.25rem;
    max-width: 75%;
  }

  .section-header h2 {
    font-size: 3rem;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  /* Enhanced product cards for large tablets */
  .product-card {
    box-shadow: 0 4px 12px var(--shadow-subtle);
  }

  .product-card:hover {
    box-shadow: 0 8px 25px var(--shadow-medium);
    transform: translateY(-8px);
  }

  /* Footer for large tablets */
  .footer .grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  /* Touch-friendly elements */
  .btn-primary, .btn-secondary {
    min-height: 48px;
    min-width: 120px;
  }

  .filter-btn {
    min-height: 44px;
    padding: 12px 20px;
  }

  /* About page specific iPad optimizations */
  .story-text-container {
    padding-left: 3rem !important;
  }

  .story-text-container h2 {
    font-size: 2.5rem !important;
    margin-bottom: 2rem !important;
  }

  .story-text-container p {
    font-size: 1.1rem !important;
    line-height: 1.8 !important;
    margin-bottom: 2.5rem !important;
  }

  /* Story images grid for iPad */
  .story-text-container .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
  }

  .story-text-container .grid img {
    height: 200px !important;
    object-fit: cover !important;
  }

  /* Values section optimization for iPad */
  .value-card-stagger {
    padding: 2.5rem 2rem !important;
    margin-bottom: 1.5rem !important;
  }

  .value-card-stagger h3 {
    font-size: 1.4rem !important;
    margin-bottom: 1.5rem !important;
  }

  .value-card-stagger p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
  }

  .value-card-stagger .w-16.h-16 {
    width: 4.5rem !important;
    height: 4.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Gallery section for iPad */
  .gallery-section .grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
  }

  .gallery-section img {
    height: 250px !important;
  }
}

/* Small Tablets (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  .container {
    padding: 0 20px !important;
    max-width: 100%;
  }

  body {
    font-size: 16px;
  }

  /* Navigation adjustments */
  .navbar .h-16.md\\:h-20 {
    height: 75px !important;
  }

  .navbar .hidden.md\\:flex {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }

  .navbar .nav-link {
    padding: 6px 8px;
    font-size: 12px;
  }

  .navbar .text-sm {
    font-size: 11px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .navbar .btn-primary {
    padding: 4px 8px;
    font-size: 11px;
  }

  /* Hero section */
  .hero {
    min-height: 75vh;
    padding: 60px 0 50px;
  }

  .hero h1 {
    font-size: 3rem !important;
    line-height: 1.1;
    padding: 0 20px;
    margin-bottom: 1.5rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 20px;
    max-width: 90%;
    margin: 0 auto 2rem;
  }

  /* Grid layouts */
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Section spacing */
  .section {
    padding: 50px 0;
  }

  .section-header h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
  }

  .section-header p {
    font-size: 1rem;
    max-width: 95%;
  }

  /* Product cards */
  .product-card {
    margin-bottom: 1.5rem;
  }

  .product-info {
    padding: 18px 15px;
  }

  .product-title {
    font-size: 1rem;
    margin-bottom: 8px;
  }

  .product-price {
    font-size: 0.9rem;
    margin-bottom: 12px;
  }

  /* Buttons */
  .btn-primary, .btn-secondary {
    padding: 10px 20px;
    font-size: 12px;
    min-width: 100px;
  }

  /* Category cards */
  .category-card {
    height: 250px;
    margin-bottom: 1.5rem;
  }

  .category-title {
    padding: 18px;
    font-size: 1.2rem;
  }

  /* Footer */
  .footer {
    padding: 40px 0 20px;
  }

  .footer .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* Mobile First Responsive Design */
@media (max-width: 480px) {
  .container {
    padding: 0 15px !important;
  }

  body {
    font-size: 16px;
  }

  .hero {
    min-height: 60vh;
    padding: 40px 0;
  }

  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
    padding: 0 15px;
  }

  .hero p {
    font-size: 0.9rem;
    padding: 0 15px;
  }

  .section {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .btn-primary, .btn-secondary {
    padding: 10px 16px;
    font-size: 12px;
    width: 100%;
    text-align: center;
  }

  .product-card {
    margin-bottom: 1rem;
  }

  .product-card .p-4 {
    padding: 12px;
  }

  .product-card h3 {
    font-size: 14px;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .product-card .text-xl {
    font-size: 16px;
  }

  .product-card .text-xs {
    font-size: 10px;
  }

  .product-card .flex.space-x-2 {
    flex-direction: column;
    gap: 8px;
  }

  .product-card .flex.space-x-2 button {
    font-size: 11px;
    padding: 8px 12px;
    width: 100%;
  }

  .category-card {
    margin-bottom: 2rem;
  }

  .footer {
    padding: 40px 0 20px;
  }

  .footer .grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Mobile navigation improvements */
  .navbar {
    padding: 0;
  }

  .navbar .h-20 {
    height: 70px;
    }

  /* Mobile menu styling */
  #mobile-menu {
    background: var(--warm-white);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 4px 6px var(--shadow-subtle);
  }

  #mobile-menu .space-y-1 > * + * {
    margin-top: 0;
  }

  #mobile-menu a {
    display: block;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.2s ease;
  }

  #mobile-menu a:hover {
    background-color: var(--secondary-cream);
  }

  #mobile-menu .btn-primary {
    margin: 15px 20px;
    width: calc(100% - 40px);
  }
}

/* iPad Portrait Mode Specific (768x1024 and similar) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .container {
    padding: 0 25px !important;
    max-width: 100%;
  }

  /* Navigation for portrait tablets - optimized for cart visibility */
  .navbar {
    padding: 0 15px !important;
  }

  .navbar .h-16.md\\:h-20 {
    height: 75px !important;
  }

  .navbar .max-w-7xl {
    padding: 0 10px !important;
    max-width: 100% !important;
  }

  .navbar .flex.justify-between.items-center {
    gap: 10px;
    width: 100%;
  }

  /* Logo section for portrait tablets */
  .navbar .flex-shrink-0 img {
    height: 42px !important;
    max-height: 42px !important;
  }

  .navbar .flex-shrink-0 span {
    font-size: 17px !important;
  }

  /* Navigation links section */
  .navbar .hidden.md\\:flex {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex: 1;
    justify-content: center;
  }

  .navbar .space-x-8 {
    gap: 8px;
  }

  .navbar .space-x-6 {
    gap: 6px;
  }

  .navbar .space-x-4 {
    gap: 5px;
  }

  .navbar .nav-link {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
  }

  /* User section - ensure cart and user elements are visible */
  .navbar .hidden.md\\:flex:last-child {
    gap: 6px;
    flex-shrink: 0;
    min-width: 0;
  }

  .navbar .text-sm {
    font-size: 11px;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .navbar .btn-primary {
    padding: 5px 10px;
    font-size: 11px;
    min-width: auto;
    white-space: nowrap;
  }

  /* Cart icon - force visibility */
  .navbar .relative.transition-all {
    padding: 5px;
    flex-shrink: 0;
    min-width: 32px;
  }

  .navbar a[href*="cart"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 32px;
  }

  /* User action links */
  .navbar a[href*="orders"],
  .navbar a[href*="logout"] {
    font-size: 11px;
    padding: 5px 8px;
    white-space: nowrap;
  }

  /* Cart countdown timer for portrait tablets */
  #cart-countdown-desktop {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }

  /* Hero section for portrait tablets */
  .hero {
    min-height: 80vh;
    padding: 80px 0 60px;
  }

  .hero h1 {
    font-size: 4rem !important;
    line-height: 1.1;
    padding: 0 25px;
    margin-bottom: 2rem;
  }

  .hero p {
    font-size: 1.2rem;
    padding: 0 25px;
    max-width: 85%;
    margin: 0 auto 2rem;
  }

  /* Grid adjustments for portrait tablets */
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  /* Section spacing */
  .section {
    padding: 60px 0;
  }

  .section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
  }

  .section-header p {
    font-size: 1.1rem;
    max-width: 90%;
  }

  /* Product cards */
  .product-card {
    margin-bottom: 2rem;
  }

  .product-info {
    padding: 20px 15px;
  }

  .product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
  }

  .product-price {
    font-size: 1rem;
    margin-bottom: 15px;
  }

  /* Button sizing */
  .btn-primary, .btn-secondary {
    padding: 12px 24px;
    font-size: 13px;
    min-width: 120px;
  }

  /* Category cards */
  .category-card {
    height: 280px;
    margin-bottom: 2rem;
  }

  .category-title {
    padding: 20px;
    font-size: 1.3rem;
  }

  /* Footer adjustments */
  .footer {
    padding: 45px 0 25px;
  }

  .footer .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }

  /* Form elements */
  input:not(.btn):not([type="submit"]):not([type="button"]), textarea, select {
    padding: 12px 16px;
    font-size: 15px;
  }

  /* Ensure logout button is always visible */
  .navbar a[href*="logout"] {
    background-color: var(--sage-green);
    color: white !important;
    border-radius: 4px;
    font-weight: 600;
    min-width: 60px;
    text-align: center;
  }
}

/* iPad 10th Generation Specific (1080x810 in landscape, 810x1080 in portrait) */
@media (min-width: 800px) and (max-width: 1090px) and (orientation: landscape) {
  .navbar .hidden.md\\:flex {
    display: flex !important;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
  }

  .navbar .space-x-6 {
    gap: 2px;
  }

  .navbar .space-x-4 {
    gap: 2px;
  }

  .navbar .space-x-3 {
    gap: 1px;
  }

  .navbar .nav-link {
    padding: 3px 4px;
    font-size: 9px;
    font-weight: 500;
  }

  .navbar .text-sm {
    display: none !important; /* Completely hide user greeting */
  }

  .navbar .btn-primary {
    padding: 2px 4px;
    font-size: 8px;
    min-width: auto;
  }

  /* ULTRA-PRIORITY: Force logout button with absolute maximum priority */
  .navbar a[href*="logout"],
  .navbar .flex a[href*="logout"],
  .navbar .hidden a[href*="logout"],
  .navbar .space-x-3 a[href*="logout"],
  .navbar .items-center a[href*="logout"] {
    background-color: var(--sage-green) !important;
    color: white !important;
    border-radius: 3px !important;
    font-weight: 800 !important;
    min-width: 55px !important;
    max-width: 55px !important;
    width: 55px !important;
    height: 28px !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 9999 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 9px !important;
    flex-shrink: 0 !important;
    order: 999999 !important;
    border: 2px solid var(--sage-green) !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: nowrap !important;
    line-height: 1 !important;
    text-decoration: none !important;
    font-family: inherit !important;
  }

  /* CRITICAL: User section layout optimization for guaranteed logout visibility */
  .navbar .hidden.md\\:flex:last-child {
    gap: 1px !important;
    flex-shrink: 0 !important;
    min-width: 120px !important;
    max-width: 120px !important;
    width: 120px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    overflow: visible !important;
    position: relative !important;
    display: flex !important;
  }

  /* Minimize all other user section elements */
  .navbar a[href*="orders"] {
    font-size: 8px !important;
    padding: 2px 3px !important;
    white-space: nowrap !important;
    max-width: 35px !important;
    min-width: 35px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    order: 1 !important;
  }

  /* Cart icon - ultra compact */
  .navbar .relative.transition-all {
    padding: 1px !important;
    min-width: 20px !important;
    max-width: 20px !important;
    order: 2 !important;
  }

  /* Admin button - ultra compact */
  .navbar .btn-primary:not([href*="logout"]) {
    padding: 1px 2px !important;
    font-size: 7px !important;
    min-width: 25px !important;
    max-width: 25px !important;
    order: 3 !important;
  }

  /* Force user greeting to be completely hidden */
  .navbar .text-sm.font-medium,
  .navbar span.text-sm {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    opacity: 0 !important;
  }

  /* Ensure no flex containers interfere with logout button */
  .navbar .flex.items-center.space-x-4,
  .navbar .flex.items-center.space-x-3 {
    gap: 1px !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  /* Ultra-specific logout button targeting */
  .navbar div:last-child a[href*="logout"],
  .navbar .hidden:last-child a[href*="logout"],
  .navbar .lg\\:flex:last-child a[href*="logout"] {
    background-color: var(--sage-green) !important;
    color: white !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    order: 999999 !important;
    z-index: 10000 !important;
  }
}

/* Touch-friendly optimizations for tablets and mobile */
@media (max-width: 991px) {
  /* Touch targets should be at least 44px */
  button, .btn-primary, .btn-secondary, .filter-btn, .nav-link, .mobile-nav-link {
    min-height: 44px;
    touch-action: manipulation;
  }

  /* Improve tap targets */
  .product-card {
    cursor: pointer;
  }

  .product-card img {
    transition: transform 0.2s ease;
  }

  .product-card:active img {
    transform: scale(0.98);
  }

  /* Enhanced form elements for touch */
  input:not(.btn):not([type="submit"]):not([type="button"]), textarea, select {
    min-height: 44px;
    border-radius: 4px;
  }

  /* Better spacing for touch interfaces */
  .cart-item {
    padding: 25px 0;
  }

  .quantity-btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* Enhanced mobile cart quantity controls */
  .quantity-decrease, .quantity-increase {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .quantity-decrease:active, .quantity-increase:active {
    transform: scale(0.95);
  }
}

/* Mobile-specific cart improvements */
@media (max-width: 768px) {
  /* Ensure cart items have proper spacing on mobile */
  #cart-items .space-y-4 > * + * {
    margin-top: 1.5rem;
  }

  /* Better mobile cart item layout */
  .cart-item-mobile {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  /* Touch-friendly quantity controls */
  .quantity-decrease, .quantity-increase {
    min-width: 44px;
    min-height: 44px;
    font-size: 16px;
  }

  /* Remove item button mobile optimization */
  .remove-item {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 991px) {
  .hamburger {
    display: block;
    cursor: pointer;
    color: var(--text-primary);
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    background: var(--warm-white);
    width: 100%;
    height: calc(100vh - 80px);
    transition: all 0.4s ease;
    flex-direction: column;
    z-index: 1000;
    border-top: 1px solid var(--border-light);
    padding: 30px;
  }

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

  .nav-link {
    padding: 25px 0;
    display: block;
    border-bottom: 1px solid var(--border-light);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Mobile menu button styling for tablets and mobile (991px and below) */
  .navbar .lg\\:hidden {
    display: flex !important;
    align-items: center;
    gap: 10px;
  }

  #mobile-menu-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #mobile-menu-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s ease;
  }

  #mobile-menu-button[aria-expanded="true"] svg {
    transform: rotate(90deg);
  }

  /* Mobile menu improvements */
  #mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--warm-white);
    border-top: 1px solid var(--border-light);
    box-shadow: 0 4px 12px var(--shadow-medium);
    z-index: 9999;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
  }

  #mobile-menu:not(.hidden) {
    max-height: 500px;
  }

  .mobile-nav-link {
    display: block;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.2s ease;
    background: var(--warm-white);
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .mobile-nav-link:hover {
    background-color: var(--secondary-cream);
    color: var(--sage-green);
    padding-left: 25px;
  }

  .hero h1 {
    font-size: 3.5rem !important;
    text-align: center;
    word-wrap: break-word;
    hyphens: auto;
    white-space: normal;
    font-family: "Spectral SC", serif;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 15px;
    text-align: center;
    font-family: "IM Fell English", serif;
  }

  .section {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: 2rem;
    text-align: center;
    padding: 0 20px;
  }

  .section-header p {
    font-size: 1rem;
    padding: 0 20px;
    text-align: center;
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .container {
    padding: 0 15px !important;
    max-width: 100%;
  }

  .footer {
    padding: 40px 0 20px;
  }

  /* Featured products mobile optimization */
  .grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Timeline mobile optimization */
  .timeline-item {
    margin-bottom: 2rem;
  }

  .timeline-item h3 {
    font-size: 1.5rem;
  }

  .timeline-item .text-4xl {
    font-size: 2.5rem;
  }

  /* About section mobile optimization */
  .grid.grid-cols-1.md\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  /* Testimonials mobile optimization */
  .testimonials-section {
    padding: 2rem 0;
  }

  .testimonials-title {
    font-size: 1.75rem;
    padding: 0 20px;
  }
}

/* Landscape tablets and small laptops */
@media (min-width: 1025px) and (max-width: 1366px) {
  .container {
    padding: 0 60px !important;
    max-width: calc(100vw - 120px);
  }

  .hero h1 {
    font-size: 4.5rem;
  }

  .section-header h2 {
    font-size: 3.25rem;
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }

  .product-card {
    max-width: none;
  }

  .category-card {
    height: 350px;
  }
}

@media (min-width: 1025px) {
  .container {
    max-width: 900px;
    padding: 0 60px !important;
  }
}

/* Modern spacing utilities */
.container {
  max-width: calc(100vw - 600px);
  margin: 0 auto;
  padding: 0 300px;
  width: 100%;
  overflow-x: hidden;
}

/* Mobile responsive - reduce margins on smaller screens */
@media (max-width: 768px) {
  .container {
    padding: 0 20px !important;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px !important;
  }
}

/* iPad and Large Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .container {
    padding: 0 40px !important;
    max-width: calc(100vw - 80px);
  }
}

/* Desktop screens (992px and above) */
@media (min-width: 992px) {
  .container {
    padding: 0 60px !important;
    max-width: 1200px;
  }

  /* Ensure desktop navigation is visible */
  .navbar .hidden.lg\\:block {
    display: block !important;
  }

  .navbar .hidden.lg\\:flex {
    display: flex !important;
  }

  /* Hide mobile elements on desktop */
  .navbar .lg\\:hidden {
    display: none !important;
  }
}

/* Large desktop screens */
@media (min-width: 1200px) {
  .container {
    padding: 0 100px !important;
    max-width: 1400px;
  }
}

.mb-small { margin-bottom: 1.5rem; }
.mb-medium { margin-bottom: 3rem; }
.mb-large { margin-bottom: 6rem; }

.mt-small { margin-top: 1.5rem; }
.mt-medium { margin-top: 3rem; }
.mt-large { margin-top: 6rem; }

/* Image styles */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Responsive image containers */
.aspect-ratio-square {
  aspect-ratio: 1 / 1;
}

.aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
}

/* Mobile-friendly product cards */
@media (max-width: 768px) {
  .product-card {
    width: 100%;
    max-width: none;
  }

  .product-info {
    padding: 20px 15px;
  }

  .category-card {
    height: 250px;
  }

  .category-title {
    padding: 20px;
    font-size: 1.2rem;
  }
}

/* Pagination styles */
.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
}

.pagination .current {
  background-color: #2563eb;
  border-color: #2563eb;
  color: white;
}

.pagination .disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Mobile pagination adjustments */
@media (max-width: 640px) {
  .pagination {
    gap: 0.25rem;
  }

  .pagination a,
  .pagination span {
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* Modern shadows */
.shadow-subtle { box-shadow: 0 2px 8px var(--shadow-subtle); }
.shadow-medium { box-shadow: 0 8px 24px var(--shadow-medium); }
.shadow-strong { box-shadow: 0 16px 48px var(--shadow-strong); }

/* Professional Shipping Options Styling */
.radio-option {
  transition: all 0.2s ease-in-out;
  background-color: white;
}

.radio-option:hover {
  border-color: #3b82f6 !important;
  background-color: #eff6ff !important;
}

.radio-circle {
  transition: all 0.2s ease-in-out;
}

.radio-dot {
  transition: opacity 0.2s ease-in-out;
}

/* Hide default radio buttons */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Ensure proper spacing in shipping options */
#uk-shipping-options .grid {
  gap: 0.75rem;
}

#uk-shipping-options h4 {
  margin-bottom: 1rem;
  font-weight: 600;
  color: #374151;
}

/* Professional hover states */
.radio-option:focus-within {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Selected state styling */
.radio-option.selected {
  border-color: #3b82f6;
  background-color: #eff6ff;
}

/* Responsive design for shipping options */
@media (max-width: 640px) {
  .radio-option {
    padding: 1rem;
  }

  .radio-option .font-medium {
    font-size: 0.875rem;
  }

  .radio-option .text-sm {
    font-size: 0.75rem;
  }
}

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

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fade-in {
  animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
  animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-up {
  animation: fadeIn 1.2s ease-out 0.6s both;
}

.animate-slide-up {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.animate-slide-up.in-view {
  opacity: 1;
  transform: translateY(0);
}

.usp-card {
  transition: all 0.4s ease;
  padding: 2rem;
  border-radius: 12px;
}

.usp-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-medium);
  background: rgba(255, 255, 255, 0.8);
}

.icon-hover {
  transition: all 0.4s ease;
}

.icon-hover:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(139, 154, 122, 0.4);
}

/* Scroll reveal animation trigger */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease-out;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Remove scroll bar from categories section */
.category-grid {
  overflow: hidden;
}

/* Remove scroll bar from story section and ensure proper sizing */
.story-fade-slide {
  overflow: visible;
}

.story-fade-slide .grid {
  overflow: visible;
}

.story-fade-slide img {
  max-width: 100%;
  height: auto;
  object-fit: cover;
}

/* Ensure story section container has no scroll */
section .container {
  overflow-x: visible;
  max-width: 100%;
}

section .grid {
  overflow-x: visible;
  max-width: 100%;
}

/* Ensure no horizontal scroll on body and html */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Fix for grid containers to prevent overflow */
.grid {
  max-width: 100%;
  overflow: visible;
}

/* Ensure containers don't create horizontal scroll */
.container {
  max-width: 100%;
  overflow-x: visible;
}



/* Enhanced Animation Styles */
@keyframes staggeredFadeSlide {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

/* USP Section Staggered Animation */
.usp-staggered-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.usp-staggered-fade.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.usp-staggered-fade:nth-child(1) {
  transition-delay: 0.1s;
}

.usp-staggered-fade:nth-child(2) {
  transition-delay: 0.3s;
}

.usp-staggered-fade:nth-child(3) {
  transition-delay: 0.5s;
}

/* Story Section Fade In + Slide Up */
.story-fade-slide {
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.story-fade-slide.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.story-fade-slide.delay-1 { transition-delay: 0.2s; }
.story-fade-slide.delay-2 { transition-delay: 0.4s; }
.story-fade-slide.delay-3 { transition-delay: 0.6s; }

/* Payment Trust Section Staggered List */
.payment-trust-item {
  opacity: 0;
  transform: translateX(-30px);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.payment-trust-item.animate-in {
  opacity: 1;
  transform: translateX(0);
}

.payment-trust-item:nth-child(1) { transition-delay: 0.1s; }
.payment-trust-item:nth-child(2) { transition-delay: 0.2s; }
.payment-trust-item:nth-child(3) { transition-delay: 0.3s; }

/* Enhanced hover effects with animations */
.animated-hover {
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.animated-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(139, 154, 122, 0.15);
}

/* Icon pulse animation */
@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.icon-pulse {
  animation: iconPulse 2s ease-in-out infinite;
}

/* Smooth scroll for better animation triggers */
html {
  scroll-behavior: smooth;
}

/* Text styles */
.text-small { font-size: 14px; }
.text-medium { font-size: 16px; }
.text-large { font-size: 18px; }

.text-light { font-weight: 300; }
.text-normal { font-weight: 400; }
.text-medium-weight { font-weight: 500; }
.text-bold { font-weight: 600; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Color utility classes */
.bg-cream { background-color: var(--primary-cream); }
.bg-secondary-cream { background-color: var(--secondary-cream); }
.bg-warm-beige { background-color: var(--warm-beige); }
.bg-sage-green { background-color: var(--sage-green); }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-sage { color: var(--sage-green); }
.text-forest { color: var(--deep-forest); }

/* Success/error states */
.alert-success {
  background-color: var(--sage-green);
  color: var(--warm-white);
  border: 1px solid var(--sage-green);
  border-radius: 0;
  padding: 20px;
}

.alert-error {
  background-color: var(--soft-brown);
  color: var(--warm-white);
  border: 1px solid var(--soft-brown);
  border-radius: 0;
  padding: 20px;
}

.alert-warning {
  background-color: var(--warm-beige);
  color: var(--text-primary);
  border: 1px solid var(--warm-beige);
  border-radius: 0;
  padding: 20px;
}

.alert-info {
  background-color: var(--sage-green);
  color: var(--warm-white);
  border: 1px solid var(--sage-green);
  border-radius: 0;
  padding: 20px;
}

/* Modern card hover effects */
.hover-lift {
  transition: all 0.4s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px var(--shadow-medium);
}

/* Special typography for headings */
.elegant-heading {
  font-family: "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 200;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

/* Refined product cards */
.product-info {
  padding: 30px 25px;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 10px;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.product-price {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

/* Cookie banner styling */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--charcoal);
  color: var(--warm-white);
  padding: 20px 0;
  box-shadow: 0 -4px 20px var(--shadow-medium);
  z-index: 10000;
  transform: translateY(100%);
  transition: all 0.4s ease;
}

.cookie-banner:not(.hidden) {
  transform: translateY(0);
}

.cookie-banner p {
  margin-bottom: 0;
  color: var(--warm-white);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner a {
  color: var(--sage-green);
  text-decoration: underline;
}

.cookie-banner a:hover {
  color: var(--warm-white);
}

.cookie-banner .accept-cookies {
  background-color: var(--sage-green);
  color: var(--warm-white);
  border: none;```text
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 15px;
}

.cookie-banner .accept-cookies:hover {
  background-color: var(--deep-forest);
  transform: translateY(-1px);
}

.cookie-banner .decline-cookies {
  background-color: transparent;
  color: var(--sage-green);
  border: 1px solid var(--sage-green);
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cookie-banner .decline-cookies:hover {
  background-color: var(--sage-green);
  color: var(--warm-white);
}

@media (max-width: 768px) {
  .cookie-banner {
    padding: 15px 0;
  }

  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner .accept-cookies {
    margin-left: 0;
    margin-top: 15px;
    width: 200px;
  }

  .cookie-banner .decline-cookies {
    margin-top: 10px;
    width: 200px;
  }

  .email-popup .popup-content {
    padding: 40px 30px;
    width: 95%;
  }

  .quick-view-modal .modal-content {
    padding: 30px 20px;
    width: 95%;
  }

  .whatsapp-button {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  /* Product modal responsive styles */
  #product-modal {
    padding: 15px !important;
    align-items: flex-start !important;
    padding-top: 40px !important;
  }

  #product-modal .modal-content-responsive {
    max-width: none !important;
    width: 95% !important;
    margin: 0 !important;
    border-radius: 8px !important;
    max-height: 85vh !important;
  }

  #product-modal .close-modal-responsive {
    top: 10px !important;
    right: 10px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
  }

  /* Grid layout adjustments for mobile modal */
  #product-modal .grid.grid-cols-1.lg\\:grid-cols-2 {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  /* Image sizing in mobile modal */
  #product-modal img {
    max-height: 250px !important;
    object-fit: cover !important;
  }

  /* Button adjustments */
  #product-modal .btn-primary {
    width: 100% !important;
    margin-top: 1rem !important;
  }
}

@media (max-width: 480px) {
  #product-modal {
    padding: 10px !important;
    padding-top: 30px !important;
  }

  #product-modal .modal-content-responsive {
    width: 98% !important;
    padding: 20px 15px !important;
    border-radius: 6px !important;
    max-height: 88vh !important;
  }

  #product-modal .close-modal-responsive {
    top: 8px !important;
    right: 8px !important;
    width: 35px !important;
    height: 35px !important;
    font-size: 18px !important;
  }

  /* Smaller text and spacing for very small screens */
  #product-modal h2 {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
  }

  #product-modal p {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
  }

  #product-modal img {
    max-height: 200px !important;
  }
}

.cookie-banner p {
  margin-bottom: 0;
  color: var(--warm-white);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-banner a {
  color: var(--sage-green);
  text-decoration: underline;
}

.cookie-banner a:hover {
  color: var(--warm-white);
}

.cookie-banner .accept-cookies {
  background-color: var(--sage-green);
  color: var(--warm-white);
  border:text
none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 15px;
}

.cookie-banner .accept-cookies:hover {
  background-color: var(--deep-forest);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .cookie-banner .container {
    flex-direction: column;
    text-align: center;
  }

  .cookie-banner .accept-cookies {
    margin-left: 0;
    margin-top: 15px;
    width: 200px;
  }
}

/* Newsletter section styling */
.newsletter-signup-form input[type="email"]:focus {
  border-color: var(--sage-green);
  box-shadow: 0 0 0 2px rgba(139, 154, 122, 0.1);
}

.newsletter-signup-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(139, 154, 122, 0.3);
}

/* Quick view modal */
.quick-view-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 44, 44, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

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

.modal-content {
  background: var(--warm-white);
  padding: 60px;
  max-width: 900px;
  width: 90%;
  position: relative;
  border-radius: 0;
  box-shadow: 0 20px 60px var(--shadow-strong);
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.close-modal:hover {
  color: var(--text-primary);
}



/* Instagram grid styling */
.instagram-item {
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.instagram-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44, 44, 44, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.instagram-item:hover .instagram-overlay {
  opacity: 1;
}

.instagram-item:hover {
  transform: scale(1.05);
}

/* This CSS modifies the footer to improve readability by changing the color of the payment methods text to black.*/