/* ==========================================================================
   TruPeptides — Sistema de diseño (grado farmacéutico)
   NO editar por agentes de página. Estilos de página van en <style> del <head>.
   ========================================================================== */

:root {
  /* Marca */
  --navy-900: #0F2547;
  --navy-700: #1B3A6B;
  --navy-500: #27497F;
  --teal-500: #1B8FA8;
  --teal-400: #2AA7C1;
  --teal-700: #0F6B80; /* teal accesible para texto en línea sobre fondo claro (>=4.5:1 AA) */
  --gold-500: #C9A227;

  /* Neutros */
  --ink: #16253B;
  --slate: #5A6B82;
  --mist: #EEF2F7;
  --paper: #F7F9FC;
  --white: #FFFFFF;
  --line: #E1E8F0;

  /* Estados */
  --green-500: #1F9D6C;
  --red-500: #C0392B;

  /* Tipografía */
  --font-head: "Montserrat", "Century Gothic", "Avenir Next", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala */
  --container: 1200px;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15,37,71,.06), 0 2px 8px rgba(15,37,71,.05);
  --shadow-md: 0 6px 24px rgba(15,37,71,.09);
  --shadow-lg: 0 18px 50px rgba(15,37,71,.14);
  --ring: 0 0 0 3px rgba(27,143,168,.85); /* anillo de foco >=3:1 sobre fondo claro (WCAG 2.4.11/1.4.11) */
  --t: .25s cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-700); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--navy-700); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy-900); line-height: 1.18; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.25em; }
li { margin-bottom: .4em; }
strong { color: var(--navy-900); font-weight: 600; }
small { font-size: .8rem; }
:focus-visible { outline: 2px solid var(--navy-700); outline-offset: 2px; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: var(--teal-400); color: #fff; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(18px, 4vw, 36px); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.bg-paper { background: var(--paper); }
.bg-mist { background: var(--mist); }
.bg-navy { background: var(--navy-900); color: #dce6f4; }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy a { color: var(--teal-400); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.measure { max-width: 68ch; }
.measure-narrow { max-width: 52ch; }
.grid { display: grid; gap: clamp(20px, 3vw, 32px); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 10px; } .gap { gap: 18px; } .gap-lg { gap: 32px; }
.wrap { flex-wrap: wrap; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Eyebrow / kickers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--teal-700);
  margin-bottom: 14px;
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--teal-500); display: inline-block; }
.eyebrow--center { justify-content: center; }
.lead { font-size: 1.2rem; color: var(--slate); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform var(--t), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
  text-align: center; line-height: 1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--navy-700); color: #fff; }
