/* ===== TOP BAR ===== */

.top-bar {
  background: var(--negro);
  color: var(--text-body);
  padding: 0.5rem 5%;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  width: 100%;
}

/* ===== HEADER / NAV ===== */

header {
  background: var(--bg-nav);
}

header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 5%;
  width: 100%;
}

.logo {
  position: relative;
  height: 45px;
  flex-shrink: 0;
}

/* Logo en rojo: versión propia logo-rojo.png (funciona también abriendo el HTML en local) */
.logo img {
  height: 100%;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-primary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rojo);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: not-allowed;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 101;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--accent-nav-active);
  transition: all 0.3s ease;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(10px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-10px);
}

/* ===== HERO ===== */

.hero {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 5%;
  background: linear-gradient(var(--overlay-hero), var(--overlay-hero)), url('../img/web_images/patron_jamon.jpg') center / cover no-repeat, var(--bg-sheen);
  color: var(--text-primary);
  position: relative;
  overflow: hidden;
  width: 100%;
  margin-top: -60px;
  padding-top: calc(5rem + 60px);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(0, 0, 0, 0.2) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  animation: fadeInUp 1s ease forwards;
}

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

.hero-logo {
  max-width: 430px;
  width: 90%;
  height: auto;
  margin: 0 auto 1.5rem;
  animation: fadeInUp 1s ease 0.4s both;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease 0.6s both;
}

.hero-location {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-shadow: 0 0 10px rgba(255, 200, 60, 0.6), 0 0 22px rgba(255, 200, 60, 0.35);
  animation: fadeInUp 1s ease 0.8s both;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  animation: bounce 2s ease-in-out infinite 2s;
}

.hero-scroll span {
  font-family: var(--font-ui);
  font-size: 0.6rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.hero-scroll-line {
  width: 1px;
  height: 30px;
  background: var(--border-light);
}

@keyframes bounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

/* ===== TRUST BAR (ubicación · teléfono · frase) ===== */

.trust-bar {
  background: var(--vino-texto);
  color: var(--salvia-cta);
  padding: 1.25rem 5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  width: 100%;
}

.trust-bar-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 2rem;
}

.trust-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--salvia-cta);
}

.trust-bar-item svg {
  flex-shrink: 0;
}

.trust-bar-item:hover {
  color: var(--salvia-cta);
  text-decoration: underline;
}

/* ===== EXPERIENCIA SECTION ===== */

.experiencia {
  padding: var(--space-5) 5% 5rem;
  background: var(--vino-texto);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  width: 100%;
}

/* Degradado morado sobre la parte superior de Experiencia: el morado de Tienda se extiende encima */
.experiencia::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: clamp(90px, 14vw, 170px);
  /* Mismo color que se ve en Tienda: plum + capa --bg-section (negro al 40%) */
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg-primary) 60%, var(--color-black)), transparent);
  pointer-events: none;
  z-index: 1;
}

/* Degradado de vino a morado hacia FAQs: la sección se funde con la siguiente */
.experiencia::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: clamp(90px, 14vw, 170px);
  /* Paradas intermedias para que la transición sea más suave que una lineal directa */
  background: linear-gradient(
    to bottom,
    transparent 0%,
    color-mix(in srgb, var(--bg-primary) 25%, var(--vino-texto)) 35%,
    color-mix(in srgb, var(--bg-primary) 65%, var(--vino-texto)) 70%,
    var(--bg-primary) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Escritorio: degradado más bajo para no tapar el párrafo de Experiencia (móvil sin cambios) */
@media (min-width: 769px) {
  .experiencia::after {
    height: clamp(60px, 7vw, 100px);
  }
}

.experiencia-text {
  position: relative;
  z-index: 1;
}

.experiencia-text p {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.experiencia-text > p:first-of-type::first-letter {
  font-family: var(--font-accent);
  font-size: 3rem;
  float: left;
  line-height: 1;
  margin-right: 0.5rem;
  color: var(--accent-drop-cap);
}

.feature {
  padding: 1.5rem;
  border: 1px solid var(--oliva);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.feature:hover {
  border-color: var(--oliva-oscuro);
  background: var(--oliva-oscuro);
  box-shadow: var(--shadow-sm);
}

.feature:hover h4 {
  color: var(--text-body);
}

.feature h4 {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-body);
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.feature p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.experiencia-image {
  position: relative;
  z-index: 1;
  display: none;
}

.experiencia-image-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: none;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.2);
}

.experiencia-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: none;
}

