/* =====================================================
   🖤  VILLA PARAÍSO — Carta de Lujo
   Negro + dorado + damasco + galería expandible
   ===================================================== */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold: #d4af37;
  --gold-light: #f4e5a1;
  --gold-dark: #a8841a;
  --black: #0a0a0a;
  --black-2: #1a1a1a;
  --charcoal: #232323;
  --cream: #faf6ec;
  --cream-2: #f2ecdc;
  --text: #2a2a2a;
  --text-light: #6b6b6b;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Poppins', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  color: var(--text);
  background: var(--black);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ============ FONDO DAMASCO ============ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-color: #0a0a0a;
  background-image:
    radial-gradient(circle at 50% 0%, rgba(212,175,55,0.12) 0%, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(212,175,55,0.08) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23d4af37' stroke-width='0.6' opacity='0.09'%3E%3Cpath d='M80 20 C60 40 60 60 80 80 C100 60 100 40 80 20 Z'/%3E%3Cpath d='M80 140 C60 120 60 100 80 80 C100 100 100 120 80 140 Z'/%3E%3Cpath d='M20 80 C40 60 60 60 80 80 C60 100 40 100 20 80 Z'/%3E%3Cpath d='M140 80 C120 60 100 60 80 80 C100 100 120 100 140 80 Z'/%3E%3Ccircle cx='80' cy='80' r='4'/%3E%3Ccircle cx='80' cy='80' r='10'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 160px 160px;
}

/* ============ ORNAMENTO SUPERIOR ============ */
.top-ornament {
  height: 6px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--gold-dark) 15%,
    var(--gold) 50%,
    var(--gold-dark) 85%,
    transparent 100%);
  box-shadow: 0 0 20px rgba(212,175,55,0.4);
}

/* ============ HERO ============ */
.hero {
  padding: 55px 20px 60px;
  text-align: center;
  position: relative;
}

.hero-content { position: relative; z-index: 1; }

.logo-wrapper {
  display: inline-block;
  position: relative;
  margin-bottom: 28px;
  animation: logoFade 1.2s ease;
}

.logo-wrapper::before {
  content: "";
  position: absolute;
  inset: -25px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.3) 0%, transparent 70%);
  z-index: -1;
  animation: glow 3s ease-in-out infinite alternate;
}

.logo {
  width: 135px;
  height: 135px;
  object-fit: contain;
  display: block;
  border-radius: 50%;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.7)) drop-shadow(0 0 20px rgba(212,175,55,0.35));
  transition: transform 0.4s ease;
}

.logo:hover { transform: scale(1.06) rotate(2deg); }

