/* -------------------------
   Header / Nav
-------------------------- */
main {
  padding-top: var(--nav-h);
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 9999;
  height: var(--nav-h);
  pointer-events: auto;
}

.nav {
  height: var(--nav-h);
  width: 100%;
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  pointer-events: auto;

  color: var(--text);
  transition: backdrop-filter 0.6s var(--ease);
}

.nav.isScrolled {
  backdrop-filter: blur(8px);
  transform: translateY(0);
}

.brandMark {
  font-family: var(--serif);
  font-weight: 300;
  letter-spacing: 0.02em;
  font-size: 28px;
}

.brandLogo {
  height: 32px;
  width: auto;
  display: block;
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 38px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.navLinks a {
  position: relative;
  opacity: 0.9;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.navLinks a:hover {
  opacity: 1;
  transform: translateY(-1px);
}
.navLinks a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: rgba(255, 255, 255, 0.8);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}
.navLinks a:hover::after {
  transform: scaleX(1);
}

.pageHero {
  min-height: 60vh;
  padding: 48px;
}

.nav a[aria-current="page"] {
  text-decoration: underline;
}

/* FIX: asegurar visibilidad de links en el header */
.navLinks a {
  color: inherit; /* hereda el color de .nav */
  opacity: 1; /* evita que queden "fantasma" */
}

/* Por default, nav en blanco (para hero oscuro) */
.nav {
  color: rgba(255, 255, 255, 0.92);
}

/* La línea del hover también blanca */
.navLinks a::after {
  background: rgba(255, 255, 255, 0.8);
}

/* Mobile toggle */
.navToggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  cursor: pointer;
  padding: 12px;
}
.navToggle span {
  display: block;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  margin: 6px 0;
  transform-origin: center;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}

/* NAV MOBILE */
@media (max-width: 900px) {
  .nav {
    padding: 0 24px;
  }

  .navToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navLinks {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;

    padding: 18px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;

    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(10px);

    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);

    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .navLinks.isOpen {
    color: white;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .navLinks a::after {
    bottom: -6px;
  }
}

/* -------------------------
   Footer
-------------------------- */
.footer {
  background: var(--bg-sand);
  padding: 44px 0 18px;
  color: rgba(30, 30, 30, 0.75);
}

.footerInner {
  width: min(var(--max), calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px;
  align-items: end;
}

.footerTitle {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
  color: rgba(30, 30, 30, 0.7);
}

.footerText {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.6;
  margin-bottom: 10px;
}

.footerIcon {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: text-bottom;
  margin-right: 6px;
}

.footerLink {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.02em;
  display: inline-block;
  opacity: 0.9;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  line-height: 1;
}
.footerLink:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.footerLink img {
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 6px;
  transform: translateY(-1px);
}

.footerCenter {
  text-align: center;
}

.footerStore {
  font-family: var(--serif);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  position: relative;
  padding-bottom: 6px;
}
.footerStore::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(30, 30, 30, 0.55);
  transform: scaleX(0.9);
  transform-origin: center;
  transition: transform 0.25s var(--ease);
}
.footerStore:hover::after {
  transform: scaleX(1);
}

.footerRight {
  text-align: right;
}

.copyright {
  width: min(var(--max), calc(100% - 64px));
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(30, 30, 30, 0.18);
  text-align: center;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 12px;
  opacity: 0.75;
}

/* Responsive footer */
@media (max-width: 900px) {
  .footerInner {
    grid-template-columns: 1fr;
    text-align: left;
  }
  .footerCenter {
    text-align: left;
  }
  .footerRight {
    text-align: left;
  }
}

.navLinks.isOpen {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.navToggle {
  display: inline-block;
  position: relative;
  z-index: 10000;
}
.navToggle span {
  background: rgba(255, 255, 255, 0.9);
}

.navToggle {
  width: 44px;
  height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px; /* separa las 3 líneas */
}

.navToggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
}

.nav.isScrolled .navToggle span {
  background: rgba(0, 0, 0, 0.85);
}

@media (max-width: 520px) {
  .brandMark {
    font-size: 24px;
  }
  .nav {
    padding: 0 20px;
  }
}
.pageVinos .navLinks a::after {
  background: rgba(30, 30, 30, 0.7);
}

/* -------------------------
   SUB-FOOTER (HOME)
-------------------------- */
.subFooter {
  background-color: #f9f6ef;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.subFooterInner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.subFooterText {
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  color: #404040;
  margin-bottom: 64px;
}

.subFooterImages {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 96px;
}

.subFooterLogo {
  height: 70px;
  max-width: none;
  opacity: 0.85;
}

.subFooterIllustration {
  height: 130px;
  max-width: none;
  opacity: 0.6;
}

.subFooterImages img {
  max-height: 160px;
  opacity: 0.75;
}

.subFooter::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("/assets/img/texture-left.png");
  background-repeat: repeat;
  background-size: 900px auto;

  opacity: 0.08;
  mix-blend-mode: multiply;

  z-index: 0;
  pointer-events: none;
}
/* FIX: header siempre arriba (especialmente en HOME con video hero) */
.header {
  z-index: 99999;
}
.navToggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  cursor: pointer;
  padding: 12px;
  position: relative;
  z-index: 10000;
}