.experiencia-image-frame:hover img {
  transform: scale(1.05);
}

.experiencia-label {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--accent-primary);
  color: var(--text-primary);
  padding: 0.75rem 1.5rem;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== CARTA SECTION ===== */

/* Subsection styles */
/* Al plegar, el scroll llega al inicio de la sección sin quedar tapado por la cabecera fija */

/* Carta y bodega: parte visible + botón para desplegar el resto */

/* Flecha: debajo del botón cuando la sección está cerrada, encima cuando está abierta */

/* Flotación suave: sube y baja unos pocos píxeles */
@keyframes section-toggle-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.subsection {
  margin-bottom: 3rem;
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.5rem;
  padding-bottom: 0.75rem;
}

/* Grid base styles for horizontal scrolling panels */

/* ===== TIENDA SECTION ===== */

.tienda {
  padding: 5rem 5%;
  background: var(--bg-primary);
  color: var(--text-primary);
  position: relative;
  width: 100%;
}

/* ===== TIENDA: COLECCIONES (2 recuadros con foto) ===== */
.pro-g {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  max-width: 1100px;
  margin: 0 auto;
  scroll-margin-top: 100px;
}

.pro-g[hidden] {
  display: none;
}

.pc {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--negro);
  color: var(--text-primary);
}

.pc:hover {
  color: var(--text-primary);
}

.pc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.pc:hover img,
.pc:focus-visible img {
  transform: scale(1.04);
}

/* Degradado oscuro abajo para que el texto se lea siempre sobre la foto */
.pc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 5, 18, 0.92) 0%, rgba(16, 5, 18, 0.35) 45%, transparent 75%);
  pointer-events: none;
}

.pc:focus-visible {
  outline: 3px solid var(--papel-oscuro);
  outline-offset: 3px;
}

/* Texto SIEMPRE visible (no depende del hover: en móvil no existe) */
.pi {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 2rem;
}

.pn {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: var(--text-primary);
}

.pt {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-body);
}

.pc-cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 0.75rem;
  padding: 0 1.5rem;
  background: var(--salvia-cta);
  color: var(--vino-texto);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

.pc:hover .pc-cta {
  background: var(--salvia-cta-hover);
}

/* Colección abierta: barra con "Volver" + título */
.tienda .subsection {
  position: relative;
  scroll-margin-top: 100px;
}

.subsection[hidden] {
  display: none;
}

.collection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.collection-back {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 1px solid rgba(237, 230, 216, 0.5);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.collection-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--papel-oscuro);
}

.collection-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--text-primary);
}

/* Botón "Volver" repetido al final de la colección */
.collection-bottom {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
  .tienda .subsection:not([hidden]),
  .pro-g:not([hidden]) {
    animation: fadeIn 0.35s ease;
  }
}

/* Móvil: recuadros uno debajo de otro, botones a todo el ancho */
@media (max-width: 768px) {
  .pro-g {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pc {
    aspect-ratio: 4 / 3;
  }

  .pi {
    padding: 1.5rem;
  }

  .pc-cta {
    align-self: stretch;
    justify-content: center;
  }

  .collection-bar {
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
  }

  .collection-back {
    justify-content: center;
  }

  .collection-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  .collection-bottom .collection-back {
    width: 100%;
    justify-content: center;
  }
}

.tienda::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-section);
  pointer-events: none;
  z-index: 0;
}

/* Degradado de la barra de confianza (vino) a morado en la parte superior de Tienda */
.tienda::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  /* Se solapa 1px con la barra de confianza para no dejar la línea de unión */
  top: -1px;
  height: calc(clamp(90px, 14vw, 170px) + 1px);
  background: linear-gradient(
    to bottom,
    var(--vino-texto) 0%,
    color-mix(in srgb, var(--vino-texto) 45%, var(--bg-primary)) 45%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
}

.tienda > * {
  position: relative;
  z-index: 1;
}

.tienda .section-header {
  margin-bottom: 4rem;
}

.tienda .section-header h2 {
  color: var(--text-primary);
}

.tienda .section-header em {
  color: var(--accent-primary);
}

