/* =========================================================
   Cattleya — Componentes compartidos (header, footer, cards…)
   ========================================================= */

/* --- Header / Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(254, 249, 230, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand__icon {
  width: 34px;
  height: 34px;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-wine);
  letter-spacing: 0.02em;
}

/* Logo real (ícono + "Cattleya" en un solo PNG con transparencia).
   Dos versiones: color (fondos claros, ej. el header) y blanca (fondos
   oscuros, ej. el footer) — ver assets/logo/. */
.brand-logo {
  display: block;
  height: 40px;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-text);
  padding: 0.4rem 0.1rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: var(--color-magenta-dark);
  border-color: var(--color-magenta);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--color-wine);
  min-width: 44px;
  min-height: 44px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-cream);
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-sm);
    gap: var(--space-xs);
  }
  .main-nav a {
    display: inline-block;
    padding: 0.7rem 0.1rem;
  }
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: var(--space-lg) 0;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-lg);
  align-items: center;
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 640px) {
  .hero { padding: var(--space-lg) 0; }
}

.hero__eyebrow {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--color-magenta);
  display: block;
  margin-bottom: -0.75rem;
}

.hero__title {
  font-size: var(--fs-hero);
  line-height: 1.05;
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .hero__actions { justify-content: center; }
}

.hero__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card-hover);
}
.hero__image img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 10%;
}

/* --- Filtros de categoría --- */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.category-chip {
  min-height: 44px;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  border: 1.5px solid var(--color-border);
  background: var(--color-white);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all 0.15s ease;
}

.category-chip:hover {
  border-color: var(--color-magenta);
  color: var(--color-magenta-dark);
}

.category-chip.is-active {
  background: var(--color-magenta);
  border-color: var(--color-magenta);
  color: var(--color-white);
}

/* --- Grid de productos --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-md);
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-cream-soft);
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card__badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.product-card__body {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.product-card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-wine);
  margin: 0;
}

.product-card__desc {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin: 0;
  flex: 1;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
}

.product-card__price {
  font-weight: 700;
  color: var(--color-magenta-dark);
  font-size: var(--fs-price);
}

.product-card__price--old {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

/* Grilla compacta para subgrupos de bebidas (Café, Sodas): 2 tarjetas por
   fila en mobile/tablet; en desktop se expande como el grid normal. */
.product-grid--compact {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}
@media (min-width: 700px) {
  .product-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }
}

/* --- Sección de menú tipo "carta" (brunch) --- */
.menu-list {
  display: grid;
  gap: 0;
}

.menu-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  border-bottom: 1px dashed var(--color-border);
}

.menu-item__thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.menu-item__thumb img {
  width: 100%; height: 100%; object-fit: cover;
}

.menu-item__name {
  font-family: var(--font-display);
  color: var(--color-wine);
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
  max-width: 15ch;
}

.menu-item__desc {
  font-size: var(--fs-small);
  color: var(--color-text-muted);
  margin: 0;
}

.menu-item__price {
  font-weight: 700;
  color: var(--color-magenta-dark);
  white-space: nowrap;
  text-align: right;
}

@media (max-width: 560px) {
  .menu-item { grid-template-columns: 48px 1fr auto; gap: var(--space-xs); }
  .menu-item__thumb { width: 48px; height: 48px; }
  .menu-item__name { font-size: 0.95rem; }
}

.menu-section + .menu-section {
  margin-top: var(--space-xl);
}

.menu-subgroup-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-magenta-dark);
  margin: var(--space-md) 0 var(--space-xs);
}

.menu-subgroup-title:first-child {
  margin-top: 0;
}

/* --- Footer --- */
.site-footer {
  background: var(--color-wine);
  color: var(--color-cream);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: 0;
}

.site-footer a {
  color: var(--color-cream);
  display: inline-block;
  padding: 0.35rem 0;
}
.site-footer a:hover { text-decoration: underline; }
.site-footer :focus-visible { outline-color: var(--color-cream); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: var(--space-lg);
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

.footer-grid h4 {
  color: var(--color-cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
}

.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(254,249,230,0.15);
  font-size: var(--fs-small);
  opacity: 0.7;
}

/* --- Botón flotante de WhatsApp --- */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  z-index: 200;
  color: var(--color-white);
  font-size: 1.6rem;
}
.whatsapp-float:hover { transform: scale(1.06); }


/* --- Reservas (brunch) --- */
.reservation-form {
  max-width: 680px;
  margin: 0 auto;
  background: var(--color-cream-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.reservation-form__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  text-align: left;
}

@media (max-width: 560px) {
  .reservation-form { padding: var(--space-md) var(--space-sm); }
  .reservation-form__grid { grid-template-columns: 1fr; }
  .reservation-form__submit { max-width: none; }
}

.reservation-form .form-field label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-wine);
  margin-bottom: 0.35rem;
}

.reservation-form .form-field input {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-wine-soft);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--color-text);
}

.reservation-form .form-field input:focus {
  border-color: var(--color-magenta-dark);
}

.reservation-form__submit {
  width: 100%;
  max-width: 320px;
  min-height: 48px;
  font-size: 1rem;
}

.reservation-form__status {
  margin: var(--space-sm) 0 0;
  font-size: var(--fs-small);
  color: var(--color-danger);
}

/* --- Navegación de secciones de la carta (brunch) --- */
.menu-jump {
  position: sticky;
  top: 66px;
  z-index: 50;
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  padding: 0.6rem 0;
  margin-bottom: var(--space-md);
  background: rgba(254, 249, 230, 0.92);
  backdrop-filter: blur(6px);
}
.menu-jump .category-chip { display: inline-flex; align-items: center; white-space: nowrap; }
.menu-section { scroll-margin-top: 130px; }
#reservar { scroll-margin-top: 70px; }

/* Móvil: chips en una sola fila con scroll horizontal (en vez de apilarse
   desparejos) y botón flotante de WhatsApp más discreto. */
@media (max-width: 560px) {
  .menu-jump,
  .category-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-right: var(--space-sm);
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent);
    mask-image: linear-gradient(to right, #000 88%, transparent);
  }
  .menu-jump .category-chip,
  .category-filters .category-chip { flex: 0 0 auto; scroll-snap-align: start; }
  .whatsapp-float { width: 52px; height: 52px; right: 1rem; bottom: 1rem; }
  main { padding-bottom: 4rem; }
}

/* Móvil: acciones del hero apiladas con el mismo ancho, y aire al final del
   footer para que el botón flotante de WhatsApp no tape el texto. */
@media (max-width: 560px) {
  .hero__actions { flex-direction: column; align-items: stretch; max-width: 320px; margin-left: auto; margin-right: auto; }
  .hero__actions .btn { width: 100%; }
  .footer-bottom { padding-bottom: 4.5rem; }
}
