/* IQ Herbal Products — estilos
   Azul y gris, limpio, con un toque de laboratorio (química natural).
   Todo el sitio usa estos "botes de pintura": cambia un color aquí y cambia en todas las páginas. */

:root {
  --brand-dark: #ffffff;     /* encabezado blanco, como clínica */
  --brand-darker: #e4f1fb;   /* barra de arriba: azul muy clarito */
  --nav-bg: #f2f8fd;         /* barra del menú: casi blanco azulado */
  --footer-bg: #eef6fc;      /* pie: azul muy clarito */
  --on-dark: #2a4058;        /* texto sobre esas barras claras */
  --ink: #14205a;            /* títulos: azul marino como la etiqueta */
  --text: #3f4b59;           /* texto normal */
  --muted: #6c7a8a;          /* texto secundario (gris) */
  --primary: #2f86cf;        /* azul cielo: botones y enlaces */
  --primary-dark: #2672b3;
  --primary-soft: #eaf4fc;   /* azul muy clarito */
  --teal: #9ccbf0;           /* azul pastel para detalles */
  --teal-soft: #f3f8fc;
  --accent: #8fc3ee;         /* azul claro: detalles */
  --accent-text: #2672b3;
  --accent-soft: #f4f8fc;    /* fondo de productos */
  --accent-on-primary: #eaf4fc;
  --hero-line: #b4d4ef;      /* líneas de las moléculas */
  --tint: #eef8fe;           /* fondo de secciones */
  --bg: #dcf0fc;             /* azul cielo clarito, como la etiqueta del producto */
  --sky: #cde9fa;
  --serif: "Times New Roman", Tinos, Times, Georgia, serif; /* letra de títulos */
  --surface: #ffffff;
  --line: #e2ebf3;
  --success: #1e7a46;
  --danger: #a33a3a;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 700; line-height: 1.12; margin: 0 0 .5em; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.sr, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(28px, 4.5vw, 60px) 0; }
.section--tint { background: var(--tint); }
.section__head { max-width: 640px; margin-bottom: 22px; }
.section__head p { color: var(--muted); font-size: 1.08rem; }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.measure { max-width: 68ch; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 8px; border: 1.5px solid var(--primary);
  background: var(--primary); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--primary); }
.btn--ghost:hover { background: var(--primary-soft); color: var(--primary-dark); }
.btn--small { padding: 8px 14px; font-size: .92rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Barra superior y encabezado (estilo tienda en línea) */
.topbar { background: var(--brand-darker); color: var(--on-dark); font-size: .85rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.topbar a { color: var(--on-dark); text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; color: var(--primary-dark); }
.topbar__links { display: flex; gap: 18px; }

.header { background: var(--brand-dark); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; }
.header__inner { display: flex; align-items: center; gap: 20px; min-height: 80px; }
.brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.brand__mark { width: auto; height: 58px; }

.header-search { flex: 1; display: flex; max-width: 620px; margin-inline: auto; }
.header-search input { border: 1px solid #c9d9e8; border-right: 0; border-radius: 8px 0 0 8px; background: var(--tint); padding: 12px 14px; min-width: 0; }
.header-search input:focus { outline: 3px solid var(--accent); outline-offset: 0; }
.header-search button { flex-shrink: 0; width: 52px; border: 0; border-radius: 0 8px 8px 0; background: var(--primary); color: #fff; cursor: pointer; display: grid; place-items: center; }
.header-search button:hover { background: var(--primary-dark); }
.header-search svg { width: 22px; height: 22px; }

.header-link, .cart-link { display: flex; align-items: center; gap: 8px; color: var(--on-dark); text-decoration: none; font-weight: 600; font-size: .92rem; padding: 8px 10px; border-radius: 8px; white-space: nowrap; }
.header-link:hover, .cart-link:hover { background: var(--primary-soft); color: var(--primary-dark); }
.header-link svg, .cart-link svg { width: 24px; height: 24px; flex-shrink: 0; }
.cart-link { position: relative; }
.cart-link__count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--primary); color: #fff; font-size: .76rem; font-weight: 700; display: grid; place-items: center;
}

.nav { background: var(--nav-bg); border-bottom: 1px solid var(--line); }
.nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin-block: 0; padding: 0; }
.nav a { display: block; padding: 10px 12px; font-size: .9rem; font-weight: 600; color: var(--on-dark); text-decoration: none; }
.nav a:hover { color: var(--primary-dark); background: var(--primary-soft); }
.nav a[aria-current="page"] { color: var(--primary-dark); box-shadow: inset 0 -3px 0 var(--primary); }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  .header__inner { flex-wrap: wrap; gap: 10px 14px; padding: 10px 0 12px; min-height: 0; }
  .brand__mark { height: 46px; }
  .header-search { order: 5; flex-basis: 100%; max-width: none; }
  .header-link span, .cart-link__label { display: none; }
  .header-link { margin-left: auto; }
  .nav-toggle {
    display: grid; place-items: center; width: 44px; height: 44px;
    background: none; border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 20px; height: 2px; background: var(--on-dark); position: relative; content: "";
  }
  .nav-toggle__bars::before { position: absolute; top: -6px; }
  .nav-toggle__bars::after { position: absolute; top: 6px; }
  .nav { display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; padding: 6px 0 12px; }
  .nav a { padding: 12px 8px; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: 14px; }
}
@media (max-width: 520px) {
  .topbar__inner > span:first-child { display: none; }
  .topbar__inner { justify-content: center; }
}

