/* ========================================
   HELADOS FRUTIFRESCA — Redesign
   Palette: Brand greens + warm accent
   ======================================== */

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

:root {
  --green-dark: #1A5C28;
  --green: #2D8C3C;
  --green-light: #E8F5E9;
  --green-50: #F1F8F2;
  --accent: #F57C00;
  --white: #FFFFFF;
  --gray-50: #FAFAFA;
  --gray-100: #F5F5F5;
  --gray-200: #E0E0E0;
  --gray-600: #666666;
  --gray-800: #333333;
  --gray-900: #1A1A1A;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w: 1200px;
  --nav-h: 72px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,.06);
  --shadow-hover: 0 8px 32px rgba(0,0,0,.10);
  --transition: .3s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { font-family: var(--font-body); color: var(--gray-800); line-height: 1.6; background: var(--white); -webkit-font-smoothing: antialiased; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--green-dark); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Focus */
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 32px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition); border: 2px solid transparent;
  text-align: center;
}
.btn--primary { background: var(--green); color: var(--white); border-color: var(--green); }
.btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: var(--white); }
.btn--outline { background: transparent; color: var(--green); border-color: var(--green); }
.btn--outline:hover { background: var(--green); color: var(--white); }
.btn--full { width: 100%; }

/* --- SECTION HEADERS --- */
.section-header { text-align: center; margin-bottom: 48px; }
.section-title { font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.5rem); color: var(--gray-900); margin-bottom: 8px; }
.section-sub { color: var(--gray-600); font-size: 1.05rem; }

/* --- NAV --- */
.nav {
  position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-h);
  background: rgba(255,255,255,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  z-index: 1000; border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--transition);
}
.nav--scrolled { box-shadow: var(--shadow); }
.nav__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 100%; }
.nav__logo img { height: 32px; width: auto; }
.nav__list { list-style: none; display: flex; gap: 32px; align-items: center; }
.nav__link { font-size: .95rem; font-weight: 500; color: var(--gray-800); position: relative; padding: 4px 0; }
.nav__link::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px; background: var(--green); transition: width var(--transition); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__link:hover { color: var(--green); }
.nav__link--cta { background: var(--green); color: var(--white) !important; padding: 10px 24px; border-radius: var(--radius-sm); }
.nav__link--cta::after { display: none; }
.nav__link--cta:hover { background: var(--green-dark); }

/* Hamburger */
.nav__toggle { display: none; background: none; border: none; cursor: pointer; width: 32px; height: 24px; position: relative; z-index: 10; }
.nav__toggle span { display: block; width: 100%; height: 2px; background: var(--gray-800); position: absolute; left: 0; transition: all var(--transition); }
.nav__toggle span:nth-child(1) { top: 0; }
.nav__toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav__toggle span:nth-child(3) { bottom: 0; }
.nav__toggle.open span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
.nav__toggle.open span:nth-child(2) { opacity: 0; }
.nav__toggle.open span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* --- HERO --- */
.hero { padding: calc(var(--nav-h) + 60px) 0 80px; background: linear-gradient(135deg, var(--green-50) 0%, var(--white) 50%); overflow: hidden; }
.hero__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 60px; }
.hero__content { flex: 1; }
.hero__title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.15; color: var(--gray-900); margin-bottom: 20px; }
.hero__sub { font-size: 1.1rem; color: var(--gray-600); margin-bottom: 32px; max-width: 480px; line-height: 1.7; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__image { flex: 0 0 380px; }
.hero__image img { border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow-hover); }

/* --- PRODUCTOS --- */
.productos { padding: 100px 0; background: var(--white); }
.productos__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.producto-card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--gray-50); transition: transform var(--transition), box-shadow var(--transition); text-align: center; }
.producto-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.producto-card__img { aspect-ratio: 1; overflow: hidden; background: var(--gray-100); display: flex; align-items: center; justify-content: center; }
.producto-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.producto-card:hover .producto-card__img img { transform: scale(1.05); }
.producto-card__img--placeholder { background: linear-gradient(135deg, var(--green-light), var(--green-50)); }
.placeholder-label { font-size: .85rem; color: var(--green); font-weight: 500; padding: 16px; }
.producto-card__name { padding: 16px; font-size: 1rem; font-weight: 600; color: var(--gray-900); }

/* --- NOSOTROS --- */
.nosotros { padding: 100px 0; background: var(--green-50); }
.nosotros__inner { display: flex; align-items: center; gap: 60px; }
.nosotros__content { flex: 1; }
.nosotros__content .section-title { text-align: left; margin-bottom: 24px; }
.nosotros__content p { margin-bottom: 16px; color: var(--gray-600); line-height: 1.75; }
.nosotros__cta-text { color: var(--green) !important; font-weight: 600; font-size: 1.1rem; }
.nosotros__image { flex: 0 0 360px; }
.nosotros__image img { border-radius: var(--radius); }

