/*
Theme Name: Nueve.5
Theme URI: https://nueve5.cl
Author: Nueve.5 Team
Author URI: https://nueve5.cl
Description: Block Theme FSE para la landing de Nueve.5 – Agua alcalina con pH 9.5 y minerales funcionales. Diseño fiel al Figma original con tipografía Montserrat, colores corporativos y soporte responsive completo.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 8.0
License: Proprietary
License URI: https://nueve5.cl
Text Domain: nueve5
Tags: full-site-editing, block-themes, one-page, landing-page, e-commerce
*/

/* === VARIABLES GLOBALES NUEVE.5 === */

#wpadminbar{
  display: none;
}
.display-none-block{
  display: none;
}
:root {
  --n5-gunmetal:        #112530;
  --n5-erie-black:      #1E1E1E;
  --n5-btn-primary:     #191D1E;
  --n5-secondary-blue:  #6C828B;
  --n5-bg-light:        #F8FAFC;
  --n5-bg-card:         #E6E6E6;
  --n5-text-muted:      #52525B;
  --n5-border-input:    #D4D4D8;
  --n5-black:           #0C0B0B;
  --n5-white:           #FFFFFF;
  --n5-light-blue-text: #CCDCED;
  --n5-hero-overlay:    rgba(17, 37, 48, 0.4);

  --n5-radius-btn:1000px;
  --n5-radius-card:16px;
  --n5-radius-img:32px;
  --n5-radius-input:8px;

  --n5-font:'Montserrat', sans-serif;

  /* ── Sistema de espaciado / layout ──
     Centraliza valores usados por el header fixed, secciones y
     contenedores de páginas internas. */
  --n5-header-h-top:    56px;   /* top-row (desktop) */
  --n5-header-h-main:   52px;   /* main-row (desktop) */
  --n5-header-h:        108px;  /* total desktop (top + main) */
  --n5-header-h-mobile:  56px;  /* sólo main-row en mobile */

  --n5-section-y:       80px;   /* padding vertical estándar de secciones desktop */
  --n5-section-y-mobile:56px;
  --n5-section-x:       32px;   /* padding lateral desktop */
  --n5-section-x-mobile:24px;

  --n5-container:      1200px;  /* ancho máximo del contenido en páginas */
  --n5-container-wide: 1280px;  /* para hero/landings/newsletter */
}

@media (max-width: 781px) {
  :root {
    --n5-header-h: var(--n5-header-h-mobile);
  }
}

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--n5-font);
  background-color: var(--n5-bg-light);
  color: var(--n5-erie-black);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ════════════════════════════════════════════
   HEADER – Rediseño Figma
   Desktop: 2 filas (top: logo+social / nav: menu+utils)
   Mobile:  1 fila  (hamburguesa | logo | utils) + overlay
════════════════════════════════════════════ */

.n5-header {
  position: fixed;             /* sticky permanente sobre todo el sitio */
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  color: var(--n5-white);

  /* Fondo: degradado de protección de arriba hacia abajo
     para que el logo y los textos blancos sean legibles aún sobre fondos claros. */
  background: linear-gradient(
    180deg,
    rgba(17, 37, 48, 0.55) 0%,
    rgba(17, 37, 48, 0.25) 60%,
    rgba(17, 37, 48, 0) 100%
  );

  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

/* Estado "scrolled": cuando el usuario hace scroll > 40px,
   JS añade la clase .is-scrolled y el header se vuelve sólido. */
.wp-singular .n5-header.is-scrolled {
  background: var(--n5-gunmetal);
  background: rgba(17, 37, 48, 0.8);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  backdrop-filter: saturate(140%);
  -webkit-backdrop-filter: saturate(140%);
}
.page .n5-header,
.archive .n5-header,
.wp-singular .n5-header{
  background: rgba(17, 37, 48, 0.6);
}
@media (max-width: 781px) {
  .wp-singular .n5-header{
    background: rgba(17, 37, 48, 1);
  }
  .wp-singular .n5-header.is-scrolled{
    background: rgba(17, 37, 48, 0.8);
  }
}
/* Fila superior: transparente, sólo se separa con un borde sutil */
.n5-header__top-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 32px;
  background: var(--n5-gunmetal);
  /* border-bottom: 1px solid rgba(255, 255, 255, 0.12); */
  min-height: 56px;
}
/* Cuando ya hay fondo sólido, el borde inferior puede desaparecer
   para evitar la doble línea con la sombra. */
.n5-header.is-scrolled .n5-header__top-row {
  /* border-bottom-color: rgba(255, 255, 255, 0.06); */
}

.n5-header__top-row .wp-block-site-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}
.n5-header__top-row .wp-block-site-logo img {
  max-height: 36px;
  width: auto;
  display: block;
}

.n5-header__social {
  display: flex;
  align-items: center;
  gap: 14px;
}
.n5-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--n5-white);
  line-height: 0;
  transition: opacity 0.2s ease;
}
.n5-social-icon:hover { opacity: 0.65; }
.n5-header__social-tpl { display: none !important; }

/* ── MAIN ROW: nav + utils ── */
.n5-header__main-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 52px;
  gap: 8px;
}

/* Logo mobile – oculto en desktop, centrado en mobile */
.n5-header__mobile-logo {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.n5-header__mobile-logo .wp-block-site-logo img {
  max-height: 28px;
  width: auto;
  display: block;
}

/* ── WP Navigation block ── */
.n5-header__nav { flex: 1; min-width: 0; }

.n5-header__nav .wp-block-navigation__container {
  display: flex !important;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0; padding: 0;
  flex-wrap: nowrap;
}

.n5-header__nav .wp-block-navigation-item__content {
  color: var(--n5-white) !important;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--n5-font);
  padding: 14px 14px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.n5-header__nav .wp-block-navigation-item__content:hover { opacity: 0.7; }

/* Clase "n5-nav-cta-primary" en wp-admin → Apariencia → Menús → CSS del ítem */
.n5-header__nav .n5-nav-cta-primary .wp-block-navigation-item__content {
  background: #191D1E;
  background: var(--n5-gunmetal);
  color: var(--n5-white) !important;
  padding: 9px 20px !important;
  border-radius: 100px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 4px;
}
/* Clase "n5-nav-cta-outline" en wp-admin → Apariencia → Menús → CSS del ítem */
.n5-header__nav .n5-nav-cta-outline .wp-block-navigation-item__content {
  border: 1.5px solid var(--n5-white);
  padding: 8px 18px !important;
  border-radius: 100px;
  margin-left: 4px;
}

/* ── Iconos de utilidad ── */
.n5-header__utils {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.n5-header__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: none; border: none;
  cursor: pointer;
  color: var(--n5-white);
  padding: 0;
  text-decoration: none;
  line-height: 0;
  border-radius: 50%;
  transition: background 0.2s ease;
}
.n5-header__icon-btn:hover { background: rgba(255,255,255,0.1); }
.n5-header__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  color: var(--n5-white);
  text-decoration: none;
  position: relative;
  border-radius: 50%;
  transition: background 0.2s ease;
}
.n5-header__cart:hover { background: rgba(255,255,255,0.1); }
.n5-header__cart-count {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: #e53e3e;
  color: white;
  font-size: 10px; font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
}