@media (max-width: 900px) {
  /* Estado cerrado */
  .navLinks {
    position: fixed;
    top: var(--nav-h);
    left: 16px;
    right: 16px;

    border-radius: 18px;
    background: rgba(10, 10, 10, 0.65);
    backdrop-filter: blur(12px);

    opacity: 0;
    pointer-events: none;
    transform: translateY(-14px);
    transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);

    z-index: 100000;
  }

  /* Estado abierto */
  .navLinks.isOpen {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}
@media (max-width: 900px) {
  .navToggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
/* ===== HAMBURGER robusto (sin depender de spans) ===== */
.nav .navToggle {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background-color: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);

  /* color de las líneas */
  color: rgba(255, 255, 255, 0.92);

  /* 3 líneas */
  background-image: linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor),
    linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 18px 2px, 18px 2px, 18px 2px;
  background-position: center 16px, center 21px, center 26px;

  /* por las dudas */
  display: inline-block;
  position: relative;
}

/* si tu nav cambia a modo claro al scrollear */
.nav.isScrolled .navToggle {
  border-color: rgba(0, 0, 0, 0.18);
  background-color: rgba(255, 255, 255, 0.22);
  color: rgba(0, 0, 0, 0.85);
}

/* opcional: si tenés spans adentro, los apagamos para que no molesten */
.nav .navToggle span {
  display: none;
}
/* ===== Mostrar hamburger SOLO en mobile ===== */
.nav .navToggle {
  display: none;
}

@media (max-width: 900px) {
  .nav .navToggle {
    display: inline-block;
  }
}
/* =========================
   SUBFOOTER — Mobile: centrar contenido
========================= */
@media (max-width: 768px) {
  /* Centrar todo el contenido interno */
  .subFooterInner {
    display: flex;
    flex-direction: column;
    align-items: center; /* CLAVE */
    text-align: center; /* texto centrado */
  }

  /* Texto */
  .subFooterText {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  /* Bloque de imágenes centrado */
  .subFooterImages {
    display: flex;
    flex-direction: column;
    align-items: center; /* CLAVE */
    justify-content: center;
  }

  /* Asegurar centrado individual */
  .subFooterLogo,
  .subFooterIllustration {
    margin-left: auto;
    margin-right: auto;
  }
}
/* =========================
   NAV Mobile — panel demasiado oscuro (fix)
========================= */
@media (max-width: 768px) {
  /* Panel del menú (cuando está abierto) */
  .navLinks.isOpen {
    background: rgba(238, 232, 222, 0.92) !important; /* beige del sitio */
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
  }

  /* Si tenías un ::before/overlay oscuro, lo apagamos */
  .navLinks.isOpen::before,
  .navLinks.isOpen::after {
    content: none !important;
    opacity: 0 !important;
  }

  /* Links del menú: legibles */
  .navLinks.isOpen a {
    color: #111 !important;
  }
}
/* =========================
   NAV Mobile (overlay abierto) — siempre negro + underline negro
========================= */
@media (max-width: 768px) {
  /* Panel abierto: fondo claro y texto negro en TODAS las páginas */
  .navLinks.isOpen {
    background: rgba(238, 232, 222, 0.92) !important; /* tu beige */
    -webkit-backdrop-filter: blur(10px) !important;
    backdrop-filter: blur(10px) !important;
    color: #111 !important;
  }

  /* Links: negro siempre (incluye estados raros de iOS) */
  .navLinks.isOpen a,
  .navLinks.isOpen a:link,
  .navLinks.isOpen a:visited,
  .navLinks.isOpen a:hover,
  .navLinks.isOpen a:active,
  .navLinks.isOpen a:focus {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    text-decoration: none !important;
  }

  /* Línea/underline del item activo (si lo hacés con border) */
  .navLinks.isOpen a[aria-current="page"],
  .navLinks.isOpen a.isActive,
  .navLinks.isOpen a.active {
    color: #111 !important;
    -webkit-text-fill-color: #111 !important;
    border-bottom: 1px solid #111 !important;
  }

  /* Si tu underline está hecho con ::after */
  .navLinks.isOpen a[aria-current="page"]::after,
  .navLinks.isOpen a.isActive::after,
  .navLinks.isOpen a.active::after {
    background: #111 !important;
    opacity: 1 !important;
  }
}
/* =========================
   NAV Mobile — eliminar underline (UX clean)
========================= */
@media (max-width: 768px) {
  /* Links del menú hamburguesa */
  .navLinks.isOpen a {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }

  /* Eliminar cualquier pseudo underline */
  .navLinks.isOpen a::before,
  .navLinks.isOpen a::after {
    content: none !important;
    background: transparent !important;
    opacity: 0 !important;
    box-shadow: none !important;
  }

  /* También en hover/focus/active (por si quedó algo heredado) */
  .navLinks.isOpen a:hover,
  .navLinks.isOpen a:focus,
  .navLinks.isOpen a:active {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
  }
}
