/* ============================================
   69 Gauchos — Menú elegante, mobile-first
   ============================================ */

:root {
  --bg: #0c0b09;
  --bg-card: #161412;
  --bg-card-hover: #1e1c18;
  --text: #f8f6f1;
  --text-muted: #9c968c;
  --accent: #c4a35a;
  --accent-soft: rgba(196, 163, 90, 0.12);
  --border: rgba(248, 246, 241, 0.06);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 10px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --header-h: 56px;
  --nav-h: 50px;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

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

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  min-height: 100dvh;
  padding-top: var(--header-h);
  padding-bottom: var(--safe-bottom);
}

body.nav-overlay-open {
  overflow: hidden;
  padding-top: var(--header-h);
}

.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ----- Header ----- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(12, 11, 9, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
  transition: box-shadow 0.25s ease;
}

.header-inner {
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--text);
}

/* Hamburger: visible solo en móvil */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
}
.nav-toggle:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Nav categorías: en móvil oculto (se usa overlay) */
.nav-categories {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.nav-categories.is-visible {
  height: var(--nav-h);
  opacity: 1;
  overflow: visible;
}

.nav-scroll {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 14px;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-link {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus-visible {
  color: var(--text);
  background: var(--accent-soft);
}
.nav-link.active {
  color: var(--bg);
  background: var(--accent);
}

/* ----- Overlay móvil ----- */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(12, 11, 9, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + var(--safe-top) + 24px) 24px 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.nav-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 320px;
}

.nav-overlay-link {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  text-align: center;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease, color 0.2s ease;
  letter-spacing: 0.02em;
}
.nav-overlay-link:hover,
.nav-overlay-link:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

/* ----- Main: padding según si hay barra de nav visible ----- */
.main {
  flex: 1;
}

/* Hero */
.hero {
  position: relative;
  height: 38vh;
  min-height: 200px;
  max-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 28px 20px;
  margin-bottom: 4px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-img);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, transparent 45%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(12,11,9,0.5) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  margin: 0 0 6px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.1rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* Secciones */
.section {
  padding: 28px 20px 36px;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.section-title {
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-title-sub {
  margin-top: 32px;
  margin-bottom: 22px;
}

.section-title-text {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: cardIn 0.5s ease backwards;
}
.card:hover,
.card:focus-within {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--accent-soft);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:nth-child(1) { animation-delay: 0.03s; }
.card:nth-child(2) { animation-delay: 0.06s; }
.card:nth-child(3) { animation-delay: 0.09s; }
.card:nth-child(4) { animation-delay: 0.12s; }
.card:nth-child(5) { animation-delay: 0.15s; }

.card-image-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-image {
  transform: scale(1.04);
}

.card-price {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--bg);
  background: var(--accent);
  box-shadow: 0 2px 14px rgba(196, 163, 90, 0.35);
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.card-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.card-wide .card-image-wrap {
  aspect-ratio: 16 / 9;
}

/* Bebidas compactas */
.cards-compact {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card-compact .card-image-wrap {
  aspect-ratio: 1;
}
.card-compact .card-body {
  padding: 14px;
}
.card-compact .card-title {
  font-size: 1rem;
}
.card-compact .card-desc {
  font-size: 0.8rem;
}

/* ----- Footer ----- */
.footer {
  padding: 28px 20px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}
.footer p {
  margin: 0 0 6px;
}
.footer-legal {
  font-size: 0.75rem;
  opacity: 0.85;
}

/* ========== Responsive: tablet — nav bar visible ========== */
@media (min-width: 640px) {
  :root {
    --header-h: 62px;
    --nav-h: 52px;
  }

  body {
    padding-top: calc(var(--header-h) + var(--nav-h));
  }

  .nav-toggle {
    display: none;
  }

  .nav-categories {
    height: var(--nav-h);
    opacity: 1;
    overflow: visible;
  }

  .nav-overlay {
    display: none;
  }

  .nav-scroll {
    justify-content: center;
    flex-wrap: nowrap;
    padding: 0 20px 14px;
    overflow-x: auto;
  }

  .section {
    padding: 32px 28px 44px;
    max-width: 920px;
    margin: 0 auto;
    scroll-margin-top: calc(var(--header-h) + var(--nav-h) + 12px);
  }

  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
  }

  .card-wide {
    grid-column: 1 / -1;
  }

  .cards-compact {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ========== Desktop ========== */
@media (min-width: 960px) {
  :root {
    --header-h: 68px;
    --nav-h: 54px;
  }

  .section {
    max-width: 1120px;
    padding: 40px 32px 52px;
  }

  .section-title-text {
    font-size: 1.55rem;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

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

  .hero {
    max-height: 320px;
    min-height: 260px;
  }
}

/* ----- Botones flotantes WhatsApp y Rappi (solo iconos) ----- */
.float-actions {
  position: fixed;
  bottom: calc(1.5rem + var(--safe-bottom));
  right: 1.5rem;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.float-actions > * {
  pointer-events: auto;
}

/* WhatsApp flotante */
.wa-float {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  animation: waFloatBounce 2.5s ease-in-out infinite;
}

.wa-float:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
  animation: none;
}

.wa-float-icon {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
}

.wa-float-icon svg {
  width: 100%;
  height: 100%;
}

.wa-float-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.4;
  animation: waPulse 2s ease-out infinite;
}

@keyframes waPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes waFloatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Rappi flotante */
.rappi-float {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5722, #e64a19);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 87, 34, 0.4);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  animation: rappiFloatBounce 2.5s ease-in-out infinite 0.3s;
}

.rappi-float:hover {
  transform: scale(1.15);
  box-shadow: 0 8px 32px rgba(255, 87, 34, 0.6);
  animation: none;
}

.rappi-float-icon {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
}

.rappi-float-icon svg,
.rappi-float-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.rappi-float-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: #ff5722;
  opacity: 0.4;
  animation: rappiPulse 2s ease-out infinite 0.3s;
}

@keyframes rappiPulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

@keyframes rappiFloatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (max-width: 480px) {
  .float-actions {
    bottom: calc(1rem + var(--safe-bottom));
    right: 1rem;
    gap: 10px;
  }
  .wa-float,
  .rappi-float {
    width: 52px;
    height: 52px;
  }
  .wa-float-icon,
  .rappi-float-icon {
    width: 26px;
    height: 26px;
  }
}

/* Reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card,
  .card-image,
  .nav-link,
  .nav-overlay,
  .nav-overlay-link {
    transition: none;
  }
  .card {
    animation: none;
  }
  .wa-float,
  .rappi-float {
    transition: none;
    animation: none;
  }
  .wa-float-pulse,
  .rappi-float-pulse {
    animation: none;
  }
}
