/* ============================================================
   GALLETAS PITUCA — Responsive v2
   Breakpoints: 1100 / 860 / 680 / 400
============================================================ */

/* ---------- LAPTOP (<= 1100px) ---------- */
@media (max-width: 1100px) {
  :root {
    --container: 960px;
  }

  .grid-4,
  .grid-3,
  .grid-productos,
  .grid-super {
    grid-template-columns: repeat(2, 1fr);
  }

  .split,
  .split--historia {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .section {
    padding: 5.5rem 0;
  }

  .historia-photo {
    margin-right: 16px;
    margin-bottom: 16px;
  }
}

/* ---------- TABLET (<= 860px) ---------- */
@media (max-width: 860px) {
  :root {
    --sp-section: 5.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero {
    min-height: 520px;
    padding: 6rem 0;
  }

  .hero--home {
    min-height: 100dvh;
    padding: 9rem 0 7rem;
  }
}

/* ---------- MÓVIL (<= 680px) ---------- */
@media (max-width: 680px) {
  :root {
    --sp-section: 4.5rem;
    --header-h: 68px;
    --header-h-scrolled: 60px;
  }

  .container {
    padding: 0 20px;
  }

  /* Menú móvil */
  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    background: rgba(255, 251, 247, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232, 119, 34, 0.08);
    box-shadow: var(--sh-header);
    padding: 18px 22px 26px;
    transform: translateY(-110%);
    transition: transform 0.5s var(--ease-smooth);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .main-nav a {
    display: block;
    padding: 12px;
    font-size: 0.95rem;
    border-radius: var(--r-sm);
  }

  .main-nav a::after {
    display: none;
  }

  .main-nav a.active {
    background: rgba(232, 119, 34, 0.08);
  }

  /* Hero */
  .hero {
    min-height: 480px;
    padding: 5.5rem 0;
  }

  .hero--home {
    padding: 8rem 0 6rem;
  }

  .hero--home .hero-title {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
  }

  .hero-panel {
    padding: 36px 28px 44px;
  }

  .hero-scroll {
    bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    justify-content: center;
  }

  /* Grids a 1 columna */
  .grid-4,
  .grid-3,
  .grid-productos,
  .grid-super {
    grid-template-columns: 1fr;
  }

  /* Stats compactas (mantiene 3 columnas) */
  .stats {
    gap: 10px;
  }

  .stats article {
    padding: 14px 8px;
  }

  .stats strong {
    font-size: 1.35rem;
  }

  .stats span {
    font-size: 0.68rem;
  }

  /* Timeline: año arriba en chip */
  .timeline-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .timeline-year {
    justify-self: start;
    width: auto;
    padding: 8px 20px;
    font-size: 1.1rem;
    border-radius: var(--r-pill);
  }

  /* Foto historia con badge ajustado */
  .historia-photo {
    margin-right: 0;
    margin-bottom: 26px;
  }

  .photo-badge {
    right: 12px;
    bottom: 12px;
    padding: 14px 20px;
    animation: none;
  }

  .photo-badge strong {
    font-size: 1.6rem;
  }

  .photo-badge span {
    font-size: 0.72rem;
  }

  /* Nota disponibilidad */
  .note-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 26px 22px;
  }

  /* Supermercados */
  .super-logo {
    height: 140px;
  }

  /* Formulario */
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form-wrap {
    padding: 32px 24px;
  }

  /* CTA */
  .cta-card {
    padding: 42px 26px;
  }

  /* Quote box */
  .quote-box {
    padding: 18px 20px;
    font-size: 1rem;
  }

  .section-head {
    margin-bottom: 44px;
  }

  /* Footer 1 columna centrado */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 34px;
    text-align: center;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-logo-row {
    justify-content: center;
  }

  .footer-brand p {
    margin-left: auto;
    margin-right: auto;
  }

  .footer-col ul {
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }

  /* Chat flotante */
  .chat-float {
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
  }
}

/* ---------- MÓVIL PEQUEÑO (<= 400px) ---------- */
@media (max-width: 400px) {
  .brand-text strong {
    font-size: 0.9rem;
    letter-spacing: 0.06em;
  }

  .brand-logo {
    height: 40px;
  }

  .hero-panel {
    padding: 30px 20px 40px;
  }

  .stats {
    gap: 8px;
  }

  .cta-card {
    padding: 36px 20px;
  }

  .contact-form-wrap {
    padding: 28px 18px;
  }
}

/* ---------- SOLO HOVER REAL (evita hover pegajoso en táctil) ---------- */
@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-media img {
    transform: scale(1.1);
  }
}