/* ═══════════════════════════════════════════════════════════
   Mariscos El Bombón — main.css
   Bitnik Media 2024
═══════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --coral:    #E85D26;
  --navy:     #1B3A6B;
  --sky-bg:   #F0F6FA;
  --white:    #FFFFFF;
  --dark:     #1A1A1A;
  --mid:      #555555;
  --light:    #D6E4EF;

  --font-display: 'Lobster', cursive;
  --font-head:    'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;

  --radius:   12px;
  --radius-lg:20px;
  --shadow:   0 4px 24px rgba(27,58,107,.10);
  --shadow-md:0 8px 32px rgba(27,58,107,.15);

  --nav-h:    72px;
  --transition: .3s cubic-bezier(.4,0,.2,1);
}

/* ── Reset / Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

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

img { display: block; max-width: 100%; object-fit: cover; }

a { text-decoration: none; color: inherit; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Títulos de sección ─────────────────────────────────── */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5.5vw, 4rem);
  text-align: center;
  margin-bottom: 40px;
  font-weight: 400;
}
.section-title--coral { color: var(--coral); }
.section-title--navy  { color: var(--navy); }

/* ── Botones ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: opacity var(--transition);
  border: none;
}
.btn--coral {
  background: var(--coral);
  color: var(--white);
}
.btn--coral:hover { opacity: .88; }


/* ══════════════════════════════════════════════════════════
   NAVBAR
══════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(27,58,107,.08);
}

/* Compensar admin bar de WordPress cuando el usuario está logueado */
body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}

.navbar {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.navbar__links {
  list-style: none;
  display: flex;
  gap: 36px;
}
.navbar__links--left  { justify-content: flex-end; }
.navbar__links--right { justify-content: flex-start; }

.navbar__links a {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--navy);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--transition);
  white-space: nowrap;
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--coral);
  transition: width var(--transition);
}
.navbar__links a:hover { color: var(--coral); }
.navbar__links a:hover::after { width: 100%; }

.navbar__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.navbar__logo-img {
  height: 52px;
  width: auto;
  display: block;
}

/* Hamburger */
.navbar__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.navbar__hamburger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.navbar__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__hamburger.open span:nth-child(2) { opacity: 0; }
.navbar__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Drawer móvil */
.navbar__drawer {
  display: none;
  position: absolute;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--light);
  box-shadow: 0 8px 24px rgba(27,58,107,.12);
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition);
}
.navbar__drawer.open {
  max-height: 300px;
}
.navbar__drawer-links {
  list-style: none;
  padding: 16px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.navbar__drawer-links a {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid var(--light);
}
.navbar__drawer-links li:last-child a { border-bottom: none; }


/* ══════════════════════════════════════════════════════════
   HERO — CAROUSEL
══════════════════════════════════════════════════════════ */
.hero {
  margin-top: var(--nav-h);
  background: var(--sky-bg);
  padding: 64px 24px 80px;
  overflow: hidden;
}

.carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.carousel__track {
  display: flex;
  align-items: center;
  gap: 24px;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
  /* El posicionamiento real lo maneja JS */
}

/* Cada ítem del carousel */
.carousel__item {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform .5s cubic-bezier(.4,0,.2,1), opacity .5s ease;
}

/* Estado base (lateral) */
.carousel__item {
  opacity: .45;
  transform: scale(.78);
}

/* Estado activo (centro) */
.carousel__item.is-active {
  opacity: 1;
  transform: scale(1);
}

.carousel__circle {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--white);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.carousel__item.is-active .carousel__circle {
  width: 280px;
  height: 280px;
  border-color: var(--coral);
}

.carousel__circle img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}
.carousel__item:hover .carousel__circle img { transform: scale(1.05); }

.carousel__label {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--navy);
  margin-top: 16px;
  text-align: center;
  opacity: 0;
  transition: opacity .4s ease;
}
.carousel__item.is-active .carousel__label {
  font-size: 2.1rem;
  color: var(--coral);
  opacity: 1;
}

/* Botones prev/next */
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-60%);
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.6rem;
  color: var(--navy);
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
  z-index: 10;
}
.carousel__btn:hover { background: var(--coral); color: var(--white); }
.carousel__btn--prev { left: -22px; }
.carousel__btn--next { right: -22px; }


/* ══════════════════════════════════════════════════════════
   NOSOTROS
══════════════════════════════════════════════════════════ */
.nosotros {
  padding: 80px 24px;
  background: var(--white);
}

.nosotros__inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 64px;
  align-items: center;
}

.nosotros__img-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 3/4;
}
.nosotros__img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.nosotros__content .section-title {
  text-align: left;
  margin-bottom: 20px;
}
.nosotros__content p {
  color: var(--mid);
  margin-bottom: 14px;
  font-size: .97rem;
}
.nosotros__tagline {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--navy) !important;
  font-size: 1.05rem !important;
  margin-top: 8px;
  border-left: 3px solid var(--coral);
  padding-left: 14px;
}


/* ══════════════════════════════════════════════════════════
   MENÚ
══════════════════════════════════════════════════════════ */
.menu-section {
  padding: 80px 0;
  background: var(--sky-bg);
}