/* ── Defensa anti-duplicados de WooCommerce en el header ──
   Si Woo o un plugin inyecta su propio mini-cart, "My Account",
   "Customer Account" o "Cart" como bloque hermano de utils,
   los ocultamos. Nuestros propios iconos están dentro de
   .n5-header__utils y no se ven afectados. */
.n5-header > .wp-block-woocommerce-mini-cart,
.n5-header > .wp-block-woocommerce-customer-account,
.n5-header__main-row > .wp-block-woocommerce-mini-cart,
.n5-header__main-row > .wp-block-woocommerce-customer-account,
.n5-header__main-row > .woocommerce-mini-cart,
.n5-header__main-row > .site-header-cart,
.n5-header .wc-block-mini-cart:not(.n5-header__utils .wc-block-mini-cart) {
  display: none !important;
}

/* Si el menú de navegación incluye items "Mi cuenta" o "Carrito"
   con clase CSS específica, también puedes ocultarlos así.
   (Comentado por defecto — descoméntalo si te aparecen):
.n5-header__nav .menu-item-cart,
.n5-header__nav .menu-item-account { display: none !important; } */

/* ── WP Nav: hamburger button ── */
.wp-block-navigation__responsive-container-open {
  background: none !important;
  border: none !important;
  cursor: pointer;
  padding: 8px !important;
  color: var(--n5-white) !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wp-block-navigation__responsive-container-open svg {
  fill: var(--n5-white) !important;
  width: 24px; height: 24px;
}

/* ── WP Nav: mobile overlay ── */
.n5-header__nav .wp-block-navigation__responsive-container.is-menu-open {
  background: var(--n5-gunmetal) !important;
  display: flex;
  flex-direction: column;
}
.wp-block-navigation__responsive-container-close {
  color: var(--n5-white) !important;
  background: none !important;
  border: none !important;
}
.wp-block-navigation__responsive-container-close svg {
  fill: var(--n5-white) !important;
}

/* Ítems del overlay */
.n5-header__nav .wp-block-navigation__responsive-container-content {
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  flex: 1;
}
.n5-header__nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item {
  width: 100%;
  /* border-bottom: 1px solid rgba(255,255,255,0.07); */
}
.n5-header__nav .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content {
  font-size: 16px !important;
  font-weight: 600 !important;
  padding: 8px 20px !important;
  color: var(--n5-white) !important;
  display: block; width: 100%;
  margin-top: 8px;
}
/* Neutralizar botones CTA dentro del overlay mobile */
/* .n5-header__nav .wp-block-navigation__responsive-container .n5-nav-cta-primary .wp-block-navigation-item__content,
.n5-header__nav .wp-block-navigation__responsive-container .n5-nav-cta-outline .wp-block-navigation-item__content {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  padding: 16px 28px !important;
  margin: 0 !important;
} */

/* Redes sociales inyectadas al pie del overlay por JS */
.n5-mobile-menu-social {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 28px 24px 40px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.n5-mobile-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--n5-white);
  line-height: 0;
  transition: opacity 0.2s ease;
}
.n5-mobile-social-link:hover { opacity: 0.65; }

/* ── Responsive ── */
@media (max-width: 781px) {
  .n5-header__top-row { display: none; }

  .n5-header__main-row {
    padding: 0 8px;
    min-height: 56px;
  }
  .n5-header__mobile-logo {
    display: flex;
    pointer-events: auto;
  }
  .n5-header__nav { flex: 0 0 auto; }
  .n5-header__nav .wp-block-navigation__responsive-container-hidden-by-default {
    display: none;
  }
}

@media (min-width: 782px) {
  .n5-header__nav .wp-block-navigation__responsive-container-open {
    display: none !important;
  }
  .n5-header__nav .wp-block-navigation__responsive-container-hidden-by-default {
    display: flex !important;
  }
  .n5-header__mobile-logo { display: none !important; }
}

/* ── Compensación de altura del header fixed ─────────────────
   El header es position:fixed, así que el contenido necesita
   padding-top para no quedar oculto debajo. Usamos un único
   token (--n5-header-h) que se ajusta solo en mobile.

   Excepción: páginas con .n5-hero como PRIMER hijo del main.
   Ahí el hero absorbe el header (queda flotando encima).

   Aplicamos también a las páginas de WooCommerce (tienda,
   producto, carrito, checkout, mi cuenta), que no usan
   .n5-page-content sino sus propias clases. */

.n5-page-content,
.woocommerce-page main,
body.woocommerce main,
body.woocommerce-cart main,
body.woocommerce-checkout main,
body.woocommerce-account main,
body.single-product main {
  padding-top: var(--n5-header-h);
}

/* Cuando la primera sección del main es el hero, sin padding-top. */
.n5-page-content:has(> .n5-hero:first-child),
.n5-page-content:has(> .wp-block-group.n5-hero:first-child),
main:has(> .n5-hero:first-child),
main:has(> .wp-block-group.n5-hero:first-child) {
  padding-top: 0;
}

/* Fallback para anclas (#hash) – evita que el header tape el destino */
:where(h1, h2, h3, h4, [id]) {
  scroll-margin-top: calc(var(--n5-header-h) + 16px);
}

/* ── Secciones full-bleed dentro del main constrained ─────
   Cuando el <main> es constrained (contentSize: 1200px), las
   secciones con fondo de color/imagen necesitan romper ese
   ancho para llegar de borde a borde del viewport.

   Si la sección ya tiene `align="full"` (.alignfull), WP la
   saca del contenedor automáticamente. Este bloque es un
   safety-net para contenido viejo que aún no tiene esa clase. */
.n5-landing .n5-hero:not(.alignfull),
.n5-landing .n5-problem:not(.alignfull),
.n5-landing .n5-minerales:not(.alignfull),
.n5-landing .n5-instagram:not(.alignfull),
.n5-landing .n5-newsletter:not(.alignfull) {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/* === BUTTONS === */
.n5-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: var(--n5-radius-btn);
  font-family: var(--n5-font);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.n5-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.n5-btn--primary {
  background-color: var(--n5-btn-primary);
  color: var(--n5-white);
}

.n5-btn--ghost {
  background: var(--n5-white);
  color: var(--n5-gunmetal);
  border: 2px solid var(--n5-gunmetal);
}

.n5-btn--sm {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: var(--n5-radius-input);
}

/* === HERO === */
.n5-hero {
  position: relative;
  min-height: 509px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.n5-hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.n5-hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--n5-hero-overlay);
}

.n5-hero__content {
  position: relative;
  z-index: 2;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.n5-hero__tag {
  font-size: 16px;
  font-weight: 600;
  color: var(--n5-light-blue-text);
  line-height: 1.3;
}

.n5-hero__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--n5-white);
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
}

.n5-hero__subtitle {
  font-size: 20px;
  font-weight: 400;
  color: var(--n5-white);
  margin: 0;
  line-height: 1.4;
}

.n5-hero__cta {
  margin-top: 10px;
  width: fit-content;
}

/* === SECTION: PERFILES === */
.n5-perfiles {
  padding: 32px 0 32px;
  background: var(--n5-bg-light);
}