.btn-primary:hover { background: var(--navy-900); color: #fff; box-shadow: var(--shadow-md); }
.btn-teal { background: var(--teal-500); color: #fff; }
.btn-teal:hover { background: var(--teal-400); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--navy-700); border-color: var(--navy-700); }
.btn-outline:hover { background: var(--navy-700); color: #fff; }
.btn-ghost { background: var(--mist); color: var(--navy-700); }
.btn-ghost:hover { background: var(--line); color: var(--navy-900); }
.btn-lg { padding: 17px 34px; font-size: 1.05rem; }
.btn-sm { padding: 10px 18px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn-wa { background: #25D366; color: #06331b; }
.btn-wa:hover { background: #1eb958; color: #06331b; box-shadow: var(--shadow-md); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand svg { width: 34px; height: 34px; }
.brand .wordmark { font-family: var(--font-head); font-size: 1.4rem; line-height: 1; color: var(--navy-700); }
.logo-tru { font-weight: 700; }
.logo-peptides { font-weight: 400; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  font-family: var(--font-head); font-weight: 500; font-size: .95rem; color: var(--navy-900);
  padding: 9px 13px; border-radius: 8px; position: relative;
}
.main-nav a:hover { color: var(--teal-500); background: var(--paper); }
.main-nav a.active { color: var(--teal-500); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 3px; height: 2px; background: var(--teal-500); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.cart-btn {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; color: var(--navy-700); transition: background var(--t);
}
.cart-btn:hover { background: var(--mist); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--teal-500); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; font-family: var(--font-head); line-height: 1;
}
.cart-count[hidden] { display: none; }
.nav-toggle { display: none; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; color: var(--navy-700); }
.nav-toggle svg { width: 24px; height: 24px; margin: auto; }

@media (max-width: 1024px) {
  .nav-toggle { display: grid; place-items: center; }
  .main-nav {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 14px clamp(18px,4vw,36px) 26px; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); transform: translateY(-12px); opacity: 0; pointer-events: none; transition: var(--t);
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 13px 12px; font-size: 1.05rem; border-bottom: 1px solid var(--mist); }
  .main-nav a.active::after { display: none; }
  .header-cta { display: none; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, #fff 0%, var(--paper) 55%, var(--mist) 100%); }
.hero::after {
  content: ""; position: absolute; right: -12%; top: -18%; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(27,143,168,.14), transparent 62%); pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 60px); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d3deeb; }
.card-body { padding: clamp(20px, 3vw, 30px); }
.card-pad { padding: clamp(22px, 3vw, 34px); }

.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); height: 100%; }
.feature .ic { width: 54px; height: 54px; border-radius: 13px; background: var(--mist); display: grid; place-items: center; color: var(--teal-500); margin-bottom: 16px; }
.feature .ic svg { width: 28px; height: 28px; }
.feature h3 { margin-bottom: .35em; }
.feature p { color: var(--slate); margin: 0; font-size: .97rem; }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .product-grid { grid-template-columns: 1fr; } }
.product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: #d3deeb; }
.product-media { position: relative; aspect-ratio: 4/3; background: linear-gradient(160deg, var(--paper), var(--mist)); display: grid; place-items: center; padding: 22px; }
.product-media img, .product-media svg { width: auto; height: 100%; max-height: 180px; filter: drop-shadow(0 10px 18px rgba(15,37,71,.14)); }
.product-tag { position: absolute; top: 14px; left: 14px; font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-500); background: #fff; border: 1px solid var(--line); padding: 5px 10px; border-radius: 999px; }
.product-info { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.product-info h3 { margin-bottom: 2px; font-size: 1.22rem; }
.product-sub { color: var(--slate); font-size: .88rem; margin-bottom: 12px; }
.product-purity { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--green-500); margin-bottom: 14px; }
.product-purity svg { width: 15px; height: 15px; }
.product-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--mist); }
.price { font-family: var(--font-head); font-weight: 700; font-size: 1.35rem; color: var(--navy-900); }
.price small { display: block; font-family: var(--font-body); font-weight: 500; font-size: .68rem; color: var(--slate); letter-spacing: .02em; }

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; background: var(--mist); color: var(--navy-700); font-family: var(--font-head); font-weight: 600; font-size: .78rem; padding: 7px 13px; border-radius: 999px; }
.badge svg { width: 15px; height: 15px; color: var(--teal-500); }
.badge-green { background: rgba(31,157,108,.12); color: #14764f; }
.badge-gold { background: rgba(201,162,39,.14); color: #8a6f14; }
.chip { display: inline-block; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .85rem; color: var(--navy-700); }

/* ---------- Trust bar ---------- */
.trust-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(20px, 4vw, 54px); align-items: center; }
.trust-item { display: flex; align-items: center; gap: 11px; color: var(--slate); font-size: .92rem; font-weight: 500; }
.trust-item svg { width: 26px; height: 26px; color: var(--teal-500); flex-shrink: 0; }
.trust-item strong { color: var(--navy-900); }

/* ---------- Steps / process ---------- */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 26px 76px; box-shadow: var(--shadow-sm); }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: 22px; top: 24px; width: 38px; height: 38px; border-radius: 50%; background: var(--navy-700); color: #fff; font-family: var(--font-head); font-weight: 700; display: grid; place-items: center; }

/* ---------- Stats ---------- */
.stat { text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--teal-500); line-height: 1; }
.stat .lbl { color: var(--slate); font-size: .95rem; margin-top: 6px; }
.bg-navy .stat .lbl { color: #b7c6dd; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; min-width: 480px; }
table.data th, table.data td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: .95rem; }
table.data th { font-family: var(--font-head); background: var(--paper); color: var(--navy-900); font-weight: 600; }
table.data tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: var(--paper); }

