:root {
  --primary: #15803d;
  --primary-hover: #166534;
  --primary-light: #dcfce7;
  --accent: #f97316;
  --accent-light: #ffedd5;
  --dark: #0f172a;
  --text: #334155;
  --text-muted: #64748b;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-hover: 0 12px 20px -4px rgba(15, 23, 42, 0.1);
  --header-height: 70px;
}

/* ==========================================================================
   1. Reset
   ========================================================================== */
html {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

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

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

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

/* ==========================================================================
   2. Preloader
   ========================================================================== */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--primary-light);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-content {
  text-align: center;
  width: 100%;
  max-width: 300px;
  padding: 0 1rem;
}

.preloader-title {
  font-size: 1.85rem;
  color: var(--primary-hover);
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.loading-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  position: relative;
  overflow: visible;
}

.loading-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  width: 0%;
  animation: loadProgress 1.8s ease-in-out forwards;
}

.loading-fruits {
  position: absolute;
  top: -28px;
  font-size: 1.6rem;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  animation: moveFruits 1.8s ease-in-out forwards;
}

@keyframes loadProgress {
  0% { width: 0%; }
  100% { width: 100%; }
}

@keyframes moveFruits {
  0% { left: 0%; transform: translateX(0) scale(0.8); opacity: 0; }
  15% { opacity: 1; transform: translateX(-15%) scale(1); }
  100% { left: 100%; transform: translateX(-100%) scale(1); opacity: 1; }
}

/* ==========================================================================
   3. Navbar y Marca
   ========================================================================== */
.navbar {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.navbar.scrolled {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  pointer-events: none;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: auto;
}

.navbar.scrolled .nav-container {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-100%);
}

.brand-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 0.6rem;
}

.brand-shape {
  position: relative;
  font-size: 22px;
  width: 1em;
  height: 0.9em;
  background-color: #e11d48;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; 
  box-shadow: inset -0.15em -0.15em 0 rgba(0,0,0,0.15);
  flex-shrink: 0;
  margin-top: 0.1em;
}

.brand-shape::before {
  content: '';
  position: absolute;
  top: -0.25em;
  left: 0.45em;
  width: 0.08em;
  height: 0.35em;
  background-color: #78350f;
  border-radius: 0.1em;
  transform: rotate(15deg);
}

.brand-shape::after {
  content: '';
  position: absolute;
  top: -0.25em;
  left: 0.55em;
  width: 0.4em;
  height: 0.4em;
  background-color: var(--primary);
  border-radius: 0 50% 50% 50%;
  transform: rotate(0deg);
}

.brand-text-group { display: flex; flex-direction: column; line-height: 1; }
.brand-main { font-weight: 800; font-size: 1.15rem; color: var(--dark); letter-spacing: -0.02em; }
.brand-y { font-weight: 500; color: var(--primary); font-style: italic; }
.brand-loc { font-weight: 700; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.15rem; }

@media (min-width: 768px) {
  .brand-shape { font-size: 26px; } 
  .brand-main { font-size: 1.35rem; }
  .brand-loc { font-size: 0.75rem; }
}

/* Menú Móvil / Botón Manzana */
.apple-scrolled-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 60px;
  height: 55px;
  background-color: #e11d48;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  box-shadow: inset -4px -4px 0 rgba(0,0,0,0.15), 0 6px 15px rgba(0,0,0,0.2);
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.apple-scrolled-btn::before { content: ''; position: absolute; top: -8px; left: 50%; width: 4px; height: 14px; background-color: #78350f; border-radius: 2px; transform: translateX(-50%) rotate(15deg); }
.apple-scrolled-btn::after { content: ''; position: absolute; top: -10px; left: 55%; width: 18px; height: 18px; background-color: var(--primary); border-radius: 0 50% 50% 50%; }
.navbar.scrolled .apple-scrolled-btn { opacity: 1; visibility: visible; transform: scale(1); }
.apple-text { color: white; font-weight: 800; font-size: 0.75rem; letter-spacing: 0.05em; z-index: 2; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); transition: font-size 0.3s ease; }

.nav-links {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.4s ease;
  z-index: 45;
  pointer-events: none;
}