@keyframes logoFade {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes glow {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 320px;
  margin: 0 auto 20px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-icon {
  color: var(--gold);
  font-size: 1rem;
  text-shadow: 0 0 12px rgba(212,175,55,0.8);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 700;
  letter-spacing: 3px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 3px 12px rgba(212,175,55,0.35));
  line-height: 1.1;
}

.subtitle {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 4px;
  margin-top: 10px;
  opacity: 0.9;
}

.tagline {
  font-family: var(--font-body);
  color: #999;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 8px;
  font-size: 0.75rem;
}

.info-badges {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.info-badges span {
  background: rgba(212,175,55,0.08);
  backdrop-filter: blur(10px);
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 0.75rem;
  color: var(--gold-light);
  border: 1px solid rgba(212,175,55,0.3);
  letter-spacing: 1px;
}

/* ============ CATEGORÍAS ============ */
.categories {
  position: sticky;
  top: 0;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(15px);
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  z-index: 100;
  border-bottom: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.categories::-webkit-scrollbar { display: none; }

.category-btn {
  background: transparent;
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold-light);
  padding: 9px 18px;
  border-radius: 30px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.category-btn:hover {
  border-color: var(--gold);
  background: rgba(212,175,55,0.08);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color: var(--gold);
  color: var(--black);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(212,175,55,0.4);
}

/* ============ CONTENEDOR DEL MENÚ ============ */
.menu-container {
  background: var(--cream);
  margin: 30px 14px 40px;
  border-radius: 6px;
  padding: 40px 22px;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.4),
    0 0 0 5px rgba(10,10,10,0.9),
    0 0 0 6px var(--gold),
    0 25px 60px rgba(0,0,0,0.7);
  position: relative;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.menu-container::before,
.menu-container::after {
  content: "❦";
  position: absolute;
  color: var(--gold);
  font-size: 1.3rem;
  opacity: 0.7;
}
.menu-container::before { top: 12px; left: 16px; }
.menu-container::after { top: 12px; right: 16px; }

/* ============ SECCIONES ============ */
.category-section {
  margin-bottom: 50px;
  scroll-margin-top: 90px;
}

.category-section:last-child { margin-bottom: 10px; }

.category-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--black-2);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.category-title::after {
  content: "❧ ✦ ❧";
  display: block;
  text-align: center;
  color: var(--gold);
  font-size: 0.85rem;
  margin-top: 10px;
  letter-spacing: 8px;
  font-weight: normal;
}

.subcategory-title {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-dark);
  text-transform: uppercase;
  letter-spacing: 3px;
  text-align: center;
  margin: 28px 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.subcategory-title::before,
.subcategory-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ============ TARJETAS DE PLATOS ============ */
.items-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}

.menu-item {
  background: transparent;
  padding: 14px 4px;
  border-bottom: 1px dotted rgba(212,175,55,0.35);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: all 0.3s ease;
  animation: fadeIn 0.5s ease;
  position: relative;
}

.menu-item:last-child { border-bottom: none; }

.menu-item:hover {
  padding-left: 10px;
  border-bottom-color: var(--gold);
}

.menu-item::before {
  content: "◆";
  position: absolute;
  left: -14px;
  top: 18px;
  color: var(--gold);
  font-size: 0.6rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.menu-item:hover::before { opacity: 1; left: -6px; }

.item-info { flex: 1; }

.item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.item-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--black-2);
  letter-spacing: 0.3px;
  line-height: 1.3;
}

.item-price {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--gold-dark);
  font-size: 1.1rem;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.item-price::before {
  content: "—";
  margin-right: 8px;
  color: rgba(212,175,55,0.5);
  font-weight: normal;
}

.item-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.5;
  font-style: italic;
}

.badge {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  padding: 3px 11px;
  border-radius: 20px;
  background: rgba(212,175,55,0.12);
  color: var(--gold-dark);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 1px solid rgba(212,175,55,0.35);
}

.badge.premium {
  background: linear-gradient(135deg, var(--black-2), var(--black));
  color: var(--gold);
  border-color: var(--gold);
}

.badge.veg {
  background: rgba(46,125,50,0.1);
  color: #2e7d32;
  border-color: rgba(46,125,50,0.3);
}

/* ============ FOOTER ============ */
.footer {
  text-align: center;
  padding: 40px 20px 50px;
  color: #999;
  font-size: 0.9rem;
}

.footer-ornament {
  color: var(--gold);
  letter-spacing: 18px;
  font-size: 0.75rem;
  margin-bottom: 20px;
  opacity: 0.7;
}