/* --- SERVICIOS --- */
.servicios { padding: 100px 0; background: var(--white); }
.servicios__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 60px; }
.servicio-card { background: var(--gray-50); border-radius: var(--radius); padding: 36px; transition: transform var(--transition), box-shadow var(--transition); }
.servicio-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.servicio-card__icon { font-size: 2rem; margin-bottom: 16px; }
.servicio-card__title { font-family: var(--font-display); font-size: 1.25rem; margin-bottom: 12px; color: var(--gray-900); }
.servicio-card p { color: var(--gray-600); font-size: .95rem; line-height: 1.7; }

/* Cobertura */
.cobertura { text-align: center; padding: 48px; background: var(--green-50); border-radius: var(--radius); }
.cobertura__title { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 20px; color: var(--gray-900); }
.cobertura__states { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.cobertura__state { background: var(--green); color: var(--white); padding: 8px 20px; border-radius: 100px; font-size: .9rem; font-weight: 500; }
.cobertura__note { color: var(--gray-600); font-size: .95rem; }
.cobertura__note a { font-weight: 600; }

/* --- ENCUÉNTRANOS --- */
.encuentranos { padding: 100px 0; background: var(--green-50); }
.encuentranos__logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 48px; }
.store-logo { background: var(--white); padding: 16px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: .9rem; color: var(--gray-800); box-shadow: var(--shadow); transition: transform var(--transition), box-shadow var(--transition); }
.store-logo:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--green); }
.encuentranos__truck { text-align: center; }
.encuentranos__truck img { max-width: 500px; margin: 0 auto; }

/* --- CONTACTO --- */
.contacto { padding: 100px 0; background: var(--white); }
.contacto__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contacto__block { margin-bottom: 28px; }
.contacto__block h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--green); margin-bottom: 6px; font-weight: 600; }
.contacto__block p { color: var(--gray-800); line-height: 1.6; }
.contacto__block a { color: var(--green); font-weight: 500; }
.contacto__small { font-size: .85rem; color: var(--gray-600); }
.contacto__social { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.contacto__social svg { width: 20px; height: 20px; }

/* Form */
.contacto__form-intro { color: var(--gray-600); margin-bottom: 28px; line-height: 1.7; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--gray-800); }
.form-group input, .form-group textarea {
  width: 100%; padding: 14px 16px; border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 1rem;
  transition: border-color var(--transition); background: var(--gray-50);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--green); outline: none; background: var(--white); }
.form-group textarea { resize: vertical; }

/* --- FOOTER --- */
.footer { padding: 40px 0; border-top: 1px solid var(--gray-200); background: var(--gray-50); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.footer__brand img { height: 24px; width: auto; margin-bottom: 8px; }
.footer__copy { font-size: .8rem; color: var(--gray-600); }
.footer__nav { display: flex; gap: 24px; }
.footer__nav a { font-size: .85rem; color: var(--gray-600); font-weight: 500; }
.footer__nav a:hover { color: var(--green); }

/* --- REVEAL ANIMATION --- */
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].revealed { opacity: 1; transform: translateY(0); }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .hero__inner { gap: 40px; }
  .hero__image { flex: 0 0 300px; }
  .nosotros__inner { gap: 40px; }
  .nosotros__image { flex: 0 0 280px; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  /* Nav mobile */
  .nav__toggle { display: block; }
  .nav__menu {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    background: var(--white); padding: 100px 32px 40px;
    transition: right var(--transition); box-shadow: -4px 0 24px rgba(0,0,0,.1);
  }
  .nav__menu.open { right: 0; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { display: block; padding: 16px 0; font-size: 1.1rem; border-bottom: 1px solid var(--gray-100); }
  .nav__link::after { display: none; }
  .nav__link--cta { text-align: center; margin-top: 16px; border-bottom: none; }

  /* Hero mobile */
  .hero { padding: calc(var(--nav-h) + 40px) 0 60px; }
  .hero__inner { flex-direction: column; text-align: center; gap: 40px; }
  .hero__sub { margin-left: auto; margin-right: auto; }
  .hero__actions { justify-content: center; }
  .hero__image { flex: none; max-width: 280px; margin: 0 auto; }

  /* Products mobile */
  .productos { padding: 72px 0; }
  .productos__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* Nosotros mobile */
  .nosotros { padding: 72px 0; }
  .nosotros__inner { flex-direction: column; text-align: center; }
  .nosotros__content .section-title { text-align: center; }
  .nosotros__image { flex: none; max-width: 280px; margin: 0 auto; }

  /* Servicios mobile */
  .servicios { padding: 72px 0; }
  .servicios__grid { grid-template-columns: 1fr; }

  /* Encuéntranos mobile */
  .encuentranos { padding: 72px 0; }

  /* Contacto mobile */
  .contacto { padding: 72px 0; }
  .contacto__inner { grid-template-columns: 1fr; gap: 40px; }

  /* Footer mobile */
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .productos__grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .producto-card__name { font-size: .9rem; padding: 12px; }
  .hero__title { font-size: 1.75rem; }
  .btn { padding: 12px 24px; font-size: .95rem; }
  .cobertura { padding: 32px 20px; }
  .cobertura__states { gap: 8px; }
  .cobertura__state { padding: 6px 16px; font-size: .85rem; }
  .servicio-card { padding: 24px; }
}