/* ===== TIENDA: GRID + TARJETAS ===== */

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 260px));
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem 0;
}

.tienda .subsection-title {
  display: none;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.5rem;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(26, 22, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

/* Flotan: suben y bajan despacio y su sombra cambia con la altura, como si se separaran de la página */
.product-card {
  animation: product-float 7s ease-in-out infinite;
}

.product-card:nth-child(2n) {
  animation-delay: -3.5s; /* cada una a su ritmo, no todas a la vez */
}

@keyframes product-float {
  0%, 100% {
    transform: translateY(0);
    box-shadow: 0 14px 24px -10px rgba(0, 0, 0, 0.55), 0 3px 6px rgba(0, 0, 0, 0.25);
  }
  50% {
    transform: translateY(-7px);
    box-shadow: 0 26px 36px -14px rgba(0, 0, 0, 0.45), 0 6px 12px rgba(0, 0, 0, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card {
    animation: none;
  }
}

/* Texto de ayuda al final de cada card: gris, no blanco */
.product-cta {
  margin-top: auto;
  padding-top: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  color: var(--text-body);
}

/* Línea de ayuda bajo el título de la tienda */
.tienda-hint {
  margin: 0.75rem 0 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--text-body);
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.25));
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.5rem;
  min-height: 5.5rem;
  padding: 1.25rem 1.5rem;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.3;
  color: var(--text-primary);
}

/* Botón que cubre la card entera y abre el modal de producto */

.product-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.product-open:focus-visible {
  outline: 2px solid var(--papel-oscuro);
  outline-offset: 2px;
}

.btn-add-cart {
  flex: 0 0 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  background: transparent;
  border: 1px solid rgba(237, 230, 216, 0.4);
  border-radius: var(--radius);
}

.btn-add-cart:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--text-body);
}

.btn-buy-now {
  flex: 1;
  min-height: 44px;
  background: var(--salvia-cta);
  color: var(--vino-texto);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.btn-buy-now:hover {
  background: var(--salvia-cta-hover);
  color: var(--vino-texto);
}

.btn-buy-now:active {
  background: var(--accent-drop-cap);
  color: var(--text-body);
}

/* ===== BODEGA SECTION ===== */

/* ===== MAP SECTION ===== */

.map-section {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.map-section iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(0.7) contrast(1.1) brightness(0.8);
  transition: filter 0.5s ease;
}

.map-section:hover iframe {
  filter: grayscale(0.3) contrast(1.05) brightness(1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  /* Menú móvil: ocupa todo el ancho justo bajo la cabecera (header es fixed, así que
     top:100% = borde inferior de la cabecera; el logo nunca queda tapado).
     Se despliega de arriba hacia abajo con clip-path, sin desplazamiento lateral. */
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 50vh;
    padding: 0 5%;
    gap: 1.75rem;
    background: var(--bg-nav);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.5s ease, visibility 0s linear 0.5s;
    z-index: 99;
  }

  .nav-links a {
    color: var(--text-primary);
  }

  .nav-links[aria-hidden="false"] {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path 0.5s ease, visibility 0s;
  }

  
.hamburger {
    display: flex;
  }

  
.nav-buttons {
    display: none;
  }

  
.experiencia {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  

  
.map-section {
    height: 300px;
  }
}

/* ===== BOTTOM NAVIGATION ===== */

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-nav);
  padding: 0.5rem 0;
  z-index: 99;
  gap: 0;
  justify-content: space-around;
  align-items: stretch;
}

@media (max-width: 768px) {
  
.bottom-nav {
    display: flex;
  }

  
footer {
    padding-bottom: calc(80px + 1.5rem + env(safe-area-inset-bottom));
  }
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  color: var(--text-body);
  font-size: 0.7rem;
  font-family: var(--font-ui);
  font-weight: 500;
  text-align: center;
  position: relative;
  transition: color 0.3s ease, background 0.3s ease;
}

.bottom-nav-item:hover {
  color: var(--accent-nav-active);
}

.bottom-nav-item svg {
  width: 24px;
  height: 24px;
  stroke-width: 1.5;
}

.bottom-nav-item.active {
  color: var(--accent-nav-active);
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--rojo);
  color: var(--text-body);
  font-size: 0.6rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* ===== FOOTER ===== */

