/* Tipografía y variables */
:root {
  --wine-bg: #080204;
  --wine-bg-deep: #080204;
  --text: #f3eaea;
  --muted: #c9b7b7;
  --accent: #c23a3a;
  --accent-soft: #d86a6a;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #080204;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}
/* Header container más ancho para llevar elementos a los extremos */
.site-header .container {
  width: min(1400px, 98%);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  background: rgba(8, 2, 4, 0.35);
  border-bottom: none;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-logo {
  height: clamp(56px, 6vw, 104px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav a {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  text-decoration: none;
  margin-left: 22px;
  padding: 10px 12px;
  border-radius: 0;
  background: transparent;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: color 0.18s ease, text-shadow 0.18s ease, transform 0.18s ease;
}

.nav a:hover {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 188, 219, 0.35);
  transform: translateY(-1px);
}

/* Toggle menú (hamburguesa) */
.nav-toggle {
  display: none; /* visible solo en móviles */
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column; /* barras apiladas */
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 0;
  border-radius: 2px;
}

/* Menú móvil desplegable */
@media (max-width: 768px) {
  .header-content {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px; /* separación clara entre barras */
    padding: 6px;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    background: rgba(8, 2, 4, 0.92);
    backdrop-filter: blur(6px) saturate(140%);
    -webkit-backdrop-filter: blur(6px) saturate(140%);
    padding: 10px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    margin: 6px 0;
    padding: 12px 16px;
    font-size: 18px;
  }
}

/* Hero */
.hero {
  padding: 90px 0 40px;
  text-align: center;
}

.hero h1 {
  font-family: 'Gloria Hallelujah', 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.05;
  margin: 0 0 10px;
}

.hero p {
  color: var(--muted);
  margin: 0;
}

/* Parallax section */
.parallax-section {
  position: relative;
  min-height: 130vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* Offset de anclas para evitar solaparse con el header sticky */
#seleccion { scroll-margin-top: 110px; }

.parallax {
  position: relative;
  width: 100%;
  height: 85vh;
}

.parallax-layer {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}

.glow {
  width: 676px;
  height: 676px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(194, 58, 58, 0.22), rgba(194, 58, 58, 0) 60%);
  filter: blur(6px);
}

.shadow {
  width: 340px;
  height: 40px;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  transform: translate(-50%, 160px);
}

.bottle {
  display: grid;
  place-items: center;
}

.bottle-img {
  width: clamp(280px, 32vw, 420px);
  height: auto;
  mix-blend-mode: normal; /* usaremos PNG con transparencia real */
  filter: contrast(1.02) saturate(1.02) drop-shadow(0 16px 34px rgba(0,0,0,0.5));
  user-select: none;
  pointer-events: none;
}

.section-copy {
  text-align: center;
  margin-top: 40px;
}

.section-copy h2 {
  font-size: clamp(28px, 4.6vw, 40px);
  margin: 0 0 8px;
}

.section-copy p {
  color: var(--muted);
  font-size: clamp(16px, 2.4vw, 20px);
}

/* Grilla de selección */
/* Grilla de productos */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.product-card {
  position: relative;
  background: rgba(8, 2, 4, 0.45);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 20px;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* Borde irregular tipo doodle alrededor de cada tarjeta */
.product-card::before {
  content: none;
  display: none;
}

/* Variaciones sutiles para irregularidad entre tarjetas */
.collection-grid .product-card:nth-child(1)::before,
.collection-grid .product-card:nth-child(2)::before,
.collection-grid .product-card:nth-child(3)::before { transform: none; }

.product-card img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  mix-blend-mode: normal;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
  user-select: none;
  pointer-events: none;
}

.product-info h3 {
  margin: 12px 0 4px;
  font-size: clamp(20px, 2.5vw, 24px);
}
.product-info h3 a {
  color: inherit;
  text-decoration: none;
}
.product-info h3 a:hover {
  text-shadow: 0 0 6px rgba(255, 188, 219, 0.35);
}
.product-info .price {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  font-size: clamp(18px, 2.3vw, 22px);
}
.product-info p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .collection-grid { grid-template-columns: 1fr; }
}

/* Contacto */
.contact {
  padding: 80px 0;
  text-align: center;
}
.contact-intro {
  color: var(--muted);
  margin: 8px 0 24px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
  text-align: left;
}

.contact-card {
  background: rgba(8, 2, 4, 0.45);
  border-radius: 18px;
  border: none;
  padding: 20px;
}
.contact-card h3 {
  font-size: clamp(18px, 2.4vw, 22px);
  margin: 0 0 8px;
}
.contact-card p,
.contact-card address {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.contact-card a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
.contact-card a:hover {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 188, 219, 0.35);
}

.contact-source {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

#contacto { scroll-margin-top: 110px; }

@media (max-width: 980px) {
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact { padding: 60px 0; }
}

/* Destacados (Historia, Premios e Importancia) */
.highlights {
  padding: 80px 0;
}
.highlights h2 {
  text-align: center;
  margin: 0 0 18px;
}
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 12px;
}
.highlight-card {
  background: rgba(8, 2, 4, 0.45);
  border-radius: 18px;
  border: none;
  padding: 20px;
}
.highlight-card h3 {
  font-size: clamp(18px, 2.4vw, 22px);
  margin: 0 0 8px;
}
.highlight-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.highlight-thumb {
  width: 64px;
  height: auto;
  display: block;
  margin: 10px auto 0;
  opacity: 0.9;
}
.highlights-note {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .highlights-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .highlights-grid { grid-template-columns: 1fr; }
  .highlights { padding: 60px 0; }
}

/* Burbujas inferiores */
.bubbles-bottom {
  position: relative;
  height: 160px;
  overflow: hidden;
  background: transparent;
}
@media (max-width: 640px) {
  .bubbles-bottom { height: 140px; }
}

/* Footer */
.site-footer {
  margin-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(25, 5, 8, 0.4);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.footer-content a {
  color: var(--text);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  transition: color 0.18s ease, text-shadow 0.18s ease;
}
.footer-content a:hover {
  color: #ffffff;
  text-shadow: 0 0 6px rgba(255, 188, 219, 0.35);
}

@media (max-width: 640px) {
  .footer-content { flex-direction: column; gap: 8px; }
}

/* Página legal */
.legal {
  padding: 60px 0;
}
.legal h1 {
  font-size: clamp(28px, 4.6vw, 40px);
  margin: 0 0 18px;
  text-align: center;
}
.legal-card {
  background: rgba(8, 2, 4, 0.45);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: 24px;
}
.legal-card h2 {
  font-size: clamp(18px, 2.4vw, 22px);
  margin: 18px 0 8px;
}
.legal-card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.legal-card .legal-source {
  margin-top: 16px;
  font-size: 14px;
}

/* Burbujas de vino */
.bubbles { width: 100%; height: 100%; }
.bubble {
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 110, 160, 0.55), rgba(220, 80, 130, 0.28) 55%, rgba(220, 80, 130, 0) 100%);
  box-shadow: inset -2px -3px 8px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.25);
  opacity: 0.6;
  filter: blur(0.8px);
  will-change: transform, opacity, filter;
  animation: rise var(--dur, 14s) linear infinite, sway var(--swayDur, 5s) ease-in-out infinite;
}