.n5-perfiles__title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--n5-black);
  margin: 0 16px 16px;
  line-height: 1.2;
}
.n5-perfiles__title-bajada{
  font-size: 18px;
  font-weight: 400;
  text-align: center;
  color: var(--n5-black);
  margin: 0 auto 16px auto;
  line-height: 1.2;
  max-width: 600px;
}
.n5-perfiles__scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 16px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: center;
}
@media (max-width: 720px) {
  .n5-perfiles__scroll {justify-content: left;flex-direction: column; gap: 48px;}
}

.n5-perfiles__scroll::-webkit-scrollbar {
  display: none;
}

/* === CARD PERFIL === */
.n5-card {
  flex: 0 0 300px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  text-align: center;
}

.n5-card__img {
  width: 300px;
  height: 305px;
  border-radius: var(--n5-radius-card);
  overflow: hidden;
  position: relative;
  background: #d9d9d9;
}

.n5-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n5-card__name {
  font-size: 20px;
  font-weight: 600;
  color: var(--n5-gunmetal);
  line-height: 1.3;
}
.n5-card__txt {
  padding: 8px 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--n5-black);
  line-height: 1.2;
}
.n5-card__tag {
  display: inline-flex;
  background: var(--n5-bg-card);
  padding: 8px 16px;
  border-radius: var(--n5-radius-input);
  font-size: 12px;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.2;
  white-space: nowrap;
  font-family: var(--n5-font);
}

/* === SECTION: PRODUCTOS === */
.n5-productos {
  background: var(--n5-white);
  padding: 48px 16px;
}

.n5-productos__title {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--n5-black);
  margin: 0 0 24px;
  line-height: 1.2;
}

.n5-productos__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 640px) {
  .n5-productos__grid {
    grid-template-columns: 1fr 1fr;
  }
}

.n5-product-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.n5-product-item__img-wrap {
  width: 100%;
  max-width: 300px;
  height: 300px;
  border-radius: var(--n5-radius-img);
  overflow: hidden;
  background: #fafafc;
  margin: 0 auto;
}

.n5-product-item__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.n5-product-item__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--n5-gunmetal);
  line-height: 1.5;
  margin: 0;
}

.n5-product-item__price {
  font-size: 20px;
  font-weight: 800;
  color: var(--n5-erie-black);
  line-height: 1.5;
}

/* === SECTION: MINERALES =========================================
   Desktop: Lata centrada con 4 features en las esquinas + 4 etiquetas
   alrededor de la lata.
   Mobile : Header arriba, lata centrada, 4 etiquetas con punto. Click
   en una etiqueta abre modal con el detalle. */

.n5-minerales {
  position: relative;
  background: var(--n5-bg-light);
  overflow: hidden;
  isolation: isolate;
  padding: 80px 24px 90px;
}

/* Fondo gotas */
.n5-minerales__bg,
.n5-minerales__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.n5-minerales__bg img {
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Header */
.n5-minerales__header {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.n5-minerales__title {
  font-size: 30px;
  font-weight: 800;
  color: var(--n5-gunmetal);
  line-height: 1.2;
  margin: 0 0 10px;
}
.n5-minerales__subtitle {
  font-size: 16px;
  font-weight: 500;
  color: var(--n5-erie-black);
  line-height: 1.5;
  margin: 0;
}

/* ── Stage: contenedor de features + lata + labels ── */
.n5-minerales__stage {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: center;
  gap: 30px 80px;
}

/* Features (icono + descripción) en las 4 esquinas */
.n5-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 340px;
  flex-direction: column;
}
.n5-feature h3{
    font-size: 22px;
    font-weight: 700;
    color: var(--n5-gunmetal);  
    margin: 0;
}
.n5-feature__icon-wrapper{
  display: flex; 
  gap: 16px;
  align-items: center;
  justify-content: center;
}
.n5-feature--tr .n5-feature__icon-wrapper ,
.n5-feature--br .n5-feature__icon-wrapper {
  flex-direction: row-reverse;   
}
.n5-feature__icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: contain;
}
.n5-feature__txt {
  font-size: 15px;
  font-weight: 500;
  color: var(--n5-gunmetal);
  line-height: 1.4;
  margin: 0;
}

.n5-feature--tl { grid-column: 1; grid-row: 1; justify-self: end; }
.n5-feature--tr { grid-column: 3; grid-row: 1; justify-self: start; text-align: right; }
.n5-feature--bl { grid-column: 1; grid-row: 2; justify-self: end; }
.n5-feature--br { grid-column: 3; grid-row: 2; justify-self: start;  text-align: right; }

/* La lata ocupa la columna central, ambas filas */
.n5-minerales__can {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.n5-minerales__can-img {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

/* Etiquetas alrededor de la lata */
.n5-mineral-label {
  position: absolute;
  z-index: 3;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--n5-font);
  font-size: 22px;
  font-weight: 700;
  color: var(--n5-gunmetal);
  padding: 6px 10px;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  display: none;
}
@media (max-width: 781px) {
  .n5-mineral-label { display: inline-flex; }
}
/* Punto/círculo decorativo de la etiqueta */
.n5-mineral-label::before {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--n5-gunmetal);
  background: transparent;
  flex-shrink: 0;
  transition: background 0.2s ease;
}
.n5-mineral-label:hover::before { background: var(--n5-gunmetal); }

/* Posiciones de cada label respecto a la lata */
.n5-mineral-label--tl { top: 22%;  left:  -10%; flex-direction: row-reverse; }
.n5-mineral-label--tr { top: 22%;  right: -20%; }
.n5-mineral-label--bl { bottom: 30%; right:  -10%; }
.n5-mineral-label--br { bottom: 30%; left: -10%; flex-direction: row-reverse;}

/* CTA */
.n5-minerales__cta-block {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 56px;
}
.n5-minerales__cta-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--n5-gunmetal);
  margin: 0 0 18px;
  line-height: 1.4;
}

/* ── Modal mineral (mobile) ── */
.n5-mineral-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.n5-mineral-modal.is-open { display: flex; }
.n5-mineral-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 37, 48, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.n5-mineral-modal__card {
  position: relative;
  background: var(--n5-white);
  border-radius: 28px;
  padding: 56px 32px 48px;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0,0,0,0.18);
  animation: n5-modal-in 0.25s ease;
}
@keyframes n5-modal-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.n5-mineral-modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--n5-gunmetal);
  padding: 4px;
  line-height: 0;
}
.n5-mineral-modal__title {
  font-size: 28px;
  font-weight: 800;
  color: var(--n5-gunmetal);
  margin: 0 0 24px;
}
.n5-mineral-modal__icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 24px;
  display: block;
}
.n5-mineral-modal__desc {
  font-size: 17px;
  font-weight: 500;
  color: var(--n5-gunmetal);
  line-height: 1.45;
  margin: 0;
  max-width: 280px;
  margin-inline: auto;
}

/* ── Tablet ── */
@media (max-width: 1023px) {
  .n5-minerales__stage { gap: 20px 30px; }
  .n5-feature { max-width: 240px; gap: 12px; }
  .n5-feature__icon { width: 52px; height: 52px; }
  .n5-feature__txt { font-size: 13px; }
  .n5-minerales__can { width: 220px; }
  .n5-mineral-label { font-size: 18px; }
}

