/* ── RESET & BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue-dark : #0d47a1;
  --blue      : #1565c0;
  --blue-pale : #e8f4fd;
  --white     : #ffffff;
  --gray-50   : #f5f5f5;
  --gray-200  : #e0e0e0;
  --gray-500  : #757575;
  --gray-800  : #212121;
  --font      : 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nav-h     : 60px;
  --radius    : 10px;
  --tr        : .28s ease;
  --shadow-card: 0 1px 6px rgba(0,0,0,.08);
}
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body { font-family: var(--font); color: var(--gray-800); background: var(--gray-50); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: var(--nav-h);
  background: var(--white); border-bottom: 1px solid var(--gray-200);
  transition: box-shadow var(--tr); gap: 12px;
}
.nav.scrolled { box-shadow: 0 2px 14px rgba(0,0,0,.1); }
.nav-logo-link { flex-shrink: 0; display: flex; align-items: center; }
.nav-logo-img { height: 36px; width: auto; object-fit: contain; }
#navMenu { display: none; }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-link { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--blue); position: relative; padding-bottom: 2px; transition: opacity var(--tr); }
.nav-link:hover { opacity: .7; }
.nav-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.nav-social { display: flex; align-items: center; gap: 10px; }
.nav-social-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; color: var(--blue); transition: opacity var(--tr); }
.nav-social-icon:hover { opacity: .65; }
.nav-social-icon svg { width: 18px; height: 18px; }
.nav-toggle { display: flex; flex-direction: column; justify-content: space-between; width: 26px; height: 18px; background: none; border: none; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 100%; height: 2px; background: var(--blue); border-radius: 2px; transition: all var(--tr); }
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── SUBMENU ── */
.nav-item--has-sub { position: relative; }
.nav-submenu { display: none; position: absolute; top: calc(100% + 4px); left: 0; background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.10); list-style: none; min-width: 200px; z-index: 400; overflow: hidden; }
.nav-item--has-sub:hover .nav-submenu { display: block; }
.nav-submenu a { display: block; padding: 10px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--blue); transition: background var(--tr); }
.nav-submenu a:hover { background: var(--blue-pale); }

/* ── HERO ── */
.cat-hero {
  position: relative; height: 420px;
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cat-hero--frutas {
  background-image: url('../../assets/images/productos/paletas/HIBISCUS-ICE-FRUIT-BAR.png');
  background-color: #1565c0;
}
.cat-hero--crema {
  background-image: url('../../assets/images/productos/paletas/EGGNOG-WITH-RAISINS.png');
  background-color: #1565c0;
}
.cat-hero--picositos {
  background-image: url('../../assets/images/productos/picositos/MANGONEADA.png');
  background-color: #1565c0;
}
.cat-hero--bigsticks {
  background-image: url('../../assets/images/productos/big-stick/SUPER-CHERRY-PIÑA.png');
  background-color: #1565c0;
}
.cat-hero--esquimales {
  background-image: url('../../assets/images/productos/eskimos/ESQUIMAL-DE-VANICHOCO.png');
  background-color: #1565c0;
}
.cat-hero--doubleking {
  background-image: url('../../assets/images/productos/double-king/DOUBLE-KING-VAINILLA.png');
  background-color: #1565c0;
}
.cat-hero__overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(13,71,161,.80) 0%, rgba(13,90,181,.50) 100%); }
.cat-hero__content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 0 24px; }
.cat-hero__eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; opacity: .85; margin-bottom: 12px; }
.cat-hero__title { font-size: clamp(42px, 9vw, 80px); font-weight: 900; text-transform: uppercase; letter-spacing: -1px; line-height: 1; text-shadow: 0 4px 24px rgba(0,0,0,.3); margin-bottom: 16px; }
.cat-hero__line { width: 56px; height: 3px; background: #fff; border-radius: 2px; margin: 0 auto 16px; opacity: .7; }
.cat-hero__sub { font-size: 15px; font-weight: 500; opacity: .9; letter-spacing: .3px; }
.cat-hero__wave { position: absolute; bottom: 0; left: 0; right: 0; height: 60px; z-index: 3; }

/* ── GRID ── */
.cat-grid-section { padding: 64px 0 80px; background: var(--gray-50); }
.cat-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin: 0 auto; }
.cat-card { flex: 0 0 calc(50% - 10px); background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 24px 16px 20px; display: flex; flex-direction: column; align-items: center; box-shadow: var(--shadow-card); transition: transform var(--tr), box-shadow var(--tr); }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.11); }
.cat-card__img-wrap { width: 100%; display: flex; align-items: center; justify-content: center; height: 180px; margin-bottom: 16px; }
.cat-card__img { max-height: 180px; max-width: 100%; object-fit: contain; }
.cat-card__name { font-size: 12px; font-weight: 800; color: var(--blue); text-transform: uppercase; letter-spacing: .5px; text-align: center; line-height: 1.3; }