@keyframes rise {
  0% { transform: translateY(160px) scale(0.92); opacity: 0; }
  10% { opacity: 0.6; }
  100% { transform: translateY(-110vh) scale(1.06); opacity: 0; }
}

@keyframes sway {
  0%, 100% { left: calc(var(--left, 50%) - 3px); }
  50% { left: calc(var(--left, 50%) + 3px); }
}

/* Explosión de burbuja al acercar el ratón */
.bubble.explode {
  animation: pop 0.45s ease-out forwards;
  filter: blur(1.6px);
}

@keyframes pop {
  0% { transform: scale(1); opacity: 0.8; }
  40% { transform: scale(1.35); opacity: 0.9; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Burbujas siguiendo el ratón */
.mouse-bubble {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(170, 40, 60, 0.65), rgba(120, 30, 50, 0.45) 60%, rgba(120, 30, 50, 0) 70%);
  box-shadow: 0 2px 10px rgba(120, 30, 50, 0.35);
  opacity: 0.85;
  animation-name: bubbleFloat;
  animation-duration: 1.2s;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.2));
}

@keyframes bubbleFloat {
  0% {
    transform: translateY(0) scale(0.9);
    opacity: 0.85;
  }
  100% {
    transform: translate(var(--driftX, 0px), -90px) scale(1.15);
    opacity: 0;
  }
}