/* ═══════════════════════════════════════════════
   VARIABLES Y RESET
═══════════════════════════════════════════════ */
:root {
  --color-primary:    #e85d04;   /* naranja cálido */
  --color-primary-dark: #c44d02;
  --color-secondary:  #ffba08;   /* amarillo mostaza */
  --color-dark:       #1a1a2e;
  --color-text:       #333333;
  --color-text-light: #666666;
  --color-bg:         #fffaf5;   /* crema muy suave */
  --color-bg-alt:     #fff3e0;
  --color-white:      #ffffff;
  --color-whatsapp:   #25d366;
  --color-whatsapp-dark: #1da851;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:  12px;
  --radius-lg: 24px;
  --shadow:  0 4px 24px rgba(0,0,0,.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.15);

  --transition: 0.3s ease;
  --max-width: 1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ═══════════════════════════════════════════════
   UTILIDADES
═══════════════════════════════════════════════ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section__tag {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: #ffe8d6;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 12px;
}

.section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--color-dark);
  line-height: 1.25;
  margin-bottom: 16px;
}

.section__subtitle {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════
   BOTONES
═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn:hover  { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }

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

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,.6);
}
.btn--outline:hover {
  background: rgba(255,255,255,.15);
  border-color: var(--color-white);
}

.btn--small {
  padding: 8px 18px;
  font-size: .9rem;
}

.btn--whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
  font-size: 1.1rem;
  padding: 18px 36px;
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 24px rgba(37,211,102,.35);
}
.btn--whatsapp:hover {
  background: var(--color-whatsapp-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(37,211,102,.45);
}

/* ═══════════════════════════════════════════════
   ANIMACIÓN FADE-IN (activada por JS)
═══════════════════════════════════════════════ */
.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

/* Estado scrolled — añadido por JS */
.header.scrolled {
  background: var(--color-white);
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
  padding: 10px 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-white);
  transition: color var(--transition);
  white-space: nowrap;
}
.header.scrolled .logo { color: var(--color-dark); }
.logo--light { color: var(--color-white) !important; }

/* Nav desktop */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__link {
  font-weight: 500;
  font-size: .95rem;
  color: rgba(255,255,255,.9);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color var(--transition), background var(--transition);
}
.nav__link:hover { background: rgba(255,255,255,.15); color: var(--color-white); }
.header.scrolled .nav__link { color: var(--color-text); }
.header.scrolled .nav__link:hover { background: var(--color-bg-alt); }

.nav__cta { margin-left: 8px; }
.header.scrolled .nav__cta {
  background: var(--color-primary);
  color: var(--color-white) !important;
}

/* Hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.header.scrolled .hamburger span { background: var(--color-dark); }

/* Hamburguesa → X */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════
   HERO
═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26,26,46,.82) 0%,
    rgba(232,93,4,.55) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 120px 20px 80px;
  max-width: 700px;
}

.hero__badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--color-secondary);
  margin-bottom: 20px;
}

.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.85);
  max-width: 520px;
  margin-bottom: 36px;
}

/* Precio destacado en el hero */
.hero__price {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 12px 20px;
  margin-bottom: 28px;
  backdrop-filter: blur(6px);
  flex-wrap: wrap;
}
.hero__price-label {
  color: rgba(255,255,255,.75);
  font-size: .9rem;
}
.hero__price-amount {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1;
}
.hero__price-note {
  color: rgba(255,255,255,.6);
  font-size: .8rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ═══════════════════════════════════════════════
   MENÚ / CARDS
═══════════════════════════════════════════════ */
.menu { background: var(--color-bg); }

.menu__category {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-bg-alt);
}

.menu + .menu__category,
.cards + .menu__category { margin-top: 48px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid transparent;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-top-color: var(--color-primary);
}

.card__icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.card__title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.card__text {
  color: var(--color-text-light);
  font-size: .95rem;
  line-height: 1.65;
}