.nav-links.nav-active { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
.nav-links .nav-link { font-size: 1.5rem; color: var(--dark); font-weight: 700; text-decoration: none; transition: color 0.2s; }
.nav-links .nav-link:hover, .nav-links .nav-link:focus { color: var(--primary); }

.hamburger-btn { display: block; background: transparent; border: none; width: 32px; height: 24px; position: relative; cursor: pointer; z-index: 60; }
.hamburger-line { position: absolute; width: 100%; height: 3px; background: var(--dark); border-radius: 4px; left: 0; transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease; }
.hamburger-line:nth-child(1) { top: 0; } .hamburger-line:nth-child(2) { top: 10px; } .hamburger-line:nth-child(3) { top: 20px; }
.hamburger-btn.is-active .hamburger-line:nth-child(1) { transform: translateY(10px) rotate(45deg); background: var(--primary); }
.hamburger-btn.is-active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger-btn.is-active .hamburger-line:nth-child(3) { transform: translateY(-10px) rotate(-45deg); background: var(--primary); }

@media (min-width: 768px) {
  .apple-scrolled-btn { top: 20px; right: 40px; width: 70px; height: 65px; } 
  .apple-text { font-size: 0.85rem; }
  .hamburger-btn { display: none; }
  
  .navbar:not(.scrolled) .nav-links {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    padding: 0 2rem;
    height: var(--header-height);
    background: transparent;
    backdrop-filter: none;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 1.75rem;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .navbar:not(.scrolled) .nav-links .nav-link { font-size: 0.95rem; }
}

/* ==========================================================================
   4. Hero Section (Foto y Etiqueta)
   ========================================================================== */
.hero {
  padding: 5.5rem 0 3rem;
  background: radial-gradient(circle at top right, #ecfdf5 0%, #ffffff 80%);
  width: 100%;
}

.hero-grid {
  display: flex;
  flex-direction: column-reverse; /* Imagen arriba en móvil */
  gap: 2rem;
  width: 100%;
}

.hero-content {
  width: 100%;
}

.hero-title { display: flex; flex-direction: column; line-height: 1.1; margin-bottom: 1rem; }
.ht-main { font-size: clamp(2rem, 8vw, 3.5rem); color: var(--dark); font-weight: 800; letter-spacing: -0.03em; }
.ht-y { color: var(--primary); font-style: italic; font-weight: 500; }
.ht-loc { font-size: clamp(1rem, 4vw, 1.75rem); color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; margin-top: 0.25rem; }
.hero-subtitle { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 1.75rem; line-height: 1.6; }

.hero-actions { display: flex; flex-direction: column; gap: 0.75rem; width: 100%; }
.btn-primary, .btn-secondary {
  display: inline-flex; justify-content: center; align-items: center;
  text-decoration: none; padding: 0.9rem 1.75rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; text-align: center; width: 100%;
  transition: transform 0.2s, background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--primary); color: white; box-shadow: 0 6px 16px -3px rgba(21, 128, 61, 0.4); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover { background: var(--primary-light); }
.btn-secondary:active { transform: scale(0.98); }

/* IMAGEN Y ETIQUETA CORREGIDAS */
.hero-banner-image {
  position: relative;
  width: 100%;
}

.hero-banner-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.origin-badge {
  position: absolute;
  bottom: 16px; /* 100% pegada abajo a la izquierda dentro de la foto */
  left: 16px;
  top: auto;
  transform: none;
  background: var(--card-bg);
  border: 1px solid var(--primary-light);
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--dark);
  box-shadow: 0 4px 15px -3px rgba(21, 128, 61, 0.25);
  white-space: nowrap;
  z-index: 10;
}
.origin-badge .origin-icon { font-size: 1.15rem; line-height: 1; }

/* PC: FOTO GIGANTE ARRIBA DEL TODO */
@media (min-width: 768px) {
  .hero { padding: 6.5rem 0 5rem; }
  
  .hero-grid {
    display: flex;
    flex-direction: column-reverse; /* Mantiene la imagen arriba y texto abajo */
    align-items: center;
    gap: 3rem;
  }
  
  .hero-banner-image {
    max-width: 1000px;
    margin: 0 auto;
  }
  
  .hero-banner-image img { 
    height: 420px; /* Tamaño gigante en PC */
  }
  
  .origin-badge {
    bottom: 24px;
    left: 24px;
  }
  
  .hero-actions {
    flex-direction: row;
    width: auto;
  }
  .btn-primary, .btn-secondary { width: fit-content; }
}

/* ==========================================================================
   5. Features
   ========================================================================== */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: -1.5rem auto 3rem;
  position: relative;
  z-index: 10;
}
.feature-card {
  background: white; border: 1px solid var(--border); padding: 1.25rem;
  border-radius: var(--radius); display: flex; align-items: center;
  gap: 1.25rem; box-shadow: var(--shadow);
}
.feature-icon {
  font-size: 1.75rem; background: var(--bg); padding: 0.75rem;
  border-radius: var(--radius-sm); flex-shrink: 0;
}
.feature-card h4 { font-size: 0.95rem; color: var(--dark); margin-bottom: 0.25rem; font-weight: 700; }
.feature-card p { font-size: 0.85rem; color: var(--text-muted); }

@media (min-width: 768px) {
  .features { grid-template-columns: repeat(3, 1fr); margin: -2.5rem auto 4rem; }
}

/* ==========================================================================
   6. Catálogo
   ========================================================================== */
.catalog-section { padding: 3rem 0; width: 100%; }
.section-header { margin-bottom: 2rem; border-bottom: 2px solid var(--primary-light); padding-bottom: 0.5rem; display: inline-block; }
.section-header h2 { font-size: 1.75rem; color: var(--dark); font-weight: 800; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}
@media (min-width: 640px) { .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; } }
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; } }