/* Tabs de filtro — desktop */
.menu-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}
.menu-filter__btn {
  padding: 8px 20px;
  border-radius: 999px;
  border: 2px solid var(--light);
  background: var(--white);
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: all var(--transition);
}
.menu-filter__btn:hover,
.menu-filter__btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}
.menu-filter__btn.active {
  background: var(--coral);
  border-color: var(--coral);
}

/* Dropdown — solo móvil */
.menu-dropdown-wrap { display: none; margin-bottom: 32px; }
.menu-dropdown {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 2px solid var(--light);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--navy);
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231B3A6B' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}

/* Grid */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

/* Tarjeta de platillo */
.menu-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  outline: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.menu-card:hover,
.menu-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.menu-card__img-wrap {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
}
.menu-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.menu-card:hover .menu-card__img { transform: scale(1.06); }

.menu-card__body {
  background: var(--navy);
  color: var(--white);
  padding: 10px 14px 12px;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
.menu-card__name {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.menu-card__precios {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  justify-content: center;
}
.card__precio-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.card__precio-label {
  font-size: .72rem;
  opacity: .75;
}
.card__precio-val {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
}

/* Animación de filtro */
.menu-card.hidden {
  display: none;
}
.menu-card.limit-hidden {
  display: none;
}
.menu-card.fade-in {
  animation: fadeIn .35s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Botón "Mostrar todo" */
.menu-show-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}


/* ══════════════════════════════════════════════════════════
   UBICACIÓN + CONTACTO
══════════════════════════════════════════════════════════ */
.ubi-contacto {
  padding: 80px 24px;
  background: var(--white);
}
.ubi-contacto__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.ubicacion__media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: -16px;
}
.ubicacion__foto {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
}
.ubicacion__foto img { width: 100%; height: 100%; }

.ubicacion__mapa iframe {
  border-radius: var(--radius);
  display: block;
}
.ubicacion__dir {
  font-size: .85rem;
  color: var(--mid);
  margin: 10px 0 12px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

/* Contacto */
.contacto .section-title { text-align: left; }
.contacto > p {
  color: var(--mid);
  font-size: .95rem;
  margin-bottom: 28px;
}
.contacto__items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.contacto__tel,
.contacto__red {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--navy);
  transition: color var(--transition);
}
.contacto__tel:hover { color: var(--coral); }
.contacto__red {
  font-size: 1rem;
  font-weight: 500;
  color: var(--mid);
}
.contacto__red:hover { color: var(--navy); }


/* ══════════════════════════════════════════════════════════
   FOOTER
══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.6);
  text-align: center;
  padding: 24px;
  font-size: .82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.site-footer a { color: var(--coral); }
.site-footer a:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}
.modal.open {
  pointer-events: all;
  opacity: 1;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10,20,40,.65);
  backdrop-filter: blur(4px);
}
.modal__box {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 700px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
  transform: scale(.92) translateY(20px);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.modal.open .modal__box { transform: scale(1) translateY(0); }

.modal__img-wrap {
  aspect-ratio: 1;
  overflow: hidden;
}
.modal__img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.modal__body {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.modal__close {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--white);
  border: none;
  border-radius: 50%;
  width: 34px; height: 34px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  line-height: 1;
}
.modal__title {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--navy);
}
.modal__desc {
  font-size: .9rem;
  color: var(--mid);
  line-height: 1.7;
}
.modal__precios {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.modal__precio-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--sky-bg);
  border-radius: 8px;
}
.modal__precio-label {
  font-size: .85rem;
  color: var(--mid);
  font-weight: 500;
}
.modal__precio-val {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--coral);
}


/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤900px)
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nosotros__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .nosotros__img-wrap {
    max-width: 360px;
    margin: 0 auto;
    aspect-ratio: 4/3;
  }
  .nosotros__content .section-title { text-align: center; }
  .nosotros__tagline { margin: 0; }

  .ubi-contacto__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .ubicacion__media {
    grid-template-columns: 1fr;
  }

  .modal__box {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  .modal__img-wrap { aspect-ratio: 16/9; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — Móvil (≤640px)
══════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  :root { --nav-h: 60px; }

  /* Nav hamburguesa */
  .navbar {
    grid-template-columns: auto 1fr auto;
  }
  .navbar__links { display: none; }
  .navbar__hamburger { display: flex; }
  .navbar__drawer { display: block; }

  .navbar__logo-img { height: 38px; }

  /* Hero carousel móvil: solo se ve el central */
  .hero { padding: 40px 0 56px; }

  .carousel {
    overflow: hidden;
  }
  .carousel__track {
    /* En móvil el JS controla la posición; los laterales quedan fuera del viewport */
  }

  .carousel__circle {
    width: 240px;
    height: 240px;
  }
  .carousel__item.is-active .carousel__circle {
    width: 260px;
    height: 260px;
  }

  /* Ocultar laterales en móvil — el JS agrega clase; el CSS los hace invisibles */
  .carousel__item.is-side {
    visibility: hidden;
    pointer-events: none;
  }

  .carousel__btn { display: none; }

  /* Menú dropdown en móvil */
  .menu-filter { display: none; }
  .menu-dropdown-wrap { display: block; }

  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    padding: 0 16px;
  }

  .section-title { font-size: 1.8rem; }

  .contacto__tel { font-size: 1.15rem; }

  .modal__box {
    grid-template-columns: 1fr;
    margin: 0;
  }
  .modal__img-wrap { aspect-ratio: 16/9; }
  .modal__body { padding: 20px; }
}

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