/*
Theme Name: Anaya Foods
Theme URI: https://anayafoods.com
Author: Anaya Foods
Author URI: https://anayafoods.com
Description: Custom theme for Anaya Foods 
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: anaya-foods
*/

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
  /* Brand Colors */
  --brand-primary: #8B4513;
  --brand-secondary: #D2691E;
  --brand-tertiary: #CD853F;
  --brand-warm: #A0522D;
  
  /* Background Colors */
  --bg-cream: #ECE8E3;
  --bg-light: #F5F2ED;
  --bg-warm: #FAF8F5;
  --bg-white: #FFFFFF;
  
  /* Text Colors */
  --text-heading: #2D1B10;
  --text-body: #4A3429;
  --text-secondary: #5D453A;
  --text-muted: #6F564C;
  --text-inverse: #F8F5F0;
  
  /* Spacing */
  --section-padding: 5rem;
  --section-padding-lg: 6.5rem;
  --container-max: 80rem;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
  background-color: var(--bg-cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-heading);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3vw + 0.5rem, 2.25rem);
}

h3 {
  font-size: clamp(1.375rem, 2vw + 0.5rem, 1.75rem);
}

h4 {
  font-size: clamp(1.125rem, 1.5vw + 0.5rem, 1.375rem);
}

p {
  margin-bottom: 1rem;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

.container-narrow {
  max-width: 64rem;
}

.container-content {
  max-width: 48rem;
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
}

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

@media (min-width: 1024px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

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

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   SECTION COMPONENTS
   ============================================ */
.section {
  padding: var(--section-padding) 0;
}

@media (min-width: 1024px) {
  .section {
    padding: var(--section-padding-lg) 0;
  }
}

.section-compact {
  padding: 3rem 0;
}

@media (min-width: 1024px) {
  .section-compact {
    padding: 4rem 0;
  }
}

.section-header {
  margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .section-header {
    margin-bottom: 3rem;
  }
}

.section-header.text-center {
  text-align: center;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 42rem;
}

.section-header.text-center p {
  margin-left: auto;
  margin-right: auto;
}

/* Section Label Pill */
.section-label {
  display: inline-flex;
  align-items: center;
  background: rgba(139, 69, 19, 0.1);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.section-label::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background: var(--brand-primary);
  border-radius: 50%;
  margin-right: 0.75rem;
}

.section-label span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: all 0.3s ease;
}

@media (min-width: 1024px) {
  .card {
    padding: 2rem;
  }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.card-no-hover:hover {
  transform: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* ============================================
   NAVIGATION - Solid Header Bar
   ============================================ */
.site-header {
  background: var(--bg-cream);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

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

.site-logo img {
  height: 2.5rem;
  width: auto;
}

@media (min-width: 1024px) {
  .site-logo img {
    height: 3rem;
  }
}

.nav-menu {
  display: none;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .nav-menu {
    display: flex;
  }
}

.nav-menu > a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}

.nav-menu > a:hover {
  color: var(--brand-primary);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-dropdown-toggle:hover {
  color: var(--brand-primary);
}

.nav-dropdown-toggle svg {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  z-index: 1000;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0.75rem 0;
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  margin-top: 0.75rem;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 0.25rem;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-body);
  text-transform: none;
  letter-spacing: normal;
  transition: all 0.2s ease;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-cream);
  color: var(--brand-primary);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-heading);
  transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: var(--bg-cream);
  padding: 5rem 2rem 2rem;
  transition: right 0.3s ease;
  z-index: 99;
  box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu a {
  display: block;
  padding: 1rem 0;
  font-size: 1.125rem;
  color: var(--text-heading);
  border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 98;
}

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

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  height: 75vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .hero {
    height: 80vh;
    padding-bottom: 3.5rem;
  }
}

.hero-product {
  height: 50vh;
  min-height: 350px;
}

@media (min-width: 1024px) {
  .hero-product {
    height: 55vh;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.25), rgba(0,0,0,0.35));
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 64rem;
  padding: 0 1.5rem;
}

@media (min-width: 1024px) {
  .hero-content {
    padding: 0 2rem;
  }
}

.hero h1 {
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
}

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

.hero-home h1 span {
  display: block;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
  }
}

.stat-item {
  text-align: center;
}

.stat-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stat-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--brand-primary);
}

.stat-number {
  font-size: 1.875rem;
  font-weight: 600;
  color: var(--brand-primary);
  margin-bottom: 0.25rem;
}