.product-card {
  background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  position: relative; transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.badge-tag {
  position: absolute; top: 10px; left: 10px; background: rgba(255, 255, 255, 0.94);
  padding: 0.25rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  color: var(--dark); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); backdrop-filter: blur(4px); z-index: 2;
}
.product-thumb { width: 100%; height: 180px; object-fit: cover; background-color: var(--bg); }
.product-body { padding: 1.25rem; display: flex; flex-direction: column; flex-grow: 1; text-align: center; align-items: center; justify-content: center; }
.product-origin { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin-bottom: 0.4rem; }
.product-title { font-size: 1.15rem; font-weight: 800; color: var(--dark); margin-bottom: 0.6rem; line-height: 1.3; }
.product-rating { font-size: 0.85rem; color: #eab308; margin-top: auto; }

/* ==========================================================================
   7. Sobre Nosotros
   ========================================================================== */
.about-section { padding: 2rem 0 4rem; width: 100%; }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
.about-text p { color: var(--text-muted); font-size: 1.05rem; line-height: 1.6; margin-bottom: 1.25rem; }
.about-text strong { color: var(--dark); }
.about-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.badge-pill { background: var(--primary-light); color: var(--primary-hover); padding: 0.4rem 1.1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 700; display: inline-block; }

.about-image-wrapper { position: relative; max-width: 500px; margin: 0 auto; }
.about-img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); position: relative; z-index: 2; object-fit: cover; }
.about-decoration { position: absolute; bottom: -20px; right: -20px; width: 120px; height: 120px; background: var(--accent-light); border-radius: 50%; z-index: 1; }

@media (min-width: 768px) {
  .about-section { padding: 4rem 0 5rem; }
  .about-grid { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .about-text { padding-right: 1.5rem; }
  .about-decoration { bottom: auto; right: auto; top: -30px; left: -30px; width: 180px; height: 180px; }
}

/* ==========================================================================
   8. Contacto
   ========================================================================== */
.contact-section { padding: 4rem 0; background: white; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.info-block h3 { font-size: 1rem; color: var(--dark); margin-bottom: 0.25rem; }
.info-block p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }
.map-container { width: 100%; }
.map-placeholder { width: 100%; min-height: 300px; background: var(--bg); border: 2px dashed #cbd5e1; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--text-muted); padding: 2rem; }
.map-icon { font-size: 2rem; margin-bottom: 0.5rem; }

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: stretch; }
  .map-placeholder { min-height: 100%; height: 100%; }
}

/* ==========================================================================
   9. Footer
   ========================================================================== */
.footer { background: var(--dark); color: #f1f5f9; padding: 4rem 0 2rem; text-align: center; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.footer-brand .brand-main, .footer-brand .brand-loc { color: #ffffff; }
.footer-details p { font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.5rem; }
.footer-details .copyright { margin-top: 2rem; font-size: 0.75rem; color: #64748b; }