/* styles.css */

/* Reset and Base Styles */
:root {
  --color-primary: #4c9141;
  --color-primary-dark: #15803d;
  --color-primary-light: #22c55e;
  --color-primary-lighter: #dcfce7;
  --color-dark: #111827;
  --color-gray: #6b7280;
  --color-light: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

html {
  scroll-behavior: smooth;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-dark);
  overflow-x: hidden;
}

section {
  scroll-margin-top: 50px;
}
.map-section {
  scroll-margin-top: 125px;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  white-space: nowrap;
}

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

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

.btn-negative {
  background-color: red;
  color: white;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid white;
  color: white;
}

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

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

.btn-dark:hover {
  background-color: black;
}

.btn-outline-dark {
  background-color: transparent;
  border: 1px solid var(--color-dark);
  color: var(--color-dark);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-outline-dark:hover {
  background-color: var(--color-dark);
  color: white;
}

.full-width {
  width: 100%;
}

/* Navigation */
.nav {
  background-color: var(--color-primary);
  padding: 0.25rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-brand i {
  margin-right: 0.5rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Cart Styles */
.cart-container {
  position: relative;
  text-align: center;
}

.cart-btn {
  position: relative;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.5rem;
}

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

.cart-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 350px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-lg);
  margin-top: 0.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.cart-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.cart-header h3 {
  font-size: 1.125rem;
  color: var(--color-dark);
}

.cart-items {
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.cart-item {
  display: flex;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: 0.25rem;
  overflow: hidden;
  margin-right: 1rem;
  flex-shrink: 0;
}

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

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

.cart-item-details h4 {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-details p {
  font-size: 0.75rem;
  color: var(--color-gray);
  margin-bottom: 0.5rem;
}

.cart-item-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-per {
  color: var(--color-gray);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  white-space: pre-wrap;
  line-height: 1.1;
}

.cart-price-per {
  color: var(--color-gray);
  font-size: 0.7rem;
  margin-top: 0.25rem;
  white-space: pre-wrap;
  line-height: 1.1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-item-price span {
  font-weight: 600;
  color: var(--color-primary);
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.quantity-btn:hover {
  background-color: #f3f4f6;
}

.remove-item {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  color: var(--color-gray);
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.25rem;
}

.remove-item:hover {
  color: #ef4444;
}

.cart-footer {
  padding: 1rem;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cart-actions {
  display: flex;
  gap: 0.5rem;
}

.cart-actions .btn {
  flex: 1;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Hero Section */
.hero {
  position: relative;
  height: 600px;
  background-image: url("addons/microgreens.JPG");
  background-size: cover;
  background-position: center;
  color: white;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

.hero-text {
  max-width: 600px;
}

.hero-text h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-text p {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 1rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--color-gray);
  font-size: clamp(1rem, 2vw, 1.25rem);
}

@font-face {
  font-family: "trajan";
  src: url("Addons/TrajanPro-Bold.otf") format("opentype");
}

.brand-text {
  color: var(--color-light);
  font-family: "trajan", sans-serif !important;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: auto;
}

.location-banner {
  background: var(--color-primary-dark); /* Dark green to match branding */
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 1.5rem; /* Increased font size */
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: fadeInSlide 0.5s ease-in-out;
}

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

/* Optional: Add a slight glowing effect to make it pop */
.location-banner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -5px;
  height: 4px;
  background: var(--color-primary-light); /* Lighter green for a subtle highlight */
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

#map-section {
  text-align: center;
  margin: 2rem 0;
  z-index: 1;
  overflow: hidden;
}

#halton-map {
  width: 100%;
  max-width: 800px;
  height: 400px;
  margin: 0 auto;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
}

.logo {
  height: 100px;
  width: 100px;
  object-fit: contain;
}

/* Benefits Section */
.benefits {
  padding: clamp(3rem, 8vw, 5rem) 0;
  background-color: var(--color-primary-lighter);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
  padding: 0 1rem;
}

.benefit-card {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 2rem);
  background-color: white;
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.benefit-icon {
  width: 80px;
  height: 80px;
  background-color: var(--color-primary-lighter);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.benefit-icon i {
  color: var(--color-primary);
  width: 40px;
  height: 40px;
}

.benefit-card h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  margin-bottom: 1rem;
}

/* Products Section */
.products {
  padding: clamp(3rem, 8vw, 5rem) 0;
  background-color: var(--color-primary-lighter);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
  padding: 0 1rem;
}

.product-card {
  position: relative;
  background-color: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: scale3d(1.05, 1.05, 1.05);
}

.product-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.product-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  gap: 1rem;
}

.product-header h3 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  flex: 1;
}

.price {
  color: var(--color-primary);
  font-weight: bold;
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  white-space: nowrap;
  padding-left: 3rem;
}

.product-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.size-btn {
  padding: 0.5rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  background: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.size-btn:hover,
.size-btn:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.size-btn.active {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.size-btn.selected {
  background-color: #4caf50; /* Highlight the selected size */
  color: white;
}

/* Subscription Section */
.subscription {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.subscription-card {
  background-color: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin: 0 1rem;
}

.subscription-content {
  padding: clamp(2rem, 5vw, 3rem);
}

.subscription-content h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 1rem;
}

.subscription-features {
  list-style: none;
  margin: 2rem 0;
}

.subscription-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.subscription-features i {
  color: var(--color-primary);
  flex-shrink: 0;
}

.subscription-image {
  background-image: url("addons/microgreens.JPG?auto=format&fit=crop&q=80&w=800");
  background-size: cover;
  background-position: center;
  min-height: 300px;
}

/* Footer */
.footer {
  background-color: var(--color-dark);
  color: white;
  padding: clamp(3rem, 6vw, 4rem) 0 clamp(2rem, 4vw, 2rem);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(1.5rem, 4vw, 2rem);
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.footer-brand .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.footer h4 {
  font-size: clamp(1.1rem, 2.5vw, 1.25rem);
  margin-bottom: 1.5rem;
}

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

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

.footer a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

.footer a:hover {
  color: white;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: #9ca3af;
  transition: color 0.3s ease;
  padding: 0.5rem;
}

.social-icons a:hover {
  color: white;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  color: #9ca3af;
  font-size: clamp(0.875rem, 2vw, 1rem);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
  .nav-container {
    padding: 0.5rem 1rem;
    flex-direction: row;
    align-items: flex-start;
  }

  .nav-brand {
    font-size: 1rem; /* Keep brand text compact */
  }

  .logo {
    height: 60px; /* Reduce logo size */
    width: 60px;
  }

  .nav-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns per row */
    grid-template-rows: repeat(2, auto); /* 2 rows */
    gap: 0.3rem; /* Small gap between buttons */
    width: 100%;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: 0.4rem; /* Reduce padding for minimal space usage */
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
  }

  .nav-links a {
    text-align: center;
    padding: 0.3rem; /* Reduce padding */
    font-size: 0.8rem; /* Compact font */
    white-space: nowrap; /* Prevent wrapping */
  }

  .hero {
    height: 100vh;
    max-height: 600px;
  }

  .hero-text {
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .cart-dropdown {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 80vh;
    border-radius: 1rem 1rem 0 0;
    margin: 0;
    transform: translateY(100%);
  }

  .cart-dropdown.active {
    transform: translateY(0);
  }

  .cart-items {
    max-height: 50vh;
  }

  .footer {
    padding-bottom: 3rem; /* Reduce bottom padding */
  }

  .footer-grid {
    text-align: center;
  }

  .footer-brand .brand {
    justify-content: center;
  }

  .social-icons {
    justify-content: center;
  }

  .product-card:hover {
    transform: none;
  }
}


/* Touch Device Optimizations */
@media (hover: none) {
  .product-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* High-DPI Screen Optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero {
    background-image: url("Addons/Microgreens.JPG");
  }
}

/*Coming Soon for products*/

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  text-transform: uppercase;
}

.coming-soon-text {
  color: white;
  font-size: 2rem;
  font-weight: bold;
  margin-top: -50px;
}

.coming-soon-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  filter: brightness(0.5); /* Fades the image */
}

/* Newsletter Section */
.newsletter {
  padding: 5rem 0;
  background-color: var(--color-primary);
  color: white;
}

.newsletter-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
  gap: 0.5rem;
}

.btn-dark {
  padding: 10px 20px;
  font-size: 1rem;
  text-align: center;
  background-color: #333;
  color: white;
  border: none;
  cursor: pointer;
}

.btn-dark:hover {
  background-color: #555;
}