/* ---------- Accordion (FAQ) ---------- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.acc-item + .acc-item { border-top: 1px solid var(--line); }
.acc-q { width: 100%; text-align: left; background: #fff; border: none; cursor: pointer; padding: 20px 24px; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--navy-900); display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.acc-q:hover { background: var(--paper); }
.acc-q .ico { flex-shrink: 0; width: 22px; height: 22px; transition: transform var(--t); color: var(--teal-500); }
.acc-q[aria-expanded="true"] .ico { transform: rotate(45deg); }
.acc-a { max-height: 0; overflow: hidden; transition: max-height var(--t); }
.acc-a-inner { padding: 0 24px 22px; color: var(--slate); }
.acc-a-inner p:last-child { margin-bottom: 0; }

/* ---------- Callouts ---------- */
.callout { border-left: 4px solid var(--teal-500); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; padding: 20px 24px; }
.callout--warn { border-left-color: var(--gold-500); background: rgba(201,162,39,.07); }
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--navy-900); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .86rem; color: var(--slate); padding-block: 16px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.breadcrumb li { display: flex; gap: 8px; align-items: center; margin: 0; }
.breadcrumb li::after { content: "›"; color: var(--slate); }
.breadcrumb li:last-child::after { content: none; }
.breadcrumb a { color: var(--slate); }
.breadcrumb a:hover { color: var(--teal-500); }
.breadcrumb [aria-current="page"] { color: var(--navy-700); font-weight: 600; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; color: var(--navy-900); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: #fff; transition: border-color var(--t), box-shadow var(--t);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal-500); box-shadow: var(--ring); outline: none; }
.field textarea { min-height: 130px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--slate); margin-top: 6px; }

/* ---------- Cart drawer ---------- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(15,37,71,.45); opacity: 0; pointer-events: none; transition: opacity var(--t); z-index: 90; }
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 92vw); background: #fff; z-index: 100;
  transform: translateX(100%); transition: transform var(--t); display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
}
.cart-drawer.open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cart-head h3 { margin: 0; }
.cart-close { background: var(--paper); border: 1px solid var(--line); border-radius: 9px; width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--navy-700); }
.cart-close:hover { background: var(--mist); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 22px; }
.cart-empty { text-align: center; color: var(--slate); padding: 48px 12px; }
.cart-empty svg { width: 60px; height: 60px; color: var(--line); margin: 0 auto 14px; }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--mist); }
.cart-line .thumb { width: 56px; height: 56px; border-radius: 10px; background: var(--paper); display: grid; place-items: center; border: 1px solid var(--line); }
.cart-line .thumb svg, .cart-line .thumb img { width: 40px; height: 40px; }
.cart-line .nm { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--navy-900); line-height: 1.25; }
.cart-line .pr { font-size: .82rem; color: var(--slate); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 6px; }
.qty button { width: 28px; height: 28px; border: none; background: var(--paper); cursor: pointer; color: var(--navy-700); font-size: 1rem; line-height: 1; }
.qty button:hover { background: var(--mist); }
.qty span { min-width: 30px; text-align: center; font-weight: 600; font-size: .9rem; }
.cart-line .rm { background: none; border: none; color: var(--slate); cursor: pointer; font-size: .78rem; padding: 4px; }
.cart-line .rm:hover { color: var(--red-500); }
.cart-line .ln-price { font-family: var(--font-head); font-weight: 700; color: var(--navy-900); font-size: .95rem; text-align: right; }
.cart-foot { border-top: 1px solid var(--line); padding: 20px 22px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; }
.cart-total .t-lbl { color: var(--slate); }
.cart-total .t-val { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--navy-900); }
.cart-note { font-size: .78rem; color: var(--slate); margin-bottom: 14px; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(37,211,102,.5);
  transition: transform var(--t), box-shadow var(--t);
}
.wa-float:hover { transform: scale(1.07); box-shadow: 0 12px 30px rgba(37,211,102,.6); }
.wa-float svg { width: 32px; height: 32px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #b9c7dd; padding-block: clamp(48px, 6vw, 72px) 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand .wordmark { color: #fff; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #b9c7dd; font-size: .93rem; }
.footer-links a:hover { color: var(--teal-400); }
.footer-contact { font-size: .93rem; line-height: 1.9; }
.footer-contact a { color: #b9c7dd; }
.pay-methods { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pay-methods span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 7px; padding: 5px 10px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.footer-disclaimer { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding: 26px 0; font-size: .8rem; color: #8ea1bd; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 20px 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; color: #8ea1bd; }
.footer-bottom a { color: #8ea1bd; }
.footer-bottom a:hover { color: var(--teal-400); }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt-1 { margin-top: 14px; } .mt-2 { margin-top: 26px; } .mt-3 { margin-top: 40px; }
.mb-1 { margin-bottom: 14px; } .mb-2 { margin-bottom: 26px; } .mb-3 { margin-bottom: 40px; }
.text-slate { color: var(--slate); } .text-teal { color: var(--teal-500); } .text-white { color: #fff; }
.hidden { display: none !important; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}
.skip-link { position: absolute; left: -999px; top: 0; background: var(--navy-900); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0; z-index: 200; }
.skip-link:focus { left: 0; color: #fff; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ===== i18n: language switch + modal ===== */
/* Única sección de este archivo escrita por el agente i18n. Conmutador
   ES/EN del header (.lang-switch) y modal de primera visita (#lang-modal,
   inyectado por assets/js/i18n.js). */