.card__price {
  display: inline-block;
  margin-top: 14px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Cards del menú que abren WhatsApp al hacer click */
.card--pedido {
  cursor: pointer;
}
.card__cta {
  display: block;
  margin-top: 16px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-whatsapp);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
}
.card--pedido:hover .card__cta {
  opacity: 1;
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════
   GALERÍA
═══════════════════════════════════════════════ */
.galeria { background: var(--color-bg-alt); }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 260px 260px;
  gap: 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Galería de solo 2 imágenes */
.gallery--two {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 400px;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.gallery__item--wide {
  grid-column: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  /* Fallback: fondo degradado si la imagen no existe */
  background: linear-gradient(135deg, #e85d04 0%, #ffba08 100%);
  min-height: 100%;
}

.gallery__item:hover img { transform: scale(1.06); }

.gallery__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,.75) 0%, transparent 60%);
  display: flex;
  align-items: flex-end;
  padding: 20px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery__item:hover .gallery__overlay { opacity: 1; }

.gallery__overlay span {
  color: var(--color-white);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .04em;
}

/* ═══════════════════════════════════════════════
   CTA SECTION
═══════════════════════════════════════════════ */
.cta-section {
  background: linear-gradient(135deg, var(--color-dark) 0%, #2d1b69 100%);
  color: var(--color-white);
}

.cta-section__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.cta-section__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.cta-section__subtitle {
  color: rgba(255,255,255,.75);
  font-size: 1.05rem;
  margin-bottom: 24px;
  max-width: 480px;
}

.cta-section__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cta-section__list li {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
}

.cta-section__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cta-section__note {
  font-size: .82rem;
  color: rgba(255,255,255,.55);
}

/* ═══════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════ */
.footer {
  background: #111122;
  color: rgba(255,255,255,.7);
  padding-top: 64px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer__brand p {
  margin-top: 12px;
  font-size: .9rem;
  max-width: 280px;
  line-height: 1.7;
}

.footer__links,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__links h4,
.footer__contact h4 {
  color: var(--color-white);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.footer__links a {
  font-size: .9rem;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--color-secondary); }

.footer__contact p { font-size: .9rem; }

.footer__social {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.7);
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.social-icon:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-3px);
}

/* ═══════════════════════════════════════════════
   BOTÓN FLOTANTE WHATSAPP
═══════════════════════════════════════════════ */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 10px;
}

/* Burbuja de texto */
.wa-float__bubble {
  background: var(--color-white);
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  max-width: 220px;
  font-size: .85rem;
  line-height: 1.45;
  color: var(--color-text);
  opacity: 0;
  transform: translateY(8px) scale(.95);
  transform-origin: bottom right;
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}
.wa-float__bubble strong { color: var(--color-primary); }
.wa-float__name {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--color-dark);
}
.wa-float__msg { margin: 0; }

/* Mostrar burbuja al hover del conjunto */
.wa-float:hover .wa-float__bubble {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Botón circular verde */
.wa-float__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: var(--color-white);
  box-shadow: 0 6px 24px rgba(37,211,102,.45);
  transition: transform .3s ease, box-shadow .3s ease;
  animation: wa-pulse 2.5s infinite;
}
.wa-float__btn:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 32px rgba(37,211,102,.6);
  animation: none;
}

/* Pulso de atención */
@keyframes wa-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,.55); }
  60%  { box-shadow: 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 20px 0;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.35);
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — TABLET (≤ 900px)
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .cta-section__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .cta-section__subtitle { max-width: 100%; }
  .cta-section__action { align-items: center; }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer__brand { grid-column: span 2; }

  .gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery__item--wide { grid-column: span 2; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 640px)
═══════════════════════════════════════════════ */
@media (max-width: 640px) {
  .section { padding: 56px 0; }

  /* Header mobile */
  .hamburger { display: flex; }

  .nav {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--color-dark);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    z-index: 999;
  }
  .nav.open { display: flex; }

  .nav__link {
    font-size: 1.3rem;
    color: var(--color-white) !important;
  }
  .nav__cta {
    font-size: 1.1rem !important;
    padding: 12px 28px !important;
  }

  /* Hero */
  .hero__content { padding: 100px 20px 60px; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  /* Cards */
  .cards { grid-template-columns: 1fr; }

  /* Gallery */
  .gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .gallery__item--wide { grid-column: span 1; }
  .gallery__item { height: 220px; }

  /* CTA */
  .btn--whatsapp { width: 100%; justify-content: center; }

  /* Footer */
  .footer__inner {
    grid-template-columns: 1fr;
  }
  .footer__brand { grid-column: span 1; }
}