.footer-message {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.footer-message strong {
  color: var(--gold);
  font-weight: 600;
}

.footer .small {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 8px;
  opacity: 0.6;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   📸 GALERÍA EXPANDIBLE — Foto + Variantes
   ===================================================== */

.subgroup-gallery {
  display: flex;
  align-items: stretch;
  gap: 18px;
  margin: 20px 0 10px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 200px;
}

/* ---- FOTO HERO ---- */
.gallery-photo {
  flex: 0 0 100%;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.35),
    0 12px 32px rgba(0,0,0,0.25);
  transition:
    flex-basis 0.7s cubic-bezier(0.65, 0, 0.35, 1),
    max-width 0.7s cubic-bezier(0.65, 0, 0.35, 1),
    border-radius 0.5s ease;
  background: #1a1a1a;
  aspect-ratio: 4 / 3;
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-photo:hover img {
  transform: scale(1.04);
}

.gallery-photo::after {
  content: "👆 Toca para ver las preparaciones";
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,10,10,0.75);
  color: var(--gold-light);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 1px;
  padding: 8px 16px;
  border-radius: 22px;
  border: 1px solid rgba(212,175,55,0.4);
  backdrop-filter: blur(8px);
  pointer-events: none;
  transition: opacity 0.3s ease;
  white-space: nowrap;
  z-index: 2;
}

.gallery-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
  pointer-events: none;
  opacity: 0.9;
  transition: opacity 0.4s ease;
}

/* ---- ESTADO EXPANDIDO ---- */
.subgroup-gallery.expanded .gallery-photo {
  flex: 0 0 45%;
  max-width: 45%;
}

.subgroup-gallery.expanded .gallery-photo::after {
  content: "✕ Toca para cerrar";
}

.subgroup-gallery.expanded .gallery-photo::before {
  opacity: 0.6;
}

/* ---- VARIANTES ---- */
.gallery-variants {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.subgroup-gallery.expanded .gallery-variants {
  opacity: 1;
}

.variant-card {
  background: #ffffff;
  border: 1px solid rgba(212,175,55,0.4);
  border-left: 3px solid var(--gold);
  border-radius: 10px;
  padding: 12px 14px;
  opacity: 0;
  transform: translateX(-40px);
  animation: slideInVariant 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.variant-card:hover {
  transform: translateX(0) scale(1.02);
  box-shadow: 0 6px 18px rgba(212,175,55,0.25);
}

.variant-card .variant-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.variant-card .variant-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--black-2);
  line-height: 1.25;
}

.variant-card .variant-price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--gold-dark);
  white-space: nowrap;
}

.variant-card .variant-desc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
  line-height: 1.4;
}

.variant-card:nth-child(1) { animation-delay: 0.05s; }
.variant-card:nth-child(2) { animation-delay: 0.15s; }
.variant-card:nth-child(3) { animation-delay: 0.25s; }
.variant-card:nth-child(4) { animation-delay: 0.35s; }
.variant-card:nth-child(5) { animation-delay: 0.45s; }
.variant-card:nth-child(6) { animation-delay: 0.55s; }
.variant-card:nth-child(7) { animation-delay: 0.65s; }
.variant-card:nth-child(8) { animation-delay: 0.75s; }

@keyframes slideInVariant {
  from { opacity: 0; transform: translateX(-60px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 600px) {
  .subgroup-gallery {
    flex-direction: column;
    min-height: auto;
  }

  .subgroup-gallery.expanded .gallery-photo {
    flex: 0 0 auto;
    max-width: 100%;
    aspect-ratio: 16 / 9;
  }

  .gallery-variants {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.6s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease;
  }

  .subgroup-gallery.expanded .gallery-variants {
    max-height: 1500px;
    opacity: 1;
  }

  .variant-card {
    transform: translateX(-30px);
  }
}

@media (max-width: 480px) {
  .logo { width: 110px; height: 110px; }
  .logo-wrapper::before { inset: -18px; }
  .hero { padding: 40px 18px 45px; }
  .menu-container { margin: 22px 10px 30px; padding: 30px 16px; }
  .category-title { font-size: 1.4rem; letter-spacing: 2px; }
  .item-name { font-size: 1.05rem; }
  .item-price { font-size: 1rem; }
  .item-desc { font-size: 0.92rem; }
  .menu-container::before, .menu-container::after { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-photo,
  .gallery-variants,
  .variant-card,
  .logo,
  .menu-item {
    transition: none !important;
    animation: none !important;
  }
}