/* ── Mobile ── */
@media (max-width: 781px) {
  .n5-minerales {
    padding: 56px 24px 72px;
  }
  .n5-minerales__title { font-size: 26px; }
  .n5-minerales__subtitle { font-size: 15px; }

  /* Ocultamos las features (descripciones con icono) en mobile.
     Su contenido aparece en el modal al tocar la etiqueta. */
  .n5-feature { display: none; }

  /* Stage pasa a ser sólo la lata centrada con sus etiquetas. */
  .n5-minerales__stage {
    display: block;
    max-width: 360px;
  }
  .n5-minerales__can {
    grid-column: auto;
    grid-row: auto;
    width: 78%;
    max-width: 280px;
    margin: 0 auto;
  }

  /* En mobile las etiquetas se acercan más a la lata */
  .n5-mineral-label::before{display: none;} /* ocultamos el punto decorativo en mobile */
  .n5-mineral-label { font-size: 22px; padding: 4px 6px; }
  .n5-mineral-label--tl { top: 22%;  left:  -5%; flex-direction: row;}
  .n5-mineral-label--tr { top: 22%;  right: -23%; }
  .n5-mineral-label--bl {top: 44%;left: -5%;bottom: auto;flex-direction: row-reverse;right: auto; }
  .n5-mineral-label--br {top: 44%;right: -8%;bottom: auto;left: auto;flex-direction: row;}

  .n5-minerales__cta-block { margin-top: 48px; }
}

/* === SECTION: PROBLEM / SOLUCIÓN ===
   Desktop: 3 columnas horizontales (pregunta · "Solución" · logo+tagline)
   Mobile : stack vertical centrado, fondo con los dos hombres abajo */
.n5-problem {
  position: relative;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate; /* asegura que el z-index del contenido funcione */
}

/* Imagen de fondo (picture/img) */
.n5-problem__bg,
.n5-problem__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.n5-problem__bg img {
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Contenedor del contenido sobre el fondo */
.n5-problem__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 120px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: nowrap;
}

/* Columnas */
.n5-problem__col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.n5-problem__col--problem {
  flex: 0 1 320px;
  text-align: left;
}
.n5-problem__col--label {
  flex: 0 0 auto;
  align-items: center;
}
.n5-problem__col--brand {
  flex: 0 1 320px;
  text-align: left;
  align-items: flex-start;
}

/* Tipografía / elementos */
.n5-problem__title {
  font-size: 30px;
  font-weight: 700;
  color: var(--n5-gunmetal);
  line-height: 1.2;
  margin: 0 0 14px;
}
.n5-problem__subtitle {
  font-size: 14px;
  font-weight: 500;
  color: var(--n5-text-muted);
  line-height: 1.5;
  margin: 0;
}
.n5-problem__solution {
  font-size: 26px;
  font-weight: 700;
  color: var(--n5-secondary-blue);
  line-height: 1.2;
  margin: 0;
  white-space: nowrap;
}
.n5-problem__logo {
  display: block;
  width: auto;
  max-width: 250px;
  height: auto;
  margin: 0 0 10px;
}
.n5-problem__description {
  font-size: 14px;
  font-weight: 500;
  color: var(--n5-erie-black);
  line-height: 1.45;
  margin: 0;
}

/* ── Responsive: tablet / mobile ── */
@media (max-width: 1023px) {
  .n5-problem__inner {
    padding: 60px 24px;
    gap: 24px;
  }
  .n5-problem__title { font-size: 24px; }
  .n5-problem__solution { font-size: 22px; }
  .n5-problem__logo { max-width: 170px; }
}

@media (max-width: 781px) {
  .n5-problem__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 24px 48px;
    gap: 18px;
    max-width: 520px;
  }
  .n5-problem__col,
  .n5-problem__col--problem,
  .n5-problem__col--brand {
    flex: 0 0 auto;
    width: 100%;
    text-align: center;
    align-items: center;
  }
  .n5-problem__title {
    font-size: 26px;
    margin: 0;
  }
  .n5-problem__subtitle { display: none; } /* en mobile no se muestra (ver mock) */
  .n5-problem__solution {
    font-size: 22px;
    color: var(--n5-secondary-blue);
    margin-top: 8px;
  }
  .n5-problem__logo {
    max-width: 180px;
    margin: 4px auto 8px;
  }
  .n5-problem__description {
    font-size: 14px;
    text-align: center;
  }
  .n5-problem__bg,
  .n5-problem__bg img {
    position: relative;
  }
  .n5-problem{
    flex-direction: column;
  }  
}

/* === SECTION: TESTIMONIOS ========================================
   Desktop: Título centrado arriba. Slider con flechas a los costados.
            Cada testimonio es: avatar circular a la izquierda + texto
            (autor sobre la cita) a la derecha.
   Mobile : Título arriba. Avatar grande centrado con flechas a los
            costados. Debajo el autor (en negrita) y luego la cita. */

.n5-testimonios {
  background: var(--n5-bg-light);
  padding: 80px 24px 90px;
  position: relative;
  overflow: hidden;
}

.n5-testimonios__heading {
  font-size: 32px;
  font-weight: 800;
  color: var(--n5-gunmetal);
  text-align: center;
  margin: 0 0 56px;
  line-height: 1.2;
}

/* Slider: 3 columnas (flecha · track · flecha) en desktop */
.n5-testimonios__slider {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 24px;
}