/* ── FOOTER ── */
.footer { background: var(--blue); padding: 48px 0 0; color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; text-align: center; }
.footer-logo { height: 38px; width: auto; object-fit: contain; margin: 0 auto 12px; }
.footer-tagline { font-size: 12px; color: rgba(255,255,255,.7); line-height: 1.65; max-width: 240px; margin: 0 auto; }
.footer-col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--white); margin-bottom: 14px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 12px; color: rgba(255,255,255,.7); transition: color var(--tr); }
.footer-links a:hover { color: var(--white); }
.footer-contact { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-contact li { display: flex; align-items: flex-start; justify-content: center; gap: 7px; font-size: 12px; color: rgba(255,255,255,.7); line-height: 1.4; }
.footer-contact svg { flex-shrink: 0; margin-top: 1px; color: rgba(255,255,255,.7); }
.footer-contact a { color: rgba(255,255,255,.7); }
.footer-contact a:hover { color: var(--white); }
.footer-social { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.footer-social-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--blue); transition: opacity var(--tr); }
.footer-social-btn:hover { opacity: .8; }
.footer-bottom { margin-top: 36px; border-top: 1px solid rgba(255,255,255,.15); padding: 18px 20px; text-align: center; font-size: 11px; color: rgba(255,255,255,.55); }

/* ── RESPONSIVE ── */
@media (min-width: 600px) { .cat-card { flex: 0 0 calc(33.333% - 14px); } }
@media (min-width: 900px) {
  :root { --nav-h: 64px; }
  .nav { padding: 0 32px; }
  .nav-toggle { display: none; }
  #navMenu { display: block; }
  .cat-hero { height: 480px; }
  .cat-grid { gap: 24px; }
  .cat-card { flex: 0 0 260px; }
  .cat-card__img-wrap { height: 200px; }
  .cat-card__img { max-height: 200px; }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1.6fr 1fr; gap: 40px; text-align: left; }
  .footer-logo { margin: 0 0 12px; }
  .footer-tagline { margin: 0; }
  .footer-contact li { justify-content: flex-start; }
  .footer-social { justify-content: flex-start; }
}

/* ── LIGHTBOX ── */
.lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 24px;
}
.lb-overlay.open { display: flex; }
.lb-img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  cursor: default;
  animation: lbIn .2s ease;
}
@keyframes lbIn {
  from { opacity: 0; transform: scale(.93); }
  to   { opacity: 1; transform: scale(1); }
}
.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
  z-index: 10000;
}
.lb-close:hover { background: rgba(255,255,255,.3); }

/* ── LIGHTBOX PRODUCTOS ── */

.cat-card__img {
  cursor: zoom-in;
}

.lb-img {
  background: #ffffff;
  padding: 20px;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

/* Mejor experiencia en móvil */
@media (max-width: 600px) {
  .lb-overlay {
    padding: 16px;
    align-items: center;
  }

  .lb-img {
    width: auto;
    max-width: 100%;
    max-height: 80vh;
    padding: 15px;
    border-radius: 6px;
  }

  .lb-close {
    top: 12px;
    right: 12px;
    width: 42px;
    height: 42px;
    font-size: 22px;
  }
}