footer {
  position: relative;
  isolation: isolate;
  background: var(--negro) url('../img/web_images/interior.JPG') center / cover no-repeat;
  color: var(--text-body);
  padding: 3rem 5%;
}

footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--overlay-footer);
  pointer-events: none;
  z-index: 0;
}

footer .footer-content,
footer .footer-bottom {
  position: relative;
  z-index: 1;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.footer-section h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-primary);
  text-shadow: var(--shadow-footer-title);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-body);
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text-body);
  text-decoration: underline;
}

.footer-logo {
  height: 40px;
  object-fit: contain;
  filter: brightness(1);
}

.footer-schedule {
  font-size: 0.85rem;
  width: 100%;
}

.footer-schedule td {
  padding: 0.35rem 0;
}

.footer-schedule td:first-child {
  padding-right: 1rem;
  color: var(--gris-claro);
}

.footer-section p {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.footer-section a {
  color: var(--text-body);
}

.footer-section a:hover {
  color: var(--text-body);
  text-decoration: underline;
}

.footer-directions {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.85rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gris-claro);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  border-color: var(--papel-oscuro);
  color: var(--text-body);
  text-decoration: none;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gris-claro);
}

/* ===== FAQs ===== */

.faqs {
  padding: 5rem 5%;
  width: 100%;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.faqs-container {
  max-width: 800px;
  margin: 0 auto;
  /* TODO: Estructura de FAQs */
}

/* ===== ANIMACIÓN DE APARICIÓN (la usan la cesta y la pasarela) ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 480px) {
  
nav {
    padding: 0.75rem 5%;
  }

  
.logo {
    height: 35px;
  }


.hero {
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
    padding: 3rem 5%;
  }

  
.hero-logo {
    max-width: 290px;
  }

  

  
.experiencia {
    padding: 2.5rem 5% 3rem;
  }

  
.tienda,
.faqs {
    padding: 3rem 5%;
  }

  
.tienda .section-header,
.faqs .section-header {
    margin-bottom: 2rem;
  }

  
.footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  
.map-section {
    height: 250px;
  }
}

/* ===== TIENDA: MÓVIL (rejilla de 2 en 2) ===== */
@media (max-width: 768px) {
  /* Sin subtítulos de subsección en móvil */
  
.tienda .subsection-title {
    display: none;
  }

  /* Misma separación entre filas que entre subsecciones (antes 3rem + padding) */
  
.tienda .subsection {
    margin-bottom: 1rem;
  }

  
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    gap: 1rem;
    max-width: none;
    margin-inline: 0;
    padding: 0;
  }

  
.product-card {
    min-width: 0;
  }

  /* Imagen completa: se muestra entera (contain) sobre fondo neutro, en vez de recortarla */

.product-image {
    aspect-ratio: 3 / 4;
    /* Color de fondo medido en cada foto (inline en el HTML): la foto se funde con el marco */
    background: var(--img-bg, var(--papel-oscuro));
  }

  .product-image img {
    object-fit: contain;
    padding: 0.5rem;
  }


.product-info {
    min-height: 4.5rem;
    padding: 0.875rem 1rem;
  }

}

/* ===== CARTA + BODEGA: cards rojo apagado (estilo tienda) ===== */

/* --- Base común --- */

/* ===== CARTA ===== */

/* Sin foto: rombo de la marca en la zona de imagen */

/* Cards sin foto: se deshace el row y se ordena nombre, desc y precio */

/* ===== BODEGA: botella estrecha a la izquierda, texto a la derecha ===== */

/* ===== CESTA: BADGE + MODAL (estilo tienda) ===== */

/* --- Botón Carrito de la cabecera (escritorio) --- */

.nav-btn[data-cart-toggle] {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  color: var(--text-body);
  transition: color 0.3s ease;
}

.nav-btn[data-cart-toggle]:hover {
  color: #fff;
}

.nav-btn .cart-badge {
  position: static;
  margin-left: 0.5rem;
  background: var(--papel-oscuro);
  color: var(--rojo);
}

/* Sin productos, el badge no se ve */

.cart-badge.is-empty {
  display: none !important;
}

.cart-badge.bump {
  animation: cart-bump 0.4s ease;
}

@keyframes cart-bump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* [DESACTIVADO: CESTA: OVERLAY + PANEL + CABECERA — sin backend todavía]
/ * --- Overlay + panel --- * /