.n5-testimonios__track {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Cada testimonio ocupa el 100% del track. Por defecto está oculto;
   JS añade .is-active al testimonio actual para mostrarlo. */
.n5-testimonial {
  display: none;
  align-items: center;
  gap: 56px;
}
.n5-testimonial.is-active {
  display: flex;
  animation: n5-testimonial-in 0.4s ease;
}
@keyframes n5-testimonial-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Avatar circular */
.n5-testimonial__avatar {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.n5-testimonial__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Cuerpo */
.n5-testimonial__body {
  flex: 1;
  text-align: left;
  color: var(--n5-gunmetal);
}
.n5-testimonial__author {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 24px;
  line-height: 1.4;
  /* En desktop el autor va abajo del texto (mock). */
  order: 2;
  margin-top: 24px;
  margin-bottom: 0;
}
.n5-testimonial__text {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  margin: 0;
  order: 1;
}
/* Forzamos que body sea flex-column para que `order` funcione */
.n5-testimonial__body {
  display: flex;
  flex-direction: column;
}

/* ── Flechas ── */
.n5-arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(180, 188, 192, 0.55);
  color: var(--n5-white);
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}
.n5-arrow-btn:hover {
  background: var(--n5-gunmetal);
  transform: scale(1.05);
}
.n5-arrow-btn--prev { grid-column: 1; }
.n5-arrow-btn--next {
  grid-column: 3;
  background: var(--n5-gunmetal);
}

/* ── Tablet ── */
@media (max-width: 1023px) {
  .n5-testimonial { gap: 32px; }
  .n5-testimonial__avatar { width: 220px; height: 220px; }
}

/* ── Mobile ── */
@media (max-width: 781px) {
  .n5-testimonios {
    padding: 56px 24px 72px;
  }
  .n5-testimonios__heading {
    font-size: 28px;
    margin: 0 0 32px;
  }

  /* En mobile el slider mantiene 3 columnas (flecha-avatar-flecha)
     y el cuerpo del testimonio cae debajo, fuera del track. */
  .n5-testimonios__slider {
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
  }

  .n5-testimonial.is-active {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .n5-testimonial__avatar {
    width: 240px;
    height: 240px;
    margin: 0 auto;
  }

  .n5-testimonial__body {
    text-align: left;
  }
  /* En mobile el autor va ARRIBA del texto y en bold */
  .n5-testimonial__author {
    order: 0;
    margin: 0 0 18px;
    font-size: 18px;
    font-weight: 700;
  }
  .n5-testimonial__text {
    order: 1;
    font-size: 16px;
    line-height: 1.55;
  }

  /* Flechas más pequeñas y centradas verticalmente con el avatar */
  .n5-arrow-btn {
    width: 40px;
    height: 40px;
    align-self: start;
    margin-top: 100px; /* aproximadamente al centro del avatar */
  }
}

/* === PATRÓN FAQ (bloque Detalles nativo) ==========================
   Acordeón pregunta/respuesta sin JS. Responsive y editable.
   Reutilizable en cualquier página vía el patrón "FAQ". */
.n5-faq-block {
  padding: var(--n5-section-y) var(--n5-section-x);
}
/* Variante usada en el home: fondo blanco */
.n5-faq-block--home {
  background: var(--n5-white);
}
@media (max-width: 781px) {
  .n5-faq-block {
    padding: var(--n5-section-y-mobile) var(--n5-section-x-mobile);
  }
}

/* CTA opcional al pie del FAQ (usado en el home) */
.n5-faq-block__cta {
  margin-top: 40px;
  text-align: center;
}
.n5-faq-block__cta-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--n5-gunmetal);
  margin: 0 0 18px;
}

.n5-faq-block__title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800;
  color: var(--n5-gunmetal);
  line-height: 1.2;
  margin: 0 0 10px;
}
.n5-faq-block__intro {
  font-size: 15px;
  font-weight: 500;
  color: var(--n5-text-muted);
  line-height: 1.5;
  margin: 0 auto 36px;
  max-width: 520px;
}

.n5-faq-block__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Cada ítem = bloque <details> nativo */
.n5-faq-block__item {
  background: var(--n5-white);
  border: 1.5px solid rgba(17, 37, 48, 0.10);
  border-radius: var(--n5-radius-card);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.n5-faq-block__item[open] {
  border-color: rgba(17, 37, 48, 0.22);
  box-shadow: 0 4px 16px rgba(17, 37, 48, 0.07);
}

/* Pregunta (summary) */
.n5-faq-block__item > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 700;
  color: var(--n5-gunmetal);
  line-height: 1.4;
  user-select: none;
}
.n5-faq-block__item > summary::-webkit-details-marker { display: none; }
.n5-faq-block__item > summary::marker { content: ''; }

/* Ícono + / × a la derecha */
.n5-faq-block__item > summary::after {
  content: '';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--n5-gunmetal);
  background:
    linear-gradient(var(--n5-gunmetal), var(--n5-gunmetal)) center / 12px 2px no-repeat,
    linear-gradient(var(--n5-gunmetal), var(--n5-gunmetal)) center / 2px 12px no-repeat;
  transition: transform 0.3s ease;
}
.n5-faq-block__item[open] > summary::after {
  transform: rotate(135deg); /* convierte el "+" en "×" */
}
.n5-faq-block__item > summary:hover { color: var(--n5-secondary-blue); }

/* Respuesta */
.n5-faq-block__item > summary + * {
  margin: 0;
}
.n5-faq-block__item > :not(summary) {
  padding: 0 24px 22px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--n5-text-muted);
}
.n5-faq-block__item > p:not(:first-of-type) { padding-top: 0; }

/* Animación suave de apertura (navegadores que la soportan) */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .n5-faq-block__item {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }
}

@media (max-width: 781px) {
  .n5-faq-block__item > summary {
    padding: 16px 18px;
    font-size: 15px;
  }
  .n5-faq-block__item > :not(summary) {
    padding: 0 18px 18px;
    font-size: 14px;
  }
}

/* === SECTION: INSTAGRAM ==========================================
   Desktop: 6 imágenes en una sola fila a todo el ancho, handle pill
            flotando en el centro.
   Mobile : grid 2 columnas (3 filas), handle pill flotando al centro
            de la grilla (a la mitad de la altura). */

.n5-instagram {
  padding: 70px 0 80px;
  background: var(--n5-bg-light);
}

.n5-instagram__title {
  font-size: 30px;
  font-weight: 500;
  text-align: center;
  color: var(--n5-gunmetal);
  margin: 0 0 36px;
  padding: 0 24px;
  line-height: 1.25;
}
.n5-instagram__title strong { font-weight: 800; }

/* Bloque clickeable: contiene la grilla y el pill superpuesto */
.n5-instagram__media {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
}

.n5-instagram__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* desktop: 6 columnas */
  gap: 4px;
  width: 100%;
}

.n5-instagram__item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: #d9d9d9;
}
.n5-instagram__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
}
.n5-instagram__media:hover .n5-instagram__item img {
  filter: brightness(0.85);
}
.n5-instagram__media:hover .n5-instagram__item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