/* --- Conmutador de idioma (pill compacta en .header-actions) --- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; flex: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  font-family: var(--font-head); font-size: .76rem; font-weight: 700; letter-spacing: .05em; line-height: 1;
}
.lang-switch .active, .lang-switch a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 33px; padding: 7px 8px; border-radius: 999px; text-transform: uppercase;
}
.lang-switch .active { background: var(--navy-700); color: #fff; cursor: default; }
.lang-switch a { color: var(--slate); transition: color var(--t), background var(--t); }
.lang-switch a:hover { color: var(--navy-700); background: var(--mist); }
@media (max-width: 380px) {
  .lang-switch { padding: 2px; }
  .lang-switch .active, .lang-switch a { min-width: 29px; padding: 6px 6px; }
}

/* --- Modal de idioma (primera visita) --- */
.lang-modal-overlay {
  position: fixed; inset: 0; z-index: 300; display: flex; overflow-y: auto;
  padding: clamp(16px, 4vw, 32px); background: rgba(15,37,71,.58);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  animation: lang-modal-fade .28s ease both;
}
.lang-modal {
  margin: auto; width: min(440px, 100%); background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: clamp(26px, 5vw, 38px) clamp(22px, 5vw, 36px) clamp(24px, 5vw, 34px);
  text-align: center; position: relative; overflow: hidden;
  animation: lang-modal-pop .32s cubic-bezier(.2,.9,.3,1.15) both;
}
.lang-modal::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--navy-700), var(--teal-500) 60%, var(--teal-400));
}
.lang-modal-brand { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.lang-modal-brand svg { width: 30px; height: 30px; }
.lang-modal-wordmark { font-family: var(--font-head); font-size: 1.18rem; color: var(--navy-700); line-height: 1; }
.lang-modal-wordmark strong { font-weight: 700; color: var(--navy-700); }
.lang-modal-title { font-size: 1.34rem; margin: 0 0 .35em; }
.lang-modal-note { color: var(--slate); font-size: .88rem; margin: 0; }
.lang-modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.lang-modal-btn {
  font-family: var(--font-head); font-weight: 700; font-size: 1.04rem; color: var(--navy-700);
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 14px; cursor: pointer; line-height: 1.2;
  transition: border-color var(--t), color var(--t), background var(--t), box-shadow var(--t), transform var(--t);
}
.lang-modal-btn:hover { border-color: var(--teal-500); color: var(--teal-700); background: #fff; box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lang-modal-btn:active { transform: translateY(0); }
@media (max-width: 420px) { .lang-modal-actions { grid-template-columns: 1fr; } }
@keyframes lang-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lang-modal-pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .lang-modal-overlay, .lang-modal { animation: none; }
  .lang-modal-btn, .lang-modal-btn:hover, .lang-modal-btn:active { transform: none; }
}

/* ===== Product photos: blend the light photo background into the card ===== */
.product-media img { mix-blend-mode: multiply; filter: none; max-height: 210px; }

/* ===== Mobile: show the logo in full, large format ===== */
@media (max-width: 640px) {
  .site-header .header-inner { height: 82px; gap: 8px; }
  /* the logo is the priority — never let flexbox shrink it */
  .site-header .brand { gap: 10px; flex-shrink: 0; }
  .site-header .brand svg { width: 50px; height: 50px; flex-shrink: 0; }
  .site-header .brand .wordmark { font-size: 1.5rem; white-space: nowrap; }
  /* free up room for the larger logo */
  .site-header .header-cta { display: none; }
  .site-header .header-actions { gap: 7px; flex-shrink: 0; }
  .site-header .lang-switch { padding: 2px; }
  .site-header .lang-switch .active,
  .site-header .lang-switch a { min-width: 24px; padding: 5px 6px; font-size: .78rem; }
  .site-header .cart-btn { width: 40px; height: 40px; }
  .site-header .nav-toggle { width: 40px; height: 40px; }
}
@media (max-width: 400px) {
  .site-header .brand svg { width: 46px; height: 46px; }
  .site-header .brand .wordmark { font-size: 1.32rem; }
  .site-header .lang-switch .active,
  .site-header .lang-switch a { min-width: 22px; padding: 5px 5px; font-size: .74rem; }
}


/* ===== Buybox: $/mg, stock, crypto ===== */
.pdp-permg { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--slate); align-self: center; }
.pdp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.pdp-stock { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; color: var(--green-500); background: rgba(31,157,108,.10); border: 1px solid rgba(31,157,108,.28); padding: 4px 11px; border-radius: 999px; }
.pdp-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }
.pdp-crypto { display: inline-flex; align-items: center; font-size: .76rem; font-weight: 700; color: var(--teal-500); background: rgba(27,143,168,.08); border: 1px solid rgba(27,143,168,.24); padding: 4px 11px; border-radius: 999px; }