.cm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 10, 10, 0.72);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.35s ease;
  transition: opacity 0.2s ease;
}

.cm-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.cm-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 2rem);
  box-sizing: border-box;
  padding: 1.75rem 1.5rem 1.5rem;
  color: var(--text-primary);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  / * Sube desde la parte baja de la pantalla (mismo tamaño y posición final) * /
  animation: cm-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cm-rise {
  from {
    opacity: 0;
    transform: translateY(100vh);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cm-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-body);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.cm-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/ * --- Cabecera --- * /

.cm-head {
  padding-bottom: 1.25rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

   [FIN DESACTIVADO: CESTA: OVERLAY + PANEL + CABECERA] */
.cm-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-body);
}
/* [DESACTIVADO: CESTA (resto) + PASARELA DE PAGO — sin backend todavía]

.cm-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--text-primary);
}

.cm-sub {
  margin: 0.25rem 0 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-body);
}

/ * --- Lista de productos --- * /

.cm-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  min-height: 0;
}

.cm-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.cm-item.is-new {
  animation: cm-flash 1.2s ease;
}

.cm-item.is-removing {
  opacity: 0;
  transform: translateX(12px);
}

@keyframes cm-flash {
  0%   { background: rgba(237, 230, 216, 0.14); }
  100% { background: transparent; }
}

.cm-thumb {
  position: relative;
  width: 64px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.25));
}

.cm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/ * Sin foto: icono de imagen, igual que las cards de la tienda * /

.cm-thumb:empty::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 24 24' fill='none' stroke='%23EDE6D8' stroke-width='1' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") center / 28px no-repeat;
}

.cm-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.cm-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text-primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.cm-price {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-body);
}

/ * --- Cantidad --- * /

.cm-qty {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  margin-top: 0.25rem;
  border: 1px solid rgba(237, 230, 216, 0.4);
  border-radius: var(--radius);
}

.cm-qty button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}

.cm-qty button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.cm-qty span {
  min-width: 28px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-primary);
}

/ * --- Eliminar --- * /

.cm-remove {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(237, 230, 216, 0.4);
  border-radius: var(--radius);
  color: var(--text-body);
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.cm-remove:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--text-body);
}

/ * --- Total --- * /

.cm-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.25rem 0 1rem;
}

.cm-total span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-body);
}

.cm-total strong {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-body);
}

/ * --- Vacío --- * /

.cm-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 2.5rem 0 2rem;
  color: var(--text-body);
}

.cm-empty p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-body);
}

/ * --- Botones --- * /

.cm-actions {
  display: flex;
  gap: 0.75rem;
}

.cm-btn {
  flex: 1;
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.cm-btn--primary {
  background: var(--papel-oscuro);
  color: var(--negro);
  border: none;
}

.cm-btn--primary:hover {
  background: var(--papel);
  color: var(--rojo);
}

/ * Botones de acción en verde: Finalizar compra, Entrar, Crear cuenta * /
.cm-btn.cm-btn--cta,
.cm-btn.cm-btn--cta:hover {
  background: var(--salvia-cta);
  color: var(--vino-texto);
}

.cm-btn.cm-btn--cta:hover {
  background: var(--salvia-cta-hover);
}

.cm-btn--ghost {
  background: transparent;
  color: var(--text-body);
  border: 1px solid rgba(237, 230, 216, 0.4);
}

.cm-btn--ghost:hover {
  border-color: var(--papel-oscuro);
  color: #fff;
}

/ * --- Móvil: sale desde abajo como una hoja --- * /
@media (max-width: 480px) {
  
.cm-overlay {
    padding: 0;
    align-items: flex-end;
  }

  
.cm-panel {
    max-width: none;
    max-height: 88dvh;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-bottom: none;
  }

  
.cm-btn {
    padding: 0 0.5rem;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
  }
}

/ * ===== PASARELA DE PAGO (estilo tienda) ===== * /

.pp-overlay {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
  background: rgba(20, 10, 10, 0.78);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
  transition: opacity 0.2s ease;
}

.pp-overlay.is-closing {
  opacity: 0;
  pointer-events: none;
}

.pp-panel {
  position: relative;
  width: 100%;
  max-width: 920px;
  box-sizing: border-box;
  margin: auto;
  padding: 2rem;
  color: var(--text-primary);
  background: var(--bg-panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/ * --- Cabecera --- * /

.pp-head {
  padding-bottom: 1.25rem;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pp-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-primary);
}

.pp-back {
  margin: 0 0 1rem;
  padding: 0;
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-body);
  cursor: pointer;
  transition: color 0.3s ease;
}

.pp-back:hover {
  color: #fff;
}

/ * --- Layout: formulario + resumen --- * /

.pp-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

.pp-summary {
  position: sticky;
  top: 1rem;
  padding: 1.25rem;
  background: rgba(26, 22, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.pp-summary h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-primary);
}

.pp-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pp-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pp-thumb {
  width: 48px;
}

.pp-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.pp-item .cm-name {
  font-size: 0.85rem;
}

.pp-qty {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-body);
}

.pp-item-price {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
}

.pp-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 1rem;
}

.pp-total span {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-body);
}

.pp-total strong {
  font-family: var(--font-body);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-body);
}

/ * --- Formulario --- * /

.pp-fieldset {
  margin: 0 0 1.75rem;
  padding: 0;
  border: none;
  min-width: 0;
}

.pp-fieldset legend {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-primary);
}

.pp-fieldset legend span {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(237, 230, 216, 0.5);
  border-radius: 50%;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-body);
}

.pp-field {
  margin-bottom: 1rem;
  min-width: 0;
}

.pp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pp-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-body);
}

.pp-field input {
  width: 100%;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 0.9rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-primary);
  background: rgba(26, 22, 20, 0.45);
  border: 1px solid rgba(237, 230, 216, 0.25);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.pp-field input::placeholder {
  color: var(--text-body);
}

.pp-field input:hover {
  border-color: rgba(237, 230, 216, 0.45);
}

.pp-field input:focus {
  outline: none;
  background: rgba(26, 22, 20, 0.65);
  border-color: var(--papel-oscuro);
  box-shadow: 0 0 0 3px rgba(237, 230, 216, 0.12);
}

.pp-field input:user-invalid {
  border-color: #E8736C;
}

.pp-pay {
  width: 100%;
  flex: none;
  margin-top: 0.5rem;
}

/ * --- Pedido confirmado --- * /

.pp-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 360px;
  margin: 0 auto;
  padding: 2rem 0 1rem;
  text-align: center;
  color: var(--text-body);
}

.pp-done h2 {
  margin: 0.5rem 0 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
}

.pp-done p {
  margin: 0 0 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-body);
}

.pp-done .cm-btn {
  width: 100%;
  flex: none;
}

/ * --- Tablet / móvil --- * /
@media (max-width: 800px) {
  
.pp-grid {
    grid-template-columns: 1fr;
  }

  / * El resumen va arriba y deja de ser sticky * /
  
.pp-summary {
    order: -1;
    position: static;
  }
}

@media (max-width: 480px) {
  
.pp-overlay {
    padding: 0;
  }

  
.pp-panel {
    min-height: 100dvh;
    padding: 1.5rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
    border: none;
    border-radius: 0;
  }

  
.pp-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  / * Caducidad y CVV sí caben juntos * /
  
.pp-fieldset:last-of-type .pp-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

   [FIN DESACTIVADO: CESTA (resto) + PASARELA DE PAGO] */