/* Pill con el handle flotante, centrado verticalmente sobre la grilla */
.n5-instagram__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 28px;
  background: var(--n5-white);
  border-radius: var(--n5-radius-btn);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  white-space: nowrap;
  pointer-events: none; /* el clic pasa al <a> contenedor */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.n5-instagram__media:hover .n5-instagram__handle {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.n5-instagram__handle-icon {
  flex-shrink: 0;
  color: var(--n5-gunmetal);
}
.n5-instagram__handle-text {
  font-size: 22px;
  font-weight: 700;
  color: var(--n5-gunmetal);
  line-height: 1;
}

/* ── Tablet ── */
@media (max-width: 1023px) {
  .n5-instagram__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ── Mobile ── */
@media (max-width: 781px) {
  .n5-instagram {
    padding: 56px 0 64px;
  }
  .n5-instagram__title {
    font-size: 26px;
    margin: 0 0 28px;
  }
  /* En mobile el título "Instagram" cae en una segunda línea bold */
  .n5-instagram__title strong { display: inline-block; }

  .n5-instagram__grid {
    grid-template-columns: repeat(2, 1fr); /* mobile: 2 columnas */
    gap: 6px;
    padding: 0 16px;
  }
  .n5-instagram__handle {
    padding: 14px 26px;
    gap: 12px;
  }
  .n5-instagram__handle-icon { width: 28px; height: 28px; }
  .n5-instagram__handle-text { font-size: 20px; }
}

/* === SECTION: NEWSLETTER =========================================
   Desktop: Sección gris claro, contenido centrado max 1280px.
            Título arriba + fila con [Nombre] [Email] [Botón pill].
   Mobile : Título grande en 2 líneas, inputs y botón apilados a
            ancho completo. */

.n5-newsletter {
  background: #D9D9D9;
  padding: 72px 24px;
  position: relative;
  overflow: hidden;
    max-width: 1280px;
    margin: 0 auto 32px auto;
    border-radius: 16px;  
}

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

.n5-newsletter__title {
  font-size: 34px;
  font-weight: 700;
  color: var(--n5-gunmetal);
  margin: 0 0 36px;
  line-height: 1.2;
}

/* Form: fila en desktop, columna en mobile */
.n5-newsletter__form {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 920px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.n5-newsletter__input {
  flex: 1 1 260px;
  min-width: 0;
  height: 64px;
  padding: 0 24px;
  border: none;
  border-radius: 12px;
  background: var(--n5-bg-light);
  font-family: var(--n5-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--n5-gunmetal);
  outline: none;
  transition: box-shadow 0.2s ease;
  box-shadow: 0 0 0 0 transparent;
}
.n5-newsletter__input::placeholder {
  color: var(--n5-text-muted);
  opacity: 1;
}
.n5-newsletter__input:focus {
  box-shadow: 0 0 0 2px var(--n5-gunmetal);
}

.n5-newsletter__btn {
  flex: 0 0 auto;
  min-width: 240px;
  height: 64px;
  padding: 0 36px;
  background: #191D1E;
  color: var(--n5-white);
  border: none;
  border-radius: var(--n5-radius-btn);
  font-family: var(--n5-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.n5-newsletter__btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.n5-newsletter__btn:active { transform: translateY(0); }
.n5-newsletter__btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Checkbox de consentimiento (Ley 19.628 / 21.719) */
.n5-newsletter__consent {
  flex-basis: 100%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px auto 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--n5-gunmetal);
  line-height: 1.4;
  max-width: 520px;
  text-align: left;
  cursor: pointer;
}
.n5-newsletter__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--n5-gunmetal);
  cursor: pointer;
}
.n5-newsletter__consent a {
  color: var(--n5-gunmetal);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}
.n5-newsletter__consent a:hover { text-decoration: none; }

/* Mensaje de éxito/error (oculto si vacío) */
.n5-newsletter__msg {
  flex-basis: 100%;
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--n5-gunmetal);
  min-height: 0;
}
.n5-newsletter__msg.is-error   { color: #c0392b; }
.n5-newsletter__msg.is-success { color: #2c8b4f; }
.n5-newsletter__msg:empty { display: none; }

/* ── Tablet ── */
@media (max-width: 1023px) {
  .n5-newsletter { padding: 60px 24px; }
  .n5-newsletter__title { font-size: 30px; }
  .n5-newsletter__btn { min-width: 220px; }
}

/* ── Mobile ── */
@media (max-width: 781px) {
  .n5-newsletter {
    padding: 48px 24px 56px;
    border-radius: 0;
  }
  .n5-newsletter__title {
    font-size: 28px;
    margin: 0 0 28px;
    line-height: 1.25;
  }
  .n5-newsletter__form {
    flex-direction: column;
    gap: 14px;
    max-width: 480px;
  }
  .n5-newsletter__input,
  .n5-newsletter__btn {
    width: 100%;
    flex: 0 0 auto;
    min-width: 0;
    height: 64px;
  }
  .n5-newsletter__btn {
    margin-top: 6px;
  }
}

/* === FOOTER ======================================================
   Desktop: 4 columnas (Brand · Empresa · Ayuda · Servicios+Chile)
            con todos los links visibles (sin acordeón).
   Mobile : Brand arriba con logo/tagline/IG. Debajo 3 acordeones
            (Empresa, Ayuda, Servicios). "Somos parte de" + Chile
            al final, antes del copyright. */

.n5-footer {
  background: var(--n5-white);
  padding: 64px 80px 24px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}

/* ── Columna brand ── */
.n5-footer__col { min-width: 0; }
.n5-footer__brand { padding-right: 16px; }
.n5-footer__logo {
  width: 130px;
  height: auto;
  display: block;
  margin: 0 0 18px;
}
.n5-footer__tagline {
  font-size: 14px;
  font-weight: 400;
  color: var(--n5-erie-black);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 0 22px;
}
.n5-footer__social {
  display: flex;
  gap: 12px;
}
.n5-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1.5px solid rgba(17, 37, 48, 0.15);
  border-radius: 50%;
  color: var(--n5-gunmetal);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.n5-footer__social a:hover {
  background: var(--n5-gunmetal);
  color: var(--n5-white);
  border-color: var(--n5-gunmetal);
}

/* ── Columnas de links (Empresa / Ayuda / Servicios) ── */
.n5-footer__nav-col { display: flex; flex-direction: column; gap: 16px; }

.n5-footer__acc-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: none;
  border: none;
  cursor: default; /* desktop: no es botón funcional */
  width: 100%;
  text-align: left;
}
.n5-footer__acc-btn span:first-child {
  font-size: 14px;
  font-weight: 700;
  color: var(--n5-gunmetal);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.n5-footer__acc-icon {
  display: none; /* sólo se muestra en mobile */
}

.n5-footer__acc-content {
  /* En desktop siempre visible */
  max-height: none;
  overflow: visible;
}
.n5-footer__acc-content ul {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.n5-footer__acc-content ul li a {
  font-size: 14px;
  color: var(--n5-erie-black);
  font-weight: 400;
  transition: color 0.2s ease;
}
.n5-footer__acc-content ul li a:hover { color: var(--n5-gunmetal); text-decoration: underline; }

/* ── Bloque "Somos parte de" + Chile ── */
.n5-footer__partner {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.n5-footer__partner-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--n5-gunmetal);
  margin: 0;
}
.n5-footer__partner-logo {
  width: 96px;
  height: auto;
  border: 1.5px solid #E11d2c;
  border-radius: 4px;
  display: block;
}

/* ── Divider + copyright ── */
.n5-footer__copyright-wrap {
  background: var(--n5-white);
  padding: 0 80px 32px;
}
.n5-footer__divider {
  border: none;
  border-top: 1px solid rgba(17, 37, 48, 0.12);
  margin: 0 0 28px;
}
.n5-footer__copyright {
  text-align: center;
  font-size: 14px;
  font-weight: 400;
  color: var(--n5-text-muted);
  margin: 0;
  line-height: 1.57;
}

/* ── Tablet ── */
@media (max-width: 1023px) {
  .n5-footer { padding: 56px 32px 24px; gap: 32px; }
  .n5-footer__copyright-wrap { padding: 0 32px 28px; }
}

/* ── Mobile ── */
@media (max-width: 781px) {
  .n5-footer {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 48px 24px 0;
  }
  .n5-footer__brand { padding-right: 0; margin-bottom: 32px; }
  .n5-footer__logo { width: 130px; margin-bottom: 22px; }
  .n5-footer__tagline { max-width: 100%; }

  /* Acordeones activos en mobile */
  .n5-footer__nav-col {
    gap: 0;
    border-bottom: 1px solid rgba(17, 37, 48, 0.12);
  }
  .n5-footer__nav-col:first-of-type {
    border-top: 1px solid rgba(17, 37, 48, 0.12);
  }
  .n5-footer__acc-btn {
    cursor: pointer;
    padding: 22px 0;
  }
  .n5-footer__acc-btn span:first-child {
    font-size: 16px;
    letter-spacing: 1.5px;
  }
  .n5-footer__acc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--n5-gunmetal);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: var(--n5-gunmetal);
    flex-shrink: 0;
    transition: transform 0.3s ease;
  }
  .n5-footer__acc-btn.is-open .n5-footer__acc-icon {
    transform: rotate(45deg);
  }
  .n5-footer__acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .n5-footer__acc-content.is-open {
    max-height: 600px;
    padding-bottom: 18px;
  }
  .n5-footer__acc-content ul { margin-top: 4px; gap: 16px; }

  /* "Somos parte de" se muestra fuera del último acordeón */
  .n5-footer__partner {
    margin: 32px 0;
  }
  .n5-footer__partner-logo { width: 130px; }

  .n5-footer__copyright-wrap { padding: 24px; }
  .n5-footer__divider { display: none; }
}

/* === RESPONSIVE: TABLET / DESKTOP === */
@media (min-width: 768px) {
  .n5-hero__title {
    font-size: 48px;
  }
  .n5-hero__subtitle {
    font-size: 28px;
  }
  .n5-hero__tag {
    font-size: 20px;
  }
  .n5-perfiles__title,
  .n5-productos__title,
  .n5-minerales__title,
  .n5-testimonios__heading {
    font-size: 36px;
  }
  /* (regla legacy de instagram eliminada — el grid se controla en su
     propia sección con breakpoints max-width 1023px y 781px) */
}

@media (min-width: 1200px) {
  .n5-hero {
    min-height: 700px;
  }
  .n5-hero__content {
    padding: 64px 80px;
    max-width: 700px;
  }
  .n5-hero__title {
    font-size: 60px;
  }
  .n5-perfiles__scroll {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: visible;
    padding: 0 80px;
    justify-content: center;
  }
  .n5-card {
    flex: 1;
  }
  .n5-productos__grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
    max-width: 962px;
    margin: 0 auto;
  }
  .n5-instagram__grid {
    grid-template-columns: repeat(6, 1fr);
  }
  /* (regla legacy del footer eliminada — ahora el grid de 4 columnas
     se controla en su propia sección con sus propios breakpoints) */
}