.notice { background: var(--primary-soft); border-left: 4px solid var(--primary); padding: 12px 16px; margin: 20px 0 0; border-radius: 4px; color: var(--ink); }
.notice--error { background: #fbeaea; border-color: var(--danger); }

/* Hero: la fórmula de IQ */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 48px); align-items: center; padding: clamp(24px, 4.5vw, 56px) 0; }
.formula { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: clamp(2rem, 4.8vw, 3.8rem); line-height: 1.1; margin: 0 0 28px; letter-spacing: -.01em; }
.formula span { display: block; }
.formula .op { color: var(--accent); font-style: normal; display: inline-block; width: .8em; }
.formula .result { font-weight: 700; color: var(--primary); margin-top: .12em; }
.hero__text { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 28px; }
.hero__art { position: relative; aspect-ratio: 4 / 5; max-height: 520px; width: 100%; border-radius: 20px; background: linear-gradient(160deg, #f4f7fb 0%, var(--primary-soft) 55%, #dfe8f4 100%); overflow: hidden; }
.hero__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero__badge {
  position: absolute; left: 20px; bottom: 20px; right: 20px; border-radius: 12px; padding: 16px 18px;
  display: flex; gap: 14px; align-items: center; color: var(--ink);
  /* Blanco difuminado: deja ver la foto detrás, borrosa */
  background: rgba(255, 255, 255, .55); border: 1px solid rgba(255, 255, 255, .6);
  -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 8px 24px rgba(11, 20, 70, .12);
}
.hero__badge strong { font-family: var(--serif); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--primary); }
.hero__badge span { font-size: .95rem; line-height: 1.35; }
@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__art { aspect-ratio: 16 / 10; max-height: 360px; }
}