/* ===== CARTA + BODEGA: carrusel a sangre en móvil (como la tienda) ===== */

/* [DESACTIVADO: CUENTA: INICIO DE SESIÓN / REGISTRO — sin backend todavía]
/ * ===== CUENTA: INICIO DE SESIÓN / REGISTRO (estilo cesta) ===== * /

/ * Botón de la cabecera (escritorio): igual que el de Carrito * /

.nav-btn[data-account-toggle] {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  color: var(--text-body);
  transition: color 0.3s ease;
}

.nav-btn[data-account-toggle]:hover {
  color: #fff;
}

.au-body {
  min-height: 0;
  overflow-y: auto;
}

/ * --- Pestañas Iniciar sesión / Crear cuenta --- * /

.au-tabs {
  display: flex;
  margin: 1.25rem 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.au-tab {
  flex: 1;
  margin-bottom: -1px;
  padding: 0.75rem 0.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-body);
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.au-tab:hover {
  color: #fff;
}

.au-tab.is-active {
  color: var(--text-body);
  border-bottom-color: var(--papel-oscuro);
}

/ * --- Formulario --- * /

.au-form {
  display: flex;
  flex-direction: column;
}

.au-form .cm-btn {
  flex: none;
  width: 100%;
  margin-top: 0.5rem;
}

.au-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.au-error {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  color: #F3B5B0;
  background: rgba(232, 115, 108, 0.12);
  border: 1px solid rgba(232, 115, 108, 0.4);
  border-radius: var(--radius);
}

.au-error[hidden] {
  display: none;
}

.au-link {
  align-self: center;
  margin-top: 1rem;
  padding: 0.25rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-body);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.au-link:hover {
  color: #fff;
}

.au-note {
  margin: 1.25rem 0 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-body);
}

.au-note strong {
  color: var(--text-primary);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.au-actions {
  margin-top: 1.5rem;
}

/ * --- Sesión iniciada --- * /

.au-details {
  margin: 1.25rem 0 0;
  padding: 0.75rem 1.1rem;
  background: rgba(26, 22, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
}

.au-details > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}

.au-details > div + div {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.au-details dt {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-body);
}

.au-details dd {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-align: right;
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/ * Aviso cuando se pide iniciar sesión para continuar (p. ej. finalizar compra) * /

.au-flow {
  margin: 1.25rem 0 0;
  padding: 0.7rem 0.9rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-body);
  background: rgba(237, 230, 216, 0.08);
  border: 1px solid rgba(237, 230, 216, 0.2);
  border-radius: var(--radius);
}

.au-flow + .au-tabs {
  margin-top: 1rem;
}
   [FIN DESACTIVADO: CUENTA: INICIO DE SESIÓN / REGISTRO] */