/* === Bloque "Suscripciones próximamente" ==========================
   Card informativa que se muestra antes del shortcode de planes
   mientras la integración Transbank/BlueX no está lista. */
.n5-plans-coming-soon {
  background: var(--n5-bg-light);
  border: 1.5px solid rgba(17, 37, 48, 0.10);
  border-radius: var(--n5-radius-card);
  padding: 32px 28px;
  margin: 0 auto 32px;
  max-width: 720px;
  text-align: center;
}
.n5-plans-coming-soon h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--n5-gunmetal);
  margin: 0 0 12px;
  line-height: 1.3;
}
.n5-plans-coming-soon p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--n5-erie-black);
  margin: 0 0 10px;
}
.n5-plans-coming-soon p:last-child {
  margin-bottom: 0;
  font-size: 13px;
  color: var(--n5-text-muted);
}
.n5-plans-coming-soon a {
  color: var(--n5-gunmetal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.n5-plans-coming-soon a:hover {
  text-decoration: none;
  opacity: 0.85;
}

@media (max-width: 781px) {
  .n5-plans-coming-soon {
    padding: 24px 20px;
    margin-inline: 16px;
  }
  .n5-plans-coming-soon h3 { font-size: 18px; }
  .n5-plans-coming-soon p  { font-size: 14px; }
}

/* === UTILIDADES ====================================================
   Reusables para construir landings nuevas manteniendo el ritmo del
   home (espaciados, anchos máximos, paddings responsivos). */

/* Sección con padding vertical consistente.
   Variantes: --sm, --lg, --flush (sin padding-top/bottom) */
.n5-section {
  padding: var(--n5-section-y) var(--n5-section-x);
  position: relative;
}
.n5-section--sm { padding-block: 48px; }
.n5-section--lg { padding-block: 112px; }
.n5-section--flush-top    { padding-top: 0; }
.n5-section--flush-bottom { padding-bottom: 0; }
.n5-section--alt    { background: var(--n5-bg-light); }
.n5-section--dark   { background: var(--n5-gunmetal); color: var(--n5-white); }
.n5-section--gray   { background: #D9D9D9; }

@media (max-width: 781px) {
  .n5-section {
    padding: var(--n5-section-y-mobile) var(--n5-section-x-mobile);
  }
  .n5-section--sm { padding-block: 36px; }
  .n5-section--lg { padding-block: 72px; }
}

/* Contenedor centrado con ancho máximo */
.n5-container {
  max-width: var(--n5-container);
  margin-inline: auto;
  width: 100%;
}
.n5-container--wide   { max-width: var(--n5-container-wide); }
.n5-container--narrow { max-width: 880px; }
.n5-container--text   { max-width: 720px; } /* legibilidad de párrafos largos */

/* Header de sección estándar (titulo + bajada centrada) */
.n5-section__head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}
.n5-section__title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--n5-gunmetal);
  margin: 0 0 12px;
}
.n5-section__subtitle {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  color: var(--n5-text-muted);
  line-height: 1.5;
  margin: 0;
}

/* Stack (espaciado vertical entre hijos) */
.n5-stack > * + * { margin-top: 16px; }
.n5-stack--lg > * + * { margin-top: 32px; }

/* Espaciador entre secciones cuando se necesite */
.n5-spacer-y { height: var(--n5-section-y); }
@media (max-width: 781px) { .n5-spacer-y { height: var(--n5-section-y-mobile); } }

/* Focus visible accesible global */
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--n5-gunmetal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Legacy (compatibilidad con HTML viejo) */
.n5-section-padding {
  padding: 48px 16px;
}

.n5-text-center { text-align: center; }
.n5-text-gunmetal { color: var(--n5-gunmetal); }
.n5-text-white { color: var(--n5-white); }
.n5-text-muted { color: var(--n5-text-muted); }

.n5-fw-regular { font-weight: 400; }
.n5-fw-medium  { font-weight: 500; }
.n5-fw-semibold { font-weight: 600; }
.n5-fw-bold    { font-weight: 700; }
.n5-fw-extrabold { font-weight: 800; }

/* === Contenedor "Vende Nueve.5" – fondo gris + arcos decorativos ===
   Envuelve el shortcode de CF7 en un Grupo con clase "formulario-vende".
   Los círculos decorativos se generan con ::before / ::after. */
.formulario-vende {
  position: relative;
  overflow: hidden;
  background: #D9D9D9;
  border-radius: var(--n5-radius-img); /* 32px */
  padding: clamp(40px, 6vw, 80px) clamp(24px, 5vw, 80px);
  isolation: isolate;
  max-width: 1200px !important;
  margin: 0 auto;
}

/* Arco superior izquierdo */
.formulario-vende::before {
  content: '';
  position: absolute;
  top: -180px;
  left: -180px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.55);
  z-index: -1;
  pointer-events: none;
}