/* ===== Buybox: cross-sell ===== */
.pdp-crosssell { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius-sm); }
.pdp-crosssell .xs-ic { flex-shrink: 0; width: 34px; height: 34px; display: grid; place-items: center; color: var(--teal-500); }
.pdp-crosssell .xs-ic svg { width: 22px; height: 22px; }
.pdp-crosssell .xs-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.pdp-crosssell .xs-txt strong { font-size: .9rem; color: var(--navy-900); }
.pdp-crosssell .xs-txt span { font-size: .78rem; color: var(--slate); }
.pdp-crosssell .add-to-cart { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) { .pdp-crosssell { flex-wrap: wrap; } .pdp-crosssell .add-to-cart { width: 100%; } }

/* ===== Carrito: barra de envío gratis + descuento cripto ===== */
.cart-note { display: block; }
.cart-ship-label { display: block; font-size: .82rem; font-weight: 600; color: var(--slate); margin-bottom: 6px; }
.cart-ship-label.is-free { color: var(--green-500); }
.cart-progress { display: block; height: 7px; background: var(--mist); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.cart-progress-bar { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-500), var(--teal-400)); border-radius: 999px; transition: width .35s ease; }
.cart-crypto-note { display: block; font-size: .8rem; color: var(--teal-700); }
.cart-crypto-note strong { color: var(--teal-700); }


/* ===== Catálogo: orden + stock ===== */
.catalog-sort { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--slate); margin-left: 12px; }
.catalog-sort select { font-family: var(--font-body); font-size: .84rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--navy-900); cursor: pointer; }
.card-stock { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; color: var(--green-500); margin-bottom: 8px; }
.card-stock::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green-500); }


/* ===== Calculadora de reconstitución ===== */
.pep-calc { max-width: 860px; margin: 28px auto 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: clamp(20px, 3vw, 28px); }
.pep-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 700px) { .pep-calc-grid { grid-template-columns: repeat(2, 1fr); } }
.pep-calc-grid label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-head); font-weight: 600; font-size: .8rem; color: var(--navy-900); }
.pep-calc-grid input { font-family: var(--font-body); font-size: 1rem; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--navy-900); }
.pep-calc-out { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--mist); }
@media (max-width: 700px) { .pep-calc-out { grid-template-columns: repeat(2, 1fr); } }
.pc-out-item { display: flex; flex-direction: column; gap: 3px; }
.pc-out-item .k { font-size: .74rem; color: var(--slate); }
.pc-out-item .v { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--teal-700); }
.pep-calc-note { margin: 16px 0 0; font-size: .78rem; color: var(--slate); }
