/* El Rosal Bodega - Estilos personalizados */

/* Overlay sobre el banner: negro arriba → transparente en el centro */
.hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.15) 70%,
    transparent 100%
  );
}

/* Transición suave del panel lateral (desde la derecha) */
.sidebar-panel {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-panel.open {
  transform: translateX(0);
}

/* Backdrop del menú */
.sidebar-backdrop {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Icono hamburguesa minimalista */
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: rgba(255, 255, 255, 0.95);
  transition: all 0.3s ease;
}
.hamburger span + span {
  margin-top: 5px;
}
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Banner con texto en scroll (marquee) */
.scroll-banner-inner {
  animation: scroll-banner 30s linear infinite;
  width: max-content;
}
@keyframes scroll-banner {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Sección La Bodega: cita destacada */
.bodega-quote {
  letter-spacing: 0.02em;
}

/* Highlights: valor dorado con ligero brillo */
.highlight-value {
  color: #D4AF37;
  text-shadow: 0 0 40px rgba(212, 175, 55, 0.15);
}

/* Highlights: fondo sutil */
.highlights-bg {
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(212, 175, 55, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

/* Highlights: tarjetas con hover sutil */
.highlight-card {
  transition: background-color 0.25s ease, transform 0.25s ease;
}
@media (min-width: 640px) {
  .highlight-card:hover {
    background-color: rgba(255, 255, 255, 0.02);
  }
}

/* Highlights: sin animación, siempre visible */
.highlights-section {
  opacity: 1;
}

/* Banner Kosher: imagen de fondo full-width */
.kosher-banner-bg {
  background-image: url('../img/banner-kosher.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Parallax: la imagen queda fija al scroll (solo movimiento vertical) */
  background-attachment: fixed;
}
@media (max-width: 1023px) {
  .kosher-banner-bg {
    background-attachment: scroll;
  }
}

/* Banner Kosher: overlay oscuro para legibilidad */
.kosher-banner-overlay {
  background-color: rgba(0, 0, 0, 0.55);
}

/* Banner inferior: imagen full-width, poco alto, visible como bodega kosher */
.banner-abajo-bg {
  background-image: url('../img/banner-abajo.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}
@media (max-width: 1023px) {
  .banner-abajo-bg {
    background-attachment: scroll;
  }
}
.banner-abajo-overlay {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Banner Kosher: animación de entrada del contenido */
.kosher-banner-content {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
#bodega-kosher.is-visible .kosher-banner-content {
  opacity: 1;
  transform: translateY(0);
}

/* Ficha técnica producto: textura viñedos B/N y baja opacidad */
.product-sheet-texture {
  filter: grayscale(100%);
  opacity: 0.12;
}
@media (min-width: 1024px) {
  .product-sheet-texture {
    opacity: 0.1;
  }
}

/* Carrusel de vinos: contenedor y deslizamiento tipo tarjeta */
.wine-carousel-section {
  padding-bottom: 1rem;
}
.wine-carousel {
  overflow: hidden;
  padding: 0 3rem;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
.wine-carousel:active {
  cursor: grabbing;
}
.wine-carousel .wine-carousel-btn,
.wine-carousel .wine-dot {
  cursor: pointer;
}
@media (max-width: 640px) {
  .wine-carousel {
    padding: 0 2.5rem;
  }
}
.wine-carousel-track {
  will-change: transform;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.wine-carousel-track.is-dragging {
  transition: none;
}
.wine-card {
  scroll-snap-align: start;
}
/* Ocultar botón "anterior" en la primera tarjeta, "siguiente" en la última (opcional, vía JS) */
.wine-carousel-btn-prev[aria-hidden="true"],
.wine-carousel-btn-next[aria-hidden="true"] {
  opacity: 0.4;
  pointer-events: none;
}
.wine-dot.active {
  background-color: #C5A059;
  transform: scale(1.2);
}

/* Nuestros Vinos: botones de varietal — activo con color dorado */
.wine-tab {
  outline: none;
}
.wine-tab-active,
.wine-tab.wine-tab-active {
  border-color: #C5A059;
  background-color: rgba(197, 160, 89, 0.18);
  color: #92400e;
  font-weight: 600;
}
.wine-tab:focus-visible {
  outline: 2px solid #C5A059;
  outline-offset: 2px;
}

/* Nuestros Vinos: destacado de certificación (badge y línea en datos técnicos) */
.wine-certification-badge {
  color: #92400e;
  background-color: rgba(197, 160, 89, 0.15);
  border: 1px solid #C5A059;
}
.wine-tech-certification {
  font-weight: 500;
  color: #78350f;
}
.wine-tech-certification span {
  color: #92400e;
}

/* Nuestros Vinos: destacado para la frase principal de cada vino */
.wine-highlight-phrase {
  font-weight: 600;
  color: #92400e;
}

/* ========== ADAPTACIÓN MÓVIL (celulares) ========== */

/* Safe area para notches y barra de gestos (iPhone X+) */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
  }
}

/* Hero: mejor legibilidad y espaciado en pantallas pequeñas */
@media (max-width: 640px) {
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(0, 0, 0, 0.5) 35%,
      rgba(0, 0, 0, 0.2) 65%,
      transparent 100%
    );
  }
}

/* Botón hamburguesa: zona táctil más grande y alejado del notch */
@media (max-width: 768px) {
  .hamburger {
    min-width: 44px;
    min-height: 44px;
    top: max(1rem, env(safe-area-inset-top, 1rem));
    right: max(1rem, env(safe-area-inset-right, 1rem));
  }
}

/* Scroll banner: texto más pequeño en móvil para que no corte */
@media (max-width: 480px) {
  .scroll-banner-inner .font-serif {
    font-size: 0.95rem;
  }
  .scroll-banner-group span {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .scroll-banner-img {
    height: 1.5rem !important;
  }
}

/* Sección La Bodega: menos padding vertical en móvil */
@media (max-width: 768px) {
  section#la-bodega {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  section#la-bodega .max-w-6xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Banner Kosher: altura reducida en móvil */
@media (max-width: 640px) {
  .kosher-banner {
    min-height: 320px;
  }
  .kosher-banner-content h2 {
    font-size: 1.75rem;
    line-height: 1.25;
  }
}

/* Highlights: más compactos y legibles en móvil */
@media (max-width: 640px) {
  .highlights-section .max-w-6xl {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .highlight-value {
    font-size: 2rem !important;
  }
  .highlight-item:last-child .highlight-value {
    font-size: 1.35rem !important;
  }
}

/* Nuestros Vinos: layout apilado y touch-friendly en móvil */
@media (max-width: 1023px) {
  .nuestros-vinos-grid {
    min-height: auto;
    gap: 1.5rem;
  }
  .nuestros-vinos-section .nuestros-vinos-header h2 {
    font-size: 2rem;
  }
  .nuestros-vinos-section .max-w-7xl {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 2rem;
  }
}

/* Botones de varietal: área táctil mínima 44px y mejor wrap */
@media (max-width: 640px) {
  .wine-tab {
    min-height: 44px;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
  }
  .nuestros-vinos-grid .flex.flex-wrap.gap-3 {
    gap: 0.5rem;
  }
}

/* Imagen botella y detalles: orden y espaciado en móvil */
@media (max-width: 1023px) {
  .wine-bottle-wrap img {
    max-height: 220px;
  }
  .wine-detail-wrap h3 {
    font-size: 1.5rem;
  }
}

/* CTA y enlaces: altura mínima táctil 44px */
@media (max-width: 768px) {
  a[href="#nuestros-vinos"],
  a[href="#contacto"],
  .kosher-banner-cta,
  .sidebar-panel .nav-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  #distribuidores a {
    min-height: 44px;
    padding: 0.75rem 1.25rem;
  }
}

/* Panel lateral: ancho completo en móvil pequeño y safe area */
@media (max-width: 480px) {
  .sidebar-panel {
    max-width: 100vw;
    padding-right: env(safe-area-inset-right, 0);
  }
  .sidebar-panel .pt-20 {
    padding-top: max(4rem, calc(1rem + env(safe-area-inset-top, 0)));
  }
}

/* Banner inferior: altura reducida en móvil */
@media (max-width: 640px) {
  .banner-abajo {
    min-height: 160px;
  }
}

/* Contacto: espaciado y tipografía en móvil */
@media (max-width: 640px) {
  section#contacto {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }
  section#contacto .max-w-6xl {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  #contacto-title {
    font-size: 1.75rem;
  }
}

/* Evitar zoom en inputs (iOS) y mejorar scroll en body */
@media (max-width: 768px) {
  body {
    -webkit-overflow-scrolling: touch;
  }
}

/* Transición suave en detalles de vino para móvil */
@media (max-width: 1023px) {
  .wine-fade-out {
    opacity: 0.4;
  }
}

/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0));
  bottom: max(1rem, env(safe-area-inset-bottom, 0));
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.4);
  filter: brightness(1.02);
}
.whatsapp-float:active {
  transform: translateY(0);
}
.whatsapp-float:focus-visible {
  outline: 2px solid rgba(197, 160, 89, 0.9);
  outline-offset: 3px;
}
.whatsapp-float i {
  font-size: 28px;
  line-height: 1;
}

/* Selector de idioma (ES / EN / PT) */
.lang-btn.lang-btn-active {
  color: #c5a059;
  font-weight: 500;
}
.lang-btn:focus-visible {
  outline: 2px solid rgba(197, 160, 89, 0.85);
  outline-offset: 2px;
}