/* Arco inferior derecho */
.formulario-vende::after {
  content: '';
  position: absolute;
  bottom: -200px;
  right: -200px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 6px solid rgba(255, 255, 255, 0.55);
  z-index: -1;
  pointer-events: none;
}

/* El contenido (título + form) por encima de los arcos */
.formulario-vende > * {
  position: relative;
  z-index: 1;
}

@media (max-width: 781px) {
  .formulario-vende {
    border-radius: 20px;
    padding: 40px 20px;
    width: calc(100% - 32px);
  }
  .formulario-vende::before { top: -120px; left: -120px; width: 240px; height: 240px; }
  .formulario-vende::after  { bottom: -140px; right: -140px; width: 280px; height: 280px; }
}

/* === CONTACT FORM 7 – Formulario "Vende Nueve.5" ==================
   Estructura: campos blancos redondeados sobre fondo gris claro,
   placeholders en vez de labels, botón pill negro centrado.
   Para usarlo, envuelve los campos en <div class="n5-contact-form">
   dentro del editor de CF7. */

.n5-contact-form {
  max-width: 640px;
  margin: 0 auto;
}

/* CF7 puede meter todos los campos en UN solo <p> separados por <br>.
   Convertimos ese <p> en una columna flex y ocultamos los <br>. */
.n5-contact-form p {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}
.n5-contact-form br {
  display: none;
}

/* Labels: ocultas visualmente pero accesibles para lectores de pantalla */
.n5-contact-form label {
  display: block;
  font-size: 0; /* oculta el texto del label, deja sólo el input */
}

/* Cada wrapper de campo ocupa el ancho completo */
.n5-contact-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

/* Inputs, select y textarea */
.n5-contact-form .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  height: 60px;
  padding: 0 22px;
  border: none;
  border-radius: 12px;
  background: var(--n5-bg-light);
  font-family: var(--n5-font);
  font-size: 16px;
  font-weight: 500;
  color: var(--n5-gunmetal);
  outline: none;
  box-shadow: 0 0 0 1.5px rgba(17, 37, 48, 0.06);
  transition: box-shadow 0.2s ease;
}
.n5-contact-form textarea.wpcf7-form-control {
  height: auto;
  min-height: 120px;
  padding: 18px 22px;
  resize: vertical;
  line-height: 1.5;
}
.n5-contact-form .wpcf7-form-control:focus {
  box-shadow: 0 0 0 2px var(--n5-gunmetal);
}
.n5-contact-form .wpcf7-form-control::placeholder {
  color: var(--n5-text-muted);
  opacity: 1;
  font-weight: 500;
}

/* Select: placeholder gris + flecha custom */
.n5-contact-form select.wpcf7-form-control {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2352525B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  padding-right: 48px;
  cursor: pointer;
}
/* Primera opción (first_as_label) en color placeholder */
.n5-contact-form select.wpcf7-form-control option[value=""] {
  color: var(--n5-text-muted);
}

/* Botón submit – pill negro centrado */
.n5-contact-form .wpcf7-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  min-width: 240px;
  height: 60px;
  margin-top: 8px;
  padding: 0 40px;
  background: var(--n5-btn-primary);
  color: var(--n5-white);
  border: none;
  border-radius: var(--n5-radius-btn);
  font-family: var(--n5-font);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.n5-contact-form .wpcf7-submit:hover  { opacity: 0.92; transform: translateY(-1px); }
.n5-contact-form .wpcf7-submit:active { transform: translateY(0); }

/* El botón es un flex-item del <p>; lo centramos con align-self */
.n5-contact-form .wpcf7-submit {
  align-self: center;
}

/* Spinner de envío */
.n5-contact-form .wpcf7-spinner {
  margin: 0 auto;
}

/* Mensajes de validación */
.n5-contact-form .wpcf7-not-valid-tip {
  color: #c0392b;
  font-size: 13px;
  font-weight: 500;
  margin-top: 6px;
  font-family: var(--n5-font);
}
.n5-contact-form .wpcf7-form-control.wpcf7-not-valid {
  box-shadow: 0 0 0 2px #c0392b;
}

/* Respuesta global del formulario (éxito / error) */
.wpcf7-response-output {
  border-radius: 12px !important;
  border: none !important;
  padding: 14px 18px !important;
  font-family: var(--n5-font);
  font-size: 14px;
  font-weight: 500;
  margin: 20px auto 0 !important;
  max-width: 640px;
}
.wpcf7 form.sent .wpcf7-response-output    { background: #E6F4EA; color: #1E6738; }
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output  { background: #FBE7E7; color: #8A2020; }

/* Mobile */
@media (max-width: 781px) {
  .n5-contact-form .wpcf7-form-control:not(.wpcf7-submit) {
    height: 56px;
    font-size: 15px;
  }
  .n5-contact-form .wpcf7-submit { width: 100%; align-self: stretch; }
}

/* === WP BLOCK OVERRIDES === */
.wp-block-cover__inner-container {
  padding: 0;
}

.wp-block-button__link {
  
  font-family: var(--n5-font) !important;
  font-weight: 600 !important;
  padding: 18px 24px !important;
}

.wp-block-details summary {
  font-size: 18px;
  font-weight: 600;
  color: var(--n5-gunmetal);
  cursor: pointer;
}

.wp-block-details summary::marker {
  content: '';
}
/* EXTRA */
@media (max-width: 781px) {
  .porque-viva .porque-beneficios > div{
    padding-left: 0 !important;
    padding-right: 0 !important;
  }  
  .porque-viva .porque-txt-img{
    flex-wrap: wrap;
    padding: 0 16px !important;
  }
  .porque-viva .porque-txt-img > div:first-child{
    order: 2;
  }
  .porque-viva .porque-txt-img > div:first-child img{
    max-width: 90%;
    margin: 16px auto;    
  }
  .vende-txt p{
    max-width: 80%;
  }
  .vende-beneficios{
    padding-top: 0 !important;
  }
  .vende-beneficios > div{
    flex-wrap: wrap;
    padding: 0 16px;
  }
  .vende-beneficios > div h3{
    margin-top: 32px;
    padding-top: 32px;
  }
  .vende-beneficios .vende-beneficios-icons > div{
    flex-wrap: wrap;
  }
  .vende-beneficios .vende-beneficios-icons > div > div{
    margin: 16px auto;
    align-items: center;
  }
  .vende-confian{
    margin-bottom:  32px;
  }
  .vende-confian > div:last-child > div{
    flex-flow: row wrap;
    justify-content: space-around;
    flex-direction: column;
  }
  .vende-confian > div:last-child > div > div{ 
    width:auto;
    margin: 16px 0;
    padding: 0 !important;
  }  
}
/* PDP */
body.single-product main .wp-block-woocommerce-product-meta{
  display: none;
}
body.single-product main .wp-block-post-excerpt__excerpt{
  line-height: 28px;
  padding:16px 0 32px 0;
  width:85%;
}
body.single-product main .wc-block-components-product-price{
  font-weight: 700;
  padding: 8px 0;
}
@media (max-width: 781px) {
  body.single-product main .wp-block-post-excerpt__excerpt{
    width:100%;
  }
}