/* ===== EXPERIENCIA: cabecera con silueta detrás del título ===== */
.experiencia-cover {
  grid-column: 1 / -1;
  display: grid;
  margin-inline: -5vw;
}

.experiencia-cover > * {
  grid-area: 1 / 1;
}

.experiencia-cover-img {
  width: 100%;
  height: auto;
  display: block;
  align-self: center;
}

/* Sin título: el copy sube y queda pegado a la silueta (el margen negativo recorta el hueco del grid) */
@media (min-width: 769px) {
  .experiencia-cover {
    margin-bottom: -3rem;
  }

  .experiencia-text {
    align-self: start;
  }
}

@media (max-width: 768px) {
  .experiencia-cover {
    margin-bottom: -2.5rem;
  }
}

/* ===== MODAL DE PRODUCTO (tienda) ===== */

.pm {
  /* base.css pone margin: 0 a todo: hay que recuperar el centrado del <dialog> */
  margin: auto;
  width: calc(100% - 2rem);
  max-width: 880px;
  max-height: calc(100dvh - 2rem);
  /* Un solo contenedor con scroll (.pm-panel): el <dialog> no debe tener el suyo */
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: var(--bg-panel);
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
}

.pm[open] {
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

.pm::backdrop {
  background: rgba(20, 10, 10, 0.72);
  backdrop-filter: blur(3px);
}

/* Sin descripción ni notas de cata: modal más pequeño */
.pm--compact {
  max-width: 560px;
}

/* Barra fija con la X: arriba del todo, fuera del scroll y sin tapar nada */
.pm-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  padding: 0.5rem 0.5rem 0;
}

.pm-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain; /* el scroll del modal no pasa a la web de detrás */
  box-sizing: border-box;
  padding: 0.5rem 1.5rem 1.5rem;
}

.pm-close {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.pm-close:hover,
.pm-close:focus-visible {
  background: var(--rojo);
  border-color: var(--rojo);
}

.pm-body {
  display: grid;
  gap: 1.5rem;
}

.pm-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(0, 0, 0, 0.25));
}

.pm-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-info {
  min-width: 0;
  padding-right: 2.5rem;
}

.pm-title {
  margin: 0.25rem 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.25;
  color: var(--text-primary);
}

.pm-subtitle {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-body);
}

.pm-buy {
  display: grid;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pm-field {
  display: grid;
  gap: 0.35rem;
}

.pm-field label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-body);
}

.pm-field select {
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  font: inherit;
  color: var(--text-body);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
}

