/* Top Bar */
.top-bar {
  background: var(--color-yellow-bar);
  color: var(--color-charcoal);
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  position: relative;
  z-index: 1001;
}

.top-bar.hidden {
  display: none;
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.top-bar .close-topbar {
  position: absolute;
  right: 20px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--color-charcoal);
  line-height: 1;
}

/* Header */
.site-header {
  background: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo svg {
  height: 45px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 35px;
}

.main-nav a {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-charcoal);
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  width: 100%;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
}

.cart-link svg {
  width: 24px;
  height: 24px;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--color-charcoal);
  margin: 5px 0;
  transition: all var(--transition);
}

/* Footer */
.site-footer {
  background: var(--color-charcoal);
  color: #ccc;
  padding-top: 70px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  padding-bottom: 50px;
}

.footer-col h3 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.footer-col p {
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul a {
  font-size: 14px;
  color: #aaa;
  transition: color var(--transition);
}

.footer-col ul a:hover {
  color: var(--color-primary);
}

.footer-newsletter {
  display: flex;
  gap: 0;
}

.footer-newsletter input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-card) 0 0 var(--radius-card);
  font-size: 14px;
}

.footer-newsletter button {
  padding: 12px 20px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition);
}

.footer-newsletter button:hover {
  background: var(--color-primary-dark);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 16px;
  transition: background var(--transition);
}

.social-links a:hover {
  background: var(--color-primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 25px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 13px;
}

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-legal a {
  color: #aaa;
}

.footer-legal a:hover {
  color: var(--color-primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  padding: 80px 0 120px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  color: var(--color-white);
}

.hero-content .tagline {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 15px;
  opacity: 0.9;
}

.hero-content h1 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 17px;
  margin-bottom: 30px;
  opacity: 0.9;
  max-width: 500px;
}

.hero-image img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
}

.torn-edge {
  position: relative;
  margin-top: -1px;
}

.torn-edge::after {
  content: "";
  display: block;
  width: 100%;
  height: 30px;
  background: var(--color-white);
  clip-path: polygon(0% 100%, 2% 60%, 4% 100%, 6% 50%, 8% 100%, 10% 65%, 12% 100%, 14% 55%, 16% 100%, 18% 70%, 20% 100%, 22% 45%, 24% 100%, 26% 60%, 28% 100%, 30% 75%, 32% 100%, 34% 50%, 36% 100%, 38% 65%, 40% 100%, 42% 55%, 44% 100%, 46% 70%, 48% 100%, 50% 45%, 52% 100%, 54% 60%, 56% 100%, 58% 75%, 60% 100%, 62% 50%, 64% 100%, 66% 65%, 68% 100%, 70% 55%, 72% 100%, 74% 70%, 76% 100%, 78% 45%, 80% 100%, 82% 60%, 84% 100%, 86% 75%, 88% 100%, 90% 50%, 92% 100%, 94% 65%, 96% 100%, 98% 55%, 100% 100%);
}

.torn-edge-green::after {
  background: var(--color-primary);
}

.torn-edge-white::after {
  background: var(--color-white);
}

/* Feature Cards Row */
.feature-cards-row {
  margin-top: -60px;
  position: relative;
  z-index: 10;
  padding-bottom: 60px;
}

.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Ingredients Section */
.ingredients-section {
  background: var(--color-white);
}

.ingredients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.ingredients-image img {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}

.ingredients-content .subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.ingredients-content h2 {
  margin-bottom: 20px;
}

.ingredients-content p {
  color: var(--color-text-muted);
  margin-bottom: 25px;
}

/* Promo Banner */
.promo-banner {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 80px 0;
}

.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.promo-grid h2 {
  color: var(--color-white);
  margin-bottom: 20px;
}

.promo-grid p {
  opacity: 0.9;
  margin-bottom: 15px;
}

.promo-image img {
  border-radius: var(--radius-card);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-item {
  padding: 35px 30px;
  text-align: center;
}

.feature-item .number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 15px;
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.feature-item p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin-bottom: 15px;
}

.feature-item a {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* Featured Product */
.featured-product {
  background: var(--color-off-white);
}

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.product-gallery .main-image {
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 15px;
  background: var(--color-white);
}

.product-gallery .main-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-gallery .thumbnails {
  display: flex;
  gap: 10px;
}

.product-gallery .thumbnails img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-card);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}

.product-gallery .thumbnails img:hover,
.product-gallery .thumbnails img.active {
  border-color: var(--color-primary);
}

.product-details .subtitle {
  font-size: 14px;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.product-details h2 {
  margin-bottom: 10px;
  text-transform: none;
}

.product-details .rating-text {
  font-size: 14px;
  color: var(--color-text-muted);
  margin-bottom: 15px;
}

.product-details .price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 20px;
}

.product-details .stock {
  font-size: 14px;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 20px;
}

.product-details .description {
  color: var(--color-text-muted);
  margin-bottom: 25px;
}

.product-details .add-to-cart-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.product-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  border-top: 1px solid #e0e0e0;
  padding-top: 20px;
}

.product-meta p {
  margin-bottom: 8px;
}

.shipping-note {
  background: var(--color-white);
  padding: 15px 20px;
  border-radius: var(--radius-card);
  font-size: 14px;
  margin-top: 20px;
}

/* Pricing Section */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: start;
}

.pricing-card.featured {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

/* Testimonials */
.testimonials-section {
  background: var(--color-primary);
  color: var(--color-white);
}

.testimonials-section .section-title h2,
.testimonials-section .section-title .subtitle {
  color: var(--color-white);
}

.testimonials-section .section-title .subtitle {
  opacity: 0.8;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

/* Related Products */
.related-products {
  padding: 60px 0;
  background: var(--color-off-white);
}

.related-products h2 {
  text-align: center;
  margin-bottom: 40px;
}

/* Responsive */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero .container,
  .ingredients-grid,
  .promo-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .feature-cards-grid,
  .products-grid,
  .features-grid,
  .pricing-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pricing-card.featured {
    transform: none;
  }

  .hero-image {
    order: -1;
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav ul li {
    border-bottom: 1px solid #eee;
  }

  .main-nav ul a {
    display: block;
    padding: 15px 0;
  }

  .mobile-toggle {
    display: block;
  }

  .feature-cards-grid,
  .products-grid,
  .features-grid,
  .pricing-grid,
  .blog-grid,
  .testimonials-grid,
  .footer-grid,
  .values-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table tr {
    display: block;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-card);
    padding: 15px;
  }

  .cart-table td {
    display: block;
    border: none;
    padding: 8px 0;
  }
}