@media (min-width: 1024px) {
  .stat-number {
    font-size: 2.25rem;
  }
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============================================
   PRODUCT GALLERY
   ============================================ */
.product-gallery {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1024px) {
  .product-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.gallery-main {
  position: relative;
}

.gallery-main-image {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

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

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.gallery-thumb {
  aspect-ratio: 1;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
}

.gallery-thumb.active {
  border-color: var(--brand-primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery Navigation */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-nav:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav.prev {
  left: 0.5rem;
}

.gallery-nav.next {
  right: 0.5rem;
}

.gallery-nav svg {
  width: 1rem;
  height: 1rem;
  color: var(--text-heading);
}

/* Product Details */
.product-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.product-grade {
  display: inline-block;
  background: rgba(139, 69, 19, 0.1);
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-heading);
}

.product-description {
  color: var(--text-body);
  line-height: 1.7;
}

.product-specs {
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.spec-row {
  display: flex;
  font-size: 0.9375rem;
}

.spec-label {
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 8rem;
}

.spec-value {
  color: var(--brand-primary);
  font-weight: 500;
}

/* Certifications */
.certifications {
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.certifications h4 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

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

.cert-item {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.5rem;
  padding: 0.5rem;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.cert-item:hover img {
  opacity: 1;
}

/* ============================================
   PARTNERSHIP SECTION
   ============================================ */
.partnership-logos {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.partnership-logos img {
  max-width: 10rem;
  height: auto;
}

.partnership-plus {
  font-size: 1.125rem;
  color: var(--text-muted);
}

.partner-details {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1rem;
}

.partner-row {
  display: flex;
  font-size: 0.9375rem;
}

.partner-label {
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 7rem;
}

.partner-value {
  color: var(--brand-primary);
  font-weight: 500;
}

/* ============================================
   CUSTOMER CARDS
   ============================================ */
.customer-card {
  text-align: center;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.customer-icon {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
}

.customer-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.customer-card h3 {
  color: var(--brand-primary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.customer-tagline {
  color: var(--brand-secondary);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.customer-services {
  text-align: left;
  flex-grow: 1;
}

.customer-services li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-body);
}

.customer-services li::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  background: var(--brand-primary);
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

/* ============================================
   PRODUCT CARDS (Homepage)
   ============================================ */
.product-card {
  cursor: pointer;
}

.product-card-image {
  aspect-ratio: 1;
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.product-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.product-card p {
  color: var(--text-body);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.product-partner {
  font-size: 0.875rem;
  color: var(--brand-primary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--brand-primary);
  padding: 3rem 0;
}

@media (min-width: 1024px) {
  .site-footer {
    padding: 4rem 0;
  }
}

.footer-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 5fr 4fr 3fr;
    gap: 2rem;
  }
}

.footer-brand p {
  color: rgba(248, 245, 240, 0.8);
  max-width: 20rem;
  margin-top: 1.25rem;
}

.footer-nav h4,
.footer-contact h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-nav a {
  display: block;
  color: rgba(248, 245, 240, 0.8);
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

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

.footer-contact p,
.footer-contact a {
  color: rgba(248, 245, 240, 0.8);
  margin-bottom: 0.75rem;
  display: block;
}

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

.footer-bottom {
  border-top: 1px solid var(--brand-warm);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  text-align: center;
}

.footer-bottom p {
  color: rgba(248, 245, 240, 0.7);
  font-size: 0.875rem;
}

/* ============================================
   SECTION DIVIDER
   ============================================ */
.section-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
}

.section-divider::before,
.section-divider::after {
  content: '';
  width: 3rem;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(139, 69, 19, 0.3));
}

.section-divider::after {
  background: linear-gradient(to left, transparent, rgba(139, 69, 19, 0.3));
}

.section-divider span {
  width: 0.5rem;
  height: 0.5rem;
  background: rgba(139, 69, 19, 0.4);
  border-radius: 50%;
}

/* ============================================
   CONTACT FORM
   ============================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(139, 69, 19, 0.2);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--brand-primary);
}

.form-group textarea {
  min-height: 8rem;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-primary:hover {
  background: #6B3410;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.items-center { align-items: center; }

.text-brand { color: var(--brand-primary); }

.bg-light { background-color: var(--bg-light); }
.bg-cream { background-color: var(--bg-cream); }