/* Franja de garantías */
.facts { background: var(--primary-soft); color: var(--ink); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.facts ul { list-style: none; margin: 0; padding: 22px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.facts li { display: flex; gap: 12px; align-items: center; font-size: .95rem; line-height: 1.35; }
.facts svg { width: 26px; height: 26px; flex-shrink: 0; color: var(--primary); }
@media (max-width: 1100px) { .facts ul { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .facts ul { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .facts ul { grid-template-columns: 1fr; } }

/* Tarjetas de producto */
.grid { display: grid; gap: 24px; }
.grid--products { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 16px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 250px)); justify-content: center; gap: 22px; }
@media (max-width: 1000px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 640px) { .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; }
.pcard__link { display: block; text-decoration: none; color: inherit; padding: 0 14px; flex: 1; }
.pcard__link:hover .pcard__name { color: var(--primary); text-decoration: underline; }
.pvisual { position: relative; aspect-ratio: 1; overflow: hidden; margin: 0 -14px 12px; background: #fff; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.pvisual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.pvisual--art svg { width: 70%; height: auto; }
.pcard__cat { font-size: .82rem; color: var(--accent-text); font-weight: 600; }
.pcard__name { font-size: .96rem; line-height: 1.3; margin: 2px 0 6px; transition: color .15s; }
.pcard__desc { font-size: .88rem; color: var(--muted); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.pcard__out { font-size: .9rem; color: var(--muted); }
.price { font-weight: 700; color: var(--ink); font-size: 1.02rem; }

/* Soluciones por necesidad */
.needs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.need {
  display: block; padding: 26px 24px; text-decoration: none; color: inherit; background: var(--surface);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background-color .15s;
}
.need:hover { background: var(--accent-soft); color: inherit; }
.need h3 { margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.need h3 small { font-family: "Public Sans", sans-serif; font-size: .82rem; color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.need p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 860px) { .needs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .needs { grid-template-columns: 1fr; } }

/* Comunidad: tres puertas */
.doors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.community { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.community__img { display: block; width: 100%; height: auto; border-radius: 16px; box-shadow: 0 10px 30px rgba(20, 40, 80, .12); }
.community h2 { margin-top: 0; }
.quote.quote--sm { font-size: clamp(1.02rem, 1.3vw, 1.2rem); line-height: 1.5; margin: 18px 0 24px; padding-left: 18px; }
.community--photo { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); }
.community--photo .community__img { aspect-ratio: 1; object-fit: cover; }
.community__head { margin-bottom: 20px; text-align: left; }
.community__head h2 { margin: 0 0 8px; }
.community__head p { margin: 0; }
.doors--stack { grid-template-columns: 1fr; gap: 16px; }
@media (max-width: 860px) { .community, .community--photo { grid-template-columns: 1fr; gap: 20px; } .community__img { border-radius: 12px; max-height: 320px; object-fit: cover; object-position: 50% 100%; } .community--photo .community__img { aspect-ratio: auto; width: 100%; object-position: 50% 12%; } }
.wa-num { display: inline-flex; align-items: center; gap: 8px; }
.wa-num__icon { flex: none; }
.door { padding: 30px 28px; border-radius: 14px; background: var(--surface); border-top: 4px solid var(--primary); display: flex; flex-direction: column; }
.door:nth-child(2) { border-top-color: var(--accent); }
.door:nth-child(3) { border-top-color: var(--teal); }
.door p { color: var(--muted); flex: 1; }
.door a { font-weight: 600; }
@media (max-width: 860px) { .doors { grid-template-columns: 1fr; } }

/* Bloques de dos columnas */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.quote { font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 2.3vw, 1.75rem); line-height: 1.4; color: var(--ink); border-left: 4px solid var(--accent); padding-left: 24px; margin: 0; }

/* Encabezado de página interior */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding: clamp(20px, 3.5vw, 40px) 0 clamp(16px, 2.5vw, 26px); }
.page-head h1 { margin-bottom: 10px; }
.page-head p { color: var(--muted); font-size: 1.12rem; max-width: 62ch; margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }

/* Principios (Nosotros) */
.principles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.principles li { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.principles h3 { font-size: 1.25rem; color: var(--primary); }
.principles p { color: var(--muted); font-size: .95rem; margin: 0; }
.mv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mv > div { background: var(--surface); padding: 28px; border-radius: 14px; border: 1px solid var(--line); }
@media (max-width: 760px) { .mv { grid-template-columns: 1fr; } }
/* Nosotros */
.about-intro { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; justify-content: center; }
.about-video video { display: block; width: 100%; height: auto; max-height: 560px; border-radius: 16px; background: #000; box-shadow: 0 12px 32px rgba(20, 40, 80, .18); }
.about-video { position: relative; }
.about-sound { position: absolute; top: 12px; left: 12px; z-index: 2; border: 0; border-radius: 999px; padding: 8px 14px; background: rgba(10, 25, 60, .75); color: #fff; font-weight: 600; font-size: .9rem; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.about-sound:hover { background: rgba(10, 25, 60, .9); }
.about-sound[hidden] { display: none; }
.about-formula { font-size: clamp(1.8rem, 3.6vw, 2.9rem); margin: 0; }
.about-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.about-cols article { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.about-cols img { width: 100%; height: 240px; object-fit: cover; object-position: 50% 30%; display: block; }
.about-cols h2 { font-size: 1.3rem; margin: 18px 20px 8px; }
.about-cols p { margin: 0 20px 22px; color: var(--muted); font-size: .97rem; }
.principles--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 20px; }
.principles--5 li { padding-right: 0; }
.principles--5 h3 { font-size: 1.1rem; }
.about-cta { text-align: center; margin-top: 28px; }
@media (max-width: 1000px) { .principles--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .about-intro { grid-template-columns: 1fr; }
  .about-video { max-width: 360px; margin: 0 auto; width: 100%; }
  .about-formula { text-align: center; }
  .about-cols { grid-template-columns: 1fr; }
  .about-cols img { height: 200px; }
}
@media (max-width: 560px) { .principles--5 { grid-template-columns: 1fr; } }

/* Catálogo */
.catalog { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 32px; align-items: start; }
.catalog > * { min-width: 0; }
.filters { position: sticky; top: 148px; max-height: calc(100vh - 164px); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.filters__toggle { display: none; }
.filters small { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 4px; }
.filters h2 { font-size: 1.1rem; margin: 16px 0 8px; }
.filters h2:first-child { margin-top: 0; }
.filters ul { list-style: none; margin: 0; padding: 0; }
.filters a { display: block; padding: 6px 8px; margin: 0 -8px; border-radius: 6px; text-decoration: none; color: var(--text); font-size: .95rem; }
.filters a:hover { background: var(--tint); }
.filters a[aria-current="true"] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.filters__title > a { font-weight: 700; color: var(--ink); }
.filters__subs { margin: 0 0 6px 10px !important; padding-left: 8px !important; border-left: 2px solid var(--line); }
.filters__subs a { font-size: .9rem; padding: 4px 8px; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.subcats a { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-decoration: none; font-size: .95rem; }
.subcats a:hover { border-color: var(--primary); }
.subcats a[aria-current="true"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.search { display: flex; gap: 8px; margin-bottom: 24px; }
.search input { flex: 1; }
.catalog__meta { color: var(--muted); margin-bottom: 18px; }
@media (max-width: 860px) {
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .filters { position: static; max-height: none; overflow: visible; padding: 0; }
  .filters__toggle { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; }
  .filters__toggle::-webkit-details-marker { display: none; }
  .filters__toggle::after { content: "▾"; transition: transform .2s; }
  .filters[open] .filters__toggle::after { transform: rotate(180deg); }
  .filters[open] { padding-bottom: 14px; }
  .filters > h2, .filters > ul { margin-left: 16px; margin-right: 16px; }
  .filters ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .filters a { margin: 0; border: 1px solid var(--line); }
  .subcats { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-bottom: 14px; scrollbar-width: thin; }
  .subcats a { white-space: nowrap; flex: none; padding: 6px 14px; }
}

/* Ficha de producto */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: start; padding: 40px 0 72px; }
.product .pvisual-lg { aspect-ratio: 1; border-radius: 18px; background: var(--accent-soft); display: grid; place-items: center; overflow: hidden; }
.product .pvisual-lg img { width: 100%; height: 100%; object-fit: cover; }
.product .pvisual-lg--art svg { width: 62%; }
.product__price { font-size: 1.7rem; font-weight: 700; color: var(--ink); margin: 6px 0 18px; }
.product__meta { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 22px; }
.tags a { display: inline-block; padding: 5px 12px; border-radius: 20px; background: var(--accent-soft); color: var(--ink); font-size: .88rem; text-decoration: none; }
.tags a:hover { background: var(--primary); color: #fff; }
.buy { display: flex; gap: 12px; align-items: end; margin-bottom: 24px; flex-wrap: wrap; }
.qty { width: 90px; }
.details { border-top: 1px solid var(--line); }
.details details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.details details p { margin: 10px 0 0; color: var(--muted); }
.legend { font-size: .88rem; color: var(--muted); background: var(--tint); padding: 12px 14px; border-radius: 8px; margin-top: 22px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }

/* Formularios */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
label { display: grid; gap: 6px; font-weight: 600; font-size: .93rem; color: var(--ink); }
input, select, textarea {
  width: 100%; padding: 11px 12px; font: inherit; font-weight: 400; color: var(--text);
  background: var(--surface); border: 1px solid #b9c6d4; border-radius: 8px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 4vw, 32px); }

/* Carrito y pago */
.cart { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; padding: 40px 0 72px; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--tint); }
.cart-table .num { text-align: right; white-space: nowrap; }
.cart-item { display: flex; gap: 14px; align-items: center; }
.cart-item .pvisual { width: 64px; height: 64px; aspect-ratio: auto; margin: 0; border-radius: 8px; flex-shrink: 0; }
.cart-item .pvisual--art svg { width: 80%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--danger); font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 18px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { font-size: 1.25rem; color: var(--ink); border-top: 1px solid var(--line); padding-top: 10px; }
.summary small { display: block; color: var(--muted); margin-top: 12px; }
.empty { text-align: center; padding: 72px 0; }
@media (max-width: 900px) {
  .cart { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cart-table td { border: 0; padding: 4px 16px; }
  .cart-table td:first-child { grid-column: 1 / -1; }
}
.radio { display: flex; gap: 10px; align-items: start; font-weight: 500; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; }
.radio input { width: auto; margin-top: 4px; }
.radio small { display: block; color: var(--muted); font-weight: 400; }

/* Ciencia IQ */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.glossary article { padding: 24px 0; border-top: 2px solid var(--ink); }
.glossary .latin { font-family: "Public Sans", sans-serif; font-style: italic; color: var(--accent-text); margin: -4px 0 10px; }
.glossary p { color: var(--muted); font-size: .96rem; }

/* Listas con viñeta propia */
.checks { list-style: none; padding: 0; margin: 0 0 1em; }
.checks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 9px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; }
.steps strong { color: var(--ink); display: block; }

/* Pie */
.footer { background: var(--footer-bg); color: var(--on-dark); border-top: 1px solid var(--line); margin-top: 0; font-size: .95rem; }
.footer a { color: var(--ink); text-decoration: none; }
.footer a:hover { text-decoration: underline; color: var(--primary-dark); }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1.1fr; gap: 32px; padding: 56px 0 36px; }
.footer__brand { display: flex; align-items: center; gap: 12px; font-family: "Montserrat", "Segoe UI", sans-serif; font-weight: 700; font-size: 1rem; line-height: 1.15; letter-spacing: .07em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer__brand img { height: 64px; width: auto; }
.tagline { font-family: "Montserrat", "Segoe UI", sans-serif; font-weight: 600; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-text); }
.footer__title { color: var(--ink); font-weight: 600; margin-bottom: 10px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer__social { display: flex; gap: 16px; }
.footer__legal { border-top: 1px solid var(--line); padding: 20px 0 28px; font-size: .84rem; color: var(--muted); }
.footer__legal p { margin: 0 0 6px; }
@media (max-width: 860px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer__grid { grid-template-columns: 1fr; } }

/* Flotantes */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 50; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(15, 43, 70, .25);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { color: #fff; background: #1ebe5b; }
.palette-switch {
  position: fixed; left: 16px; bottom: 18px; z-index: 50; display: flex; align-items: center; gap: 4px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 30px; padding: 4px 4px 4px 14px;
  box-shadow: 0 6px 18px rgba(15, 43, 70, .15); font-size: .85rem;
}
.palette-switch span { color: var(--muted); margin-right: 4px; }
.palette-switch button { white-space: nowrap; border: 0; background: none; padding: 7px 12px; border-radius: 20px; font: inherit; font-weight: 600; color: var(--text); cursor: pointer; }
.palette-switch button[aria-pressed="true"] { background: var(--primary); color: #fff; }

.toast {
  position: fixed; left: 50%; top: 88px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast a { color: var(--accent-on-primary); margin-left: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Ajustes para celular */
@media (max-width: 600px) {
  .grid--products { grid-template-columns: 1fr 1fr; gap: 12px; }
  .pcard__link { padding: 0 12px; }
  .pvisual { margin: 0 -12px 10px; }
  .pcard__name { font-size: .95rem; }
  .pcard__desc { display: none; }
  .pcard__foot { flex-direction: column; align-items: stretch; padding: 10px 12px 12px; gap: 8px; }
  .pcard__foot .btn { width: 100%; }
  .hero__art { aspect-ratio: 4 / 3; }
  .search { flex-wrap: wrap; }
  .search input { flex-basis: 100%; }
  .palette-switch { bottom: 84px; left: 50%; transform: translateX(-50%); right: auto; }
}

/* ---------- Compra estilo tienda en línea ---------- */
.page-head--compact { padding: 24px 0 22px; }
.page-head--compact h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); margin: 0; }

.checkout-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; font-size: .9rem; }
.checkout-steps li { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; }
.checkout-steps li + li::before { content: ""; width: 28px; height: 2px; background: var(--line); margin-right: 4px; }
.checkout-steps span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); border: 1px solid var(--line); font-size: .82rem; }
.checkout-steps .is-done span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.checkout-steps .is-current { color: var(--ink); }
.checkout-steps .is-current span { background: var(--primary); border-color: var(--primary); color: #fff; }

.pay-badges { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 12px 0 0; }
.pay-badges li { font-size: .76rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 6px; padding: 3px 8px; letter-spacing: .02em; }

/* Página de producto: fotos | información | caja de compra */
.pdp { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) 320px; gap: 32px; align-items: start; padding: 16px 0 64px; }
.pdp__gallery { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.pdp__gallery:not(:has(.thumbs)) { grid-template-columns: 1fr; }
.pdp__main { aspect-ratio: 1; border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.pdp__main { position: relative; }
.pdp__main > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pdp__main img { width: 100%; height: 100%; object-fit: contain; }
.pdp__main .pvisual-lg { width: 100%; height: 100%; display: grid; place-items: center; }
.pdp__main .pvisual-lg--art svg { width: 62%; }
.thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.thumbs button { width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); cursor: pointer; }
.thumbs button[aria-current="true"] { border: 2px solid var(--primary); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp__title { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2px 0 10px; }
.pdp__pres { color: var(--muted); }

.buybox { position: sticky; top: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 12px; }
.buybox__price { font-family: var(--serif); font-size: 2rem; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.1; }
.buybox__price small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.stock { margin: 0; font-weight: 700; }
.stock--ok { color: var(--success); }
.stock--low { color: #b45309; }
.stock--out { color: var(--danger); }
.ship-lines { list-style: none; margin: 0; padding: 12px 0; border-block: 1px solid var(--line); display: grid; gap: 6px; font-size: .92rem; }
.buybox__form { display: grid; gap: 10px; }
.buybox__safe { display: flex; gap: 10px; font-size: .88rem; color: var(--muted); background: var(--tint); border-radius: 10px; padding: 10px 12px; }
.buybox__safe svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--success); }
.buybox__ask { font-size: .9rem; font-weight: 600; }
@media (max-width: 1100px) {
  .pdp { grid-template-columns: 1fr 1fr; }
  .buybox { position: static; grid-column: 2; grid-row: 1; }
  .pdp__info { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .pdp { grid-template-columns: 1fr; }
  .buybox { grid-column: auto; grid-row: auto; }
  .pdp__gallery { grid-template-columns: 1fr; }
  .thumbs { grid-auto-flow: column; justify-content: start; order: 2; }
}

.form-title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 6px 0 0; }
.form-title span { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .9rem; }
.btn--big { padding: 16px 22px; font-size: 1.05rem; }
.btn--wa { background: #1fa855; border-color: #1fa855; }
.btn--wa:hover { background: #188a45; border-color: #188a45; }
.fine { font-size: .85rem; color: var(--muted); margin: 0; }
.summary__items { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.summary__items li { display: flex; justify-content: space-between; gap: 12px; }

.confirm { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--success); border-radius: 14px; padding: clamp(22px, 4vw, 32px); }
.confirm__code { color: var(--muted); margin-bottom: 6px; }
.confirm h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.status-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .82rem; font-weight: 700; background: var(--tint); color: var(--ink); }
.status-pill--pagado { background: #e3f2e8; color: #1f6b3d; }
.status-pill--enviado, .status-pill--entregado { background: var(--primary-soft); color: var(--primary-dark); }
.status-pill--pendiente { background: #fdf3dc; color: #7a5a0c; }
.status-pill--rechazado, .status-pill--cancelado, .status-pill--reembolsado { background: #f8e6e6; color: #8a2c2c; }

/* Mis pedidos */
.track-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.track-list { display: grid; gap: 18px; }
.order-card header { display: flex; flex-wrap: wrap; gap: 18px 28px; align-items: start; margin-bottom: 18px; }
.order-card header p { margin: 0; }
.order-card header .status-pill { margin-left: auto; }
.order-card__items { color: var(--muted); font-size: .93rem; }
.order-card__guide { background: var(--primary-soft); padding: 10px 12px; border-radius: 8px; }
.track { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 16px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.track li { position: relative; text-align: center; padding-top: 30px; }
.track li span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); z-index: 1; }
.track li::before { content: ""; position: absolute; top: 10px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.track li:first-child::before { display: none; }
.track .is-done { color: var(--ink); }
.track .is-done span { background: var(--primary); border-color: var(--primary); }
.track .is-done::before, .track .is-current::before { background: var(--primary); }
.track .is-current { color: var(--primary); }
.track .is-current span { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
@media (max-width: 860px) { .track-layout { grid-template-columns: 1fr; } }

/* Comprobante */
.receipt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.receipt-page .fine { margin-bottom: 20px; }
.receipt { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: clamp(20px, 4vw, 36px); }
.receipt__head { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: var(--primary-soft); color: var(--on-dark); margin: calc(-1 * clamp(20px, 4vw, 36px)) calc(-1 * clamp(20px, 4vw, 36px)) 24px; padding: 20px clamp(20px, 4vw, 36px); border-radius: 14px 14px 0 0; flex-wrap: wrap; }
.receipt__head img { height: 56px; width: auto; }
.receipt__head p { margin: 0; text-align: right; }
.receipt__head .receipt__label { color: var(--accent-text); }
.receipt__head .receipt__code { color: var(--ink); }
.receipt__label { font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; }
.receipt__code { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); margin: 0; }
.receipt__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 20px; }
.receipt__grid p { margin: 0; font-size: .95rem; }
.receipt__table { width: 100%; border-collapse: collapse; margin-bottom: 18px; font-size: .95rem; }
.receipt__table th, .receipt__table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.receipt__table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.receipt__table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.receipt__table tfoot td { border-bottom: 0; padding-block: 6px; }
.receipt__total td { font-weight: 700; font-size: 1.15rem; color: var(--ink); border-top: 2px solid var(--ink); padding-top: 10px; }
.receipt__foot { border-top: 1px solid var(--line); padding-top: 14px; font-size: .85rem; color: var(--muted); }
.receipt__foot p { margin: 0 0 4px; }
@media (max-width: 640px) { .receipt__grid { grid-template-columns: 1fr; } }

@media print {
  .topbar, .header, .footer, .wa-float, .no-print, .toast { display: none !important; }
  body { background: #fff; }
  .section { padding: 0; }
  .receipt { border: 0; padding: 0; }
  .receipt__head { margin: 0 0 20px; border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 760px) {
  .pdp__gallery { order: 1; }
  .buybox { order: 2; }
  .pdp__info { order: 3; }
}
.footer__social { flex-wrap: wrap; gap: 6px 16px; }
.footer__social a { white-space: nowrap; }

/* Formas de pago como tarjetas para elegir */
.pay-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pay-option { position: relative; display: grid; gap: 4px; align-content: start; padding: 16px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 500; }
.pay-option input { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; accent-color: var(--primary); }
.pay-option svg { width: 28px; height: 28px; color: var(--primary); margin-bottom: 4px; }
.pay-option strong { color: var(--ink); font-size: 1rem; }
.pay-option small { color: var(--muted); font-weight: 400; font-size: .85rem; line-height: 1.35; }
.pay-option:hover { border-color: var(--accent); }
.pay-option:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary-soft); }
.pay-option.is-off { opacity: .5; cursor: not-allowed; }
@media (max-width: 640px) { .pay-options { grid-template-columns: 1fr; } }

/* Resumen del pedido siempre a la vista y campos autocompletados sin fondo azul */
@media (min-width: 901px) { .cart .summary { position: sticky; top: 150px; } }
input:-webkit-autofill, select:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--surface) inset; -webkit-text-fill-color: var(--text); }


/* Estilo de la etiqueta IQ (Dermalift): letra Times, azul marino, detalles gris plata y fondo azul cielo con ondas */
:root {
  --ink: #0b1446;            /* títulos: azul marino casi negro */
  --text: #14205a;           /* texto normal: azul marino */
  --muted: #2f3d7a;          /* texto secundario: azul marino más claro */
  --accent-text: #3b4a8f;    /* subtítulos: azul pizarra como "INGREDIENTES" */
  --primary: #1d3b8f;        /* botones y enlaces: azul marino */
  --primary-dark: #142c70;
  --primary-soft: #e3f0fc;
  --accent: #8b95a3;         /* gris plata */
  --gold: linear-gradient(90deg, #5f6b7a 0%, #dfe3e8 50%, #5f6b7a 100%);
  --bronze: linear-gradient(180deg, #a3acb7 0%, #4f5966 55%, #8b95a3 100%);
  --hero-line: #9cc8ec;
  --bg: #f4f9fe;             /* casi blanco con un toque azul */
  --sky: #eaf4fd;
  --line: #d3e3f2;
  --font: "Times New Roman", Tinos, Times, Georgia, serif;
}
body {
  font-family: var(--font);
  font-size: 1.08rem;
  background-color: var(--bg);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='900' viewBox='0 0 1440 900' fill='none' stroke='%23a9cdec' stroke-linecap='round'%3E%3Cpath d='M-40 260C260 120 520 380 860 250S1300 60 1500 160' stroke-width='60' opacity='.07'/%3E%3Cpath d='M-40 300C260 160 520 420 860 290S1300 100 1500 200' stroke-width='3' opacity='.55'/%3E%3Cpath d='M-40 330C270 200 540 450 870 320S1300 140 1500 230' stroke-width='1.5' opacity='.45'/%3E%3Cpath d='M-40 720C320 600 600 820 940 700S1320 560 1500 640' stroke-width='90' opacity='.06'/%3E%3Cpath d='M-40 760C320 640 600 860 940 740S1320 600 1500 680' stroke-width='3' opacity='.5'/%3E%3Cpath d='M-40 790C330 680 620 880 950 770S1320 640 1500 710' stroke-width='1.5' opacity='.4'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--sky) 0, var(--bg) 700px, #eef6fd 100%);
  background-size: 1440px auto, 100% 100%;
  background-repeat: repeat-y, no-repeat;
  background-position: center top, 0 0;
}
input, select, textarea, button { font-family: var(--font); }
.need h3 small, .glossary .latin, .footer__brand, .tagline { font-family: var(--font); }
h1, h2, h3 { color: var(--ink); font-weight: 700; }
h1 { background: linear-gradient(180deg, #2a3a8a 0%, #0b1446 55%, #050a2e 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
h1 > * { -webkit-text-fill-color: currentColor; }
.hero, .page-head { background: transparent; border-bottom: 0; position: relative; }
.hero::after, .page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); opacity: .85; }
.header { border-bottom: 0; }
.nav { border-bottom: 3px solid transparent; border-image: var(--gold) 1; }
.nav a { font-size: 1rem; font-weight: 700; color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--ink); }
.topbar { font-weight: 700; }
.hero__art { background: linear-gradient(160deg, #ffffff 0%, #e2f1fd 50%, #b9dcf7 100%); border: 2px solid #c5ccd4; }
.section--tint { background: rgba(214, 233, 250, .35); }
.formula .result { background: var(--bronze); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.formula .op { color: var(--accent); }
.hero__badge strong { color: #4f5966; }
.quote { border-left-color: #9aa3ae; }
.door { border-top: 4px solid #9aa3ae; }
.btn { font-weight: 700; letter-spacing: .01em; }
.footer { border-top: 3px solid transparent; border-image: var(--gold) 1; }
.tagline { color: #5f6b7a; font-weight: 700; }
.product-card, .panel, .buybox, .door, .receipt { border-color: #d3d9e0; }

/* Compartir producto */
.share { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.share__title { font-size: .85rem; font-weight: 600; color: var(--ink); margin: 0 0 8px; }
.share__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.share__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; font-weight: 600; text-decoration: none; cursor: pointer; line-height: 1.2; }
.share__btn svg { width: 17px; height: 17px; flex: none; }
.share__btn:hover { background: var(--primary-soft); color: var(--ink); }
.share__btn--wa svg { color: #1f9e55; }
.share__btn--fb svg { color: #1a66d6; }
@media print { body { background: #fff; } }

/* Cuenta del cliente y sorpresa de primera compra */
.account-box { max-width: 580px; margin: 0 auto; }
.account__switch { text-align: center; margin: 4px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.account__switch a { font-weight: 700; }
.profile { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.account__title { font-size: 1.5rem; margin: 0; }
@media (max-width: 860px) { .profile { grid-template-columns: 1fr; } }
.gift { display: flex; gap: 12px; align-items: flex-start; background: #f1f4f7; border: 1px solid #d3d9e0; border-radius: 10px; padding: 12px 14px; color: #2e3a4f; margin: 0; }
.gift svg { width: 26px; height: 26px; flex: none; color: #6b7684; }
.gift--small { font-size: .92rem; padding: 10px 12px; margin: 10px 0; }
.gift--small svg { width: 22px; height: 22px; }
.header-link--out { padding-left: 4px; padding-right: 4px; }
@media (max-width: 1080px) {
  .header-link--out { display: none; }
  .header-link--account { margin-left: auto; }
  .header-link--account ~ .header-link { margin-left: 0; }
}
@media (max-width: 520px) {
  .header__inner { gap: 10px 4px; }
  .brand__mark { height: 40px; }
  .header-link, .cart-link { padding: 8px 6px; }
}

/* Aceptar políticas */
.accept { display: flex !important; flex-direction: row !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; font-size: .95rem; line-height: 1.45; color: var(--text); }
.accept input { width: 20px !important; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.accept a { font-weight: 700; }

/* Documentos legales */
.eyebrow { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5f6b7a; margin: 0 0 6px; }
.legal-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.legal-nav { position: sticky; top: 170px; padding: 20px; }
.legal-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legal-nav a { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.3; }
.legal-nav a:hover { background: var(--primary-soft); }
.legal-nav a[aria-current] { background: var(--primary); color: #fff; }
.legal-text { min-width: 0; }
.legal-text h2 { font-size: 1.45rem; margin: 1.6em 0 .5em; }
.legal-text h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; }
.legal-text > :first-child { margin-top: 0; }
.legal-text p { margin: 0 0 1em; text-align: justify; hyphens: auto; }
@media (max-width: 860px) { .legal-layout { grid-template-columns: 1fr; } .legal-nav { position: static; } }

/* Visitas */
.visits { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 18px 0 32px; }
.visit { background: var(--surface); border: 1px solid #d3d9e0; border-top: 4px solid #9aa3ae; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.visit h3 { margin: 0; font-size: 1.35rem; }
.visit p { margin: 0; }
.visit__date { font-weight: 700; color: #5f6b7a; text-transform: uppercase; letter-spacing: .04em; font-size: .9rem; }
.visit__hours { font-weight: 700; color: var(--ink); }
.visit .btn { margin-top: 8px; align-self: flex-start; }
.visit.is-past { opacity: .75; border-top-color: var(--line); }
.visit__done { color: var(--muted); font-style: italic; margin-top: 6px !important; }
.calendar { padding: 0; overflow: hidden; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: 12px 18px; }
.calendar__head h2 { color: #fff; -webkit-text-fill-color: #fff; margin: 0; font-size: 1.5rem; }
.calendar__head a { color: #fff; text-decoration: none; font-size: 2rem; line-height: 1; padding: 0 12px; border-radius: 8px; }
.calendar__head a:hover { background: rgba(255,255,255,.15); }
.calendar__wd .wd-s { display: none; }
@media (max-width: 700px) { .calendar__wd .wd-s { display: inline; } }
.calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar__wd { text-align: center; font-weight: 700; color: var(--ink); padding: 10px 4px; background: var(--primary-soft); border-bottom: 1px solid var(--line); font-size: .92rem; }
.calendar__day { min-height: 96px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.calendar__day:nth-child(7n) { border-right: 0; }
.calendar__num { font-weight: 700; color: var(--muted); font-size: .95rem; }
.calendar__day.is-today .calendar__num { background: var(--ink); color: #fff; border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.calendar__day.has-visit { background: #f1f4f7; }
.calendar__day.has-visit .calendar__num { color: var(--ink); }
.calendar__visit { background: var(--ink); color: #fff; border-radius: 6px; padding: 3px 6px; font-size: .8rem; font-weight: 700; line-height: 1.25; }
.calendar__visit small { display: block; font-weight: 400; opacity: .85; }
.calendar__day.is-past .calendar__visit { background: #8d97b5; }
@media (max-width: 700px) {
  .calendar__wd .wd-l { display: none; }
  .calendar__day { min-height: 58px; padding: 3px; }
  .calendar__visit { font-size: 0; padding: 0; height: 8px; border-radius: 4px; }
  .calendar__visit small { display: none; }
}

/* Cambio de idioma ES / EN */
.lang-switch { display: inline-flex; border: 1px solid rgba(20,32,90,.25); border-radius: 6px; overflow: hidden; margin-right: 6px; }
.lang-switch a { padding: 1px 8px; font-weight: 700; text-decoration: none; color: var(--ink); font-size: .8rem; }
.lang-switch a[aria-current] { background: var(--ink); color: #fff; }
.summary .discount, dd.discount { color: var(--success); font-weight: 700; }

/* Mini chat (botón de WhatsApp) */
.wa-float.is-open { background: var(--ink); }
.chat { position: fixed; right: 18px; bottom: 86px; z-index: 60; width: min(370px, calc(100vw - 24px)); height: min(540px, calc(100vh - 120px)); background: var(--surface); border-radius: 16px; box-shadow: 0 18px 50px rgba(11, 20, 70, .3); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.chat[hidden] { display: none !important; }
.chat__head { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 12px 14px; }
.chat__head strong { display: block; font-size: 1.05rem; }
.chat__head small { display: block; font-size: .78rem; opacity: .85; line-height: 1.3; }
.chat__avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; font-weight: 700; flex: none; }
.chat__close { margin-left: auto; background: none; border: 0; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.chat__body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: #eef6fd; }
.chat__msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: .95rem; line-height: 1.45; white-space: pre-line; }
.chat__msg--bot { background: #fff; color: var(--text); border-bottom-left-radius: 4px; align-self: flex-start; box-shadow: 0 1px 2px rgba(11,20,70,.08); }
.chat__msg--user { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat__msg--typing { opacity: .7; font-style: italic; }
.chat__product { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); white-space: normal; }
.chat__product:hover { background: var(--primary-soft); }
.chat__link { display: inline-block; margin-top: 6px; font-weight: 700; }
.chat__handoff { display: inline-flex; margin-top: 8px; white-space: normal; text-align: center; }
.chat__chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 10px; border-top: 1px solid var(--line); background: #fff; }
.chat__chips button { flex: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 16px; padding: 5px 11px; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.chat__chips button:hover { background: var(--primary-soft); }
.chat__chips .chat__chip--doc { border-color: #1fa855; color: #157a3d; }
.chat__form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chat__form input { flex: 1; min-width: 0; border: 1px solid #c9d9e8; border-radius: 20px; padding: 10px 14px; font: inherit; }
.chat__form button { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.chat__form button svg { width: 20px; height: 20px; }
@media (max-width: 520px) { .chat { right: 12px; bottom: 80px; height: calc(100vh - 110px); } }
@media print { .chat, .wa-float { display: none !important; } }

/* Advertencias / contraindicaciones en la ficha del producto */
.warnings { margin: 14px 0; padding: 14px 16px; background: #fff4e5; border: 1px solid #f0b46a; border-left: 5px solid #d9822b; border-radius: 10px; color: #5a3410; }
.warnings__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-weight: 700; font-size: 1.05rem; color: #8a4b0f; }
.warnings__title svg { width: 22px; height: 22px; flex: none; color: #d9822b; }
.warnings p:last-child { margin: 0; }

/* Ver contraseña y aviso de coincidencia */
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 48px; }
.pass-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; cursor: pointer; color: var(--muted); line-height: 0; }
.pass-toggle:hover { color: var(--ink); }
.pass-toggle svg { width: 22px; height: 22px; }
.pass-match { display: block; margin-top: 6px; font-size: .9rem; font-weight: 600; }
.pass-match--ok { color: var(--success); }
.pass-match--bad { color: var(--danger); }
.form__row:has(.pass-match) { align-items: start; }

/* Foto principal del inicio: en celular se ve completa (con el logo) y el recuadro de "30+" no la tapa */
@media (max-width: 860px) {
  .hero__art:has(> img) { aspect-ratio: 3 / 4; width: 100%; max-width: 480px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .hero__art:has(> img) { aspect-ratio: 3 / 4.4; }
  .hero__badge { left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; gap: 10px; }
  .hero__badge strong { font-size: 1.5rem; }
  .hero__badge span { font-size: .8rem; line-height: 1.3; }
}

/* iPhone (Safari): medidas fijas para que el video y las fotos no salgan gigantes */
@media (max-width: 860px) {
  .about-video { width: 100%; max-width: 300px; margin: 0 auto; }
  .about-video video { width: 100%; height: auto; max-height: 420px; object-fit: contain; }
  .about-cols img { width: 100%; height: 200px; max-height: 200px; object-fit: cover; }
  .community__img, .community--photo .community__img { width: 100%; height: 240px; max-height: 240px; aspect-ratio: auto; object-fit: cover; }
  .hero__art { width: 100%; height: 260px; max-height: 260px; aspect-ratio: auto; }
}
@media (max-width: 480px) {
  .about-video { max-width: 260px; }
  .about-video video { max-height: 360px; }
  .community__img, .community--photo .community__img { height: 210px; max-height: 210px; }
  .hero__art { height: 220px; max-height: 220px; }
}

/* QR de contacto */
.qr-card { display: flex; gap: 18px; align-items: center; margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.qr-card__code { width: 132px; flex: none; background: #fff; border-radius: 8px; }
.qr-card__code svg { width: 100%; height: auto; display: block; }
.qr-card p { margin: 4px 0 8px; color: var(--muted); font-size: .92rem; }
.qr-card a { font-weight: 600; font-size: .92rem; }
@media (max-width: 480px) { .qr-card { flex-direction: column; text-align: center; } }
.qr-solo { text-align: center; margin-top: 32px; }
.qr-solo__code { width: min(220px, 70%); margin: 0 auto 16px; background: #fff; padding: 14px; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 10px 28px rgba(20, 40, 80, .12); }
.qr-solo__code svg { width: 100%; height: auto; display: block; }
.qr-solo p { color: var(--muted); max-width: 34ch; margin: 0 auto 8px; }
.qr-solo a { font-weight: 600; font-size: .92rem; }

/* Ciencia IQ: portada con imagen y glosario por secciones */
.science-hero { position: relative; overflow: hidden; background: #0d1a10; }
.science-hero img { display: block; width: 100%; height: clamp(260px, 42vw, 520px); object-fit: cover; object-position: 60% 50%; }
.science-hero__text { position: absolute; left: 0; right: 0; top: 0; padding-top: clamp(20px, 4vw, 48px); color: #fff; }
.science-hero__text h1 { -webkit-text-fill-color: #fff; background: none; color: #fff; margin: 0 0 8px; text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.science-hero__text p { max-width: 46ch; font-size: clamp(1rem, 1.6vw, 1.2rem); margin: 0; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.science-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,.2) 45%, rgba(0,0,0,0) 75%); pointer-events: none; }
.science-hero__text { z-index: 1; }
.glossary-title { margin: 36px 0 4px; font-size: clamp(1.2rem, 2vw, 1.5rem); scroll-margin-top: 110px; }
.glossary h4 { font-size: 1.08rem; margin: 0 0 6px; color: var(--ink); }
.glossary-nav { margin-bottom: 8px; }
@media (max-width: 860px) { .science-hero img { height: 260px; object-position: 88% 100%; } .science-hero__text p { max-width: 30ch; } }

/* Idioma dentro del encabezado (ya no hay barra de arriba) */
.lang-switch--header { flex: none; align-self: center; margin: 0 4px; }
@media (max-width: 860px) { .lang-switch--header a { padding: 1px 6px; } }

/* Categorías con subcategorías: flechita que se gira al abrirla */
.filters a.has-subs { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.filters__chev { flex: none; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); opacity: .6; transition: transform .2s; margin-right: 4px; }
.filters a.has-subs.is-open .filters__chev { transform: rotate(45deg); opacity: .9; }