.pm-field select option {
  color: var(--text-body);
  background: var(--bg-panel);
}

.pm-price {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-body);
}

.pm-price-note {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-body);
}

.pm-desc p {
  margin: 0 0 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-body);
}

.pm-notes {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Desplegable "Notas de cata" (cerrado por defecto, móvil y escritorio) */
.pm-notes summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-body);
  cursor: pointer;
  list-style: none;
  transition: color 0.3s ease;
}

.pm-notes summary::-webkit-details-marker {
  display: none;
}

.pm-notes summary::after {
  content: '+';
  font-size: 1.1rem;
  letter-spacing: 0;
  line-height: 1;
  transition: transform 0.3s ease;
}

.pm-notes[open] summary::after {
  transform: rotate(45deg);
}

.pm-notes summary:hover {
  color: var(--text-primary);
}

.pm-notes summary:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.pm-notes dl {
  margin: 0 0 0.75rem;
}

.pm-notes dt {
  margin-top: 0.75rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-body);
}

.pm-notes dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-body);
}

.pm-notes dd span {
  display: block;
  margin-top: 0.2rem;
}

.pm-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.pm-status {
  min-height: 1.2em;
  margin: 0.5rem 0 0;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-body);
}

@media (min-width: 769px) {
  .pm-body {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
  }
}

/* [DESACTIVADO: MODAL DE CESTA: NOMBRE CLICKEABLE — sin backend todavía]
/ * ===== MODAL DE CESTA: NOMBRE CLICKEABLE (abre el producto) ===== * /

.cm-info .cm-name {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-display);
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text-primary);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-align: left;
  cursor: pointer;
  transition: color 0.3s ease;
}

.cm-info .cm-name:hover,
.cm-info .cm-name:focus-visible {
  color: var(--accent-primary);
  outline: none;
}

   [FIN DESACTIVADO: MODAL DE CESTA: NOMBRE CLICKEABLE] */
/* ===== MODAL DE PRODUCTO: BADGE DE CANTIDAD EN BOTÓN AÑADIR ===== */

.pm-actions .btn-add-cart {
  position: relative;
}

.pm-actions .btn-add-cart .cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--rojo);
  color: var(--text-body);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1;
  border: 2px solid var(--bg-primary);
}

.pm-actions .btn-add-cart .cart-badge.is-empty {
  display: none;
}

/* ===== COLECCIÓN ABIERTA: solo cabecera + tienda + bottom-nav ===== */
body.is-collection-open main > section:not(#tienda),
body.is-collection-open .map-section,
body.is-collection-open footer {
  display: none;
}

body.is-collection-open .tienda {
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: calc(5rem + 40px); /* hueco para la cabecera fija */
}

/* Sin la barra de confianza encima, el degradado vino de arriba de Tienda sobra */
body.is-collection-open .tienda::after {
  display: none;
}

@media (max-width: 768px) {
  /* Que el bottom-nav no tape el último botón "Volver" */
  body.is-collection-open .tienda {
    padding-bottom: calc(80px + 2rem + env(safe-area-inset-bottom));
  }
}

/* ===== NAV: DESPLEGABLE "TIENDA" ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-primary);
}

.nav-dropdown-toggle:hover,
.nav-dropdown-toggle[aria-expanded="true"] {
  color: var(--accent-nav-active);
}

.nav-caret {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.3s ease, margin 0.3s ease;
}

.nav-dropdown-toggle[aria-expanded="true"] .nav-caret {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  min-width: 270px;
  padding: 0.5rem;
  list-style: none;
  background: var(--bg-nav);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.nav-submenu[hidden] {
  display: none;
}

.nav-submenu a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  white-space: nowrap;
}

/* Sin la rayita roja animada de los nav-links normales */
.nav-submenu a::after {
  display: none;
}

.nav-submenu a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Móvil (menú hamburguesa): el desplegable se abre dentro del menú */
@media (max-width: 768px) {
  .nav-links {
    height: auto;
    min-height: 50vh;
    padding: 2rem 5%;
  }

  .nav-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .nav-submenu {
    position: static;
    transform: none;
    width: 100%;
    max-width: 320px;
    min-width: 0;
    margin-top: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: none;
  }

  .nav-submenu a {
    text-align: center;
    white-space: normal;
  }
}
