/* =========================================================
   Núcleo Clínico — tienda
   Página clara para que el logo mande. Un solo gesto memorable:
   el trazo de electrocardiograma de la portada.
   ========================================================= */
:root {
  --lino: #fbf7f5;       /* fondo general */
  --blanco: #ffffff;
  --rosa: #f7e6e2;       /* hojas del logo: superficies suaves */
  --rosa-2: #eed4cd;
  --rojo: #c3161f;       /* rojo Núcleo: acciones */
  --rojo-2: #a1111a;
  --vino: #4b0b12;       /* textos de énfasis */
  --tinta: #1d1517;      /* texto */
  --tinta-2: #4a3f42;
  --gris: #786b6e;
  --linea: #ece2de;
  --ok: #2f6b4a;
  --err: #b3261e;

  --f: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-marca: 'Cinzel', Georgia, serif;

  --t-xs: .8125rem;
  --t-sm: .9375rem;
  --t-md: 1.0625rem;
  --t-lg: clamp(1.2rem, 1.1rem + .4vw, 1.4rem);
  --t-xl: clamp(1.75rem, 1.35rem + 1.6vw, 2.6rem);
  --t-hero: clamp(2.5rem, 1.35rem + 5vw, 5.25rem);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 26px;
  --sombra: 0 1px 2px rgba(75, 11, 18, .05), 0 12px 32px -18px rgba(75, 11, 18, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--lino); color: var(--tinta);
  font-family: var(--f); font-size: var(--t-md); line-height: 1.55;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.05; text-wrap: balance; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); letter-spacing: -.01em; line-height: 1.2; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--rojo); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--tinta); color: #fff; padding: .6rem 1rem; border-radius: var(--r-s); }
.skip:focus { left: 1rem; top: 1rem; }
.muted { color: var(--gris); }
.link { background: none; border: 0; padding: 0; color: var(--rojo); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
section[id] { scroll-margin-top: 76px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: .7rem 1.3rem; border: 1.5px solid var(--tinta); border-radius: 999px;
  background: var(--tinta); color: #fff; font-size: var(--t-sm); font-weight: 600; letter-spacing: -.005em;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn:hover { background: var(--vino); border-color: var(--vino); }
.btn--red { background: var(--rojo); border-color: var(--rojo); }
.btn--red:hover { background: var(--rojo-2); border-color: var(--rojo-2); }
.btn--ghost { background: transparent; color: var(--tinta); border-color: var(--rosa-2); }
.btn--ghost:hover { background: var(--rosa); color: var(--vino); border-color: var(--rosa-2); }
.btn--sm { min-height: 40px; padding: .5rem 1rem; }
.btn--lg { min-height: 54px; font-size: var(--t-md); }
.btn--block { display: flex; width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- Encabezado: el logo, protagonista ---------- */
.top {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--lino) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.top.is-scrolled { border-bottom-color: var(--linea); box-shadow: 0 6px 20px -16px rgba(75, 11, 18, .4); }
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--tinta); }
.brand__mark { width: auto; height: 52px; }
.brand__txt { display: grid; line-height: 1; }
.brand__txt b { font-family: var(--f-marca); font-weight: 700; font-size: 1.45rem; letter-spacing: .04em; text-transform: uppercase; }
.brand__txt small { font-size: .66rem; font-weight: 500; letter-spacing: .5em; text-transform: uppercase; color: var(--gris); margin-top: .32rem; padding-left: .12em; }
.nav { display: none; gap: 2rem; font-size: var(--t-sm); font-weight: 500; }
.nav a { text-decoration: none; color: var(--tinta-2); padding-block: .4rem; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--rojo); border-bottom-color: var(--rojo); }
@media (min-width: 860px) { .nav { display: flex; } }
@media (max-width: 420px) {
  .brand__mark { height: 44px; }
  .brand__txt b { font-size: 1.2rem; }
  .top__cta { display: none; }
}

/* ---------- Portada ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(2rem, 6vw, 5rem) clamp(5.5rem, 10vw, 8rem); }
.hero__grid { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: var(--t-hero); font-weight: 800; letter-spacing: -.035em; line-height: .98; max-width: 13ch; color: var(--tinta); }
.hero__lead { margin-top: 1.25rem; font-size: var(--t-lg); line-height: 1.45; color: var(--tinta-2); max-width: 44ch; }

.hsearch {
  position: relative; display: flex; align-items: center; gap: .5rem; margin-top: 1.75rem; max-width: 560px;
  padding: .4rem .4rem .4rem 1rem; background: var(--blanco); border: 1.5px solid var(--linea); border-radius: 999px;
  box-shadow: var(--sombra); transition: border-color .2s, box-shadow .2s;
}
.hsearch:focus-within { border-color: var(--rojo); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rojo) 14%, transparent), var(--sombra); }
.hsearch svg { flex: 0 0 20px; width: 20px; height: 20px; fill: none; stroke: var(--gris); stroke-width: 2; stroke-linecap: round; }
.hsearch input { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; font-size: var(--t-md); outline: none; }
.hsearch input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hsearch .btn { flex: 0 0 auto; }

.chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.1rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: .35rem; min-height: 40px; padding: .5rem .95rem;
  border: 1.5px solid var(--rosa-2); border-radius: 999px; background: var(--blanco);
  font-size: var(--t-sm); font-weight: 500; color: var(--tinta-2); cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--rojo); color: var(--rojo); }
.chip__n { font-size: var(--t-xs); color: var(--gris); font-variant-numeric: tabular-nums; }

/* Abanico de portadas reales */
.fan { position: relative; height: clamp(260px, 62vw, 460px); max-width: 520px; width: 100%; margin-inline: auto; }
.hoja {
  position: absolute; left: 50%; bottom: 0; width: clamp(150px, 40vw, 280px); aspect-ratio: 210 / 297;
  border-radius: 8px; background: var(--blanco); box-shadow: 0 2px 4px rgba(75, 11, 18, .06), 0 24px 48px -20px rgba(75, 11, 18, .45);
  overflow: hidden; transform-origin: 50% 110%;
  transition: transform .5s var(--ease);
}
.hoja:nth-child(1) { transform: translateX(-50%) rotate(-11deg) translateX(-28%); }
.hoja:nth-child(2) { transform: translateX(-50%) rotate(9deg) translateX(26%); }
.hoja:nth-child(3) { transform: translateX(-50%) translateY(-6%); z-index: 2; }
.fan:hover .hoja:nth-child(1) { transform: translateX(-50%) rotate(-15deg) translateX(-36%); }
.fan:hover .hoja:nth-child(2) { transform: translateX(-50%) rotate(13deg) translateX(34%); }
.hoja img, .cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Electrocardiograma: se dibuja una vez y después late discreto */
.ecg { position: absolute; left: 0; right: 0; bottom: clamp(.5rem, 3vw, 2rem); width: 100%; height: clamp(70px, 11vw, 130px); pointer-events: none; }
.ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ecg__line { stroke: var(--rosa-2); stroke-width: 2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: trazo 2.6s .25s var(--ease) forwards; }
.ecg__blip { stroke: var(--rojo); stroke-width: 2.5; stroke-dasharray: .05 .95; stroke-dashoffset: .05; opacity: 0; animation: latido 4.2s 2.6s linear infinite; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--rojo) 60%, transparent)); }
@keyframes trazo { to { stroke-dashoffset: 0; } }
@keyframes latido { 0% { stroke-dashoffset: .05; opacity: 1; } 96% { opacity: 1; } 100% { stroke-dashoffset: -.95; opacity: 0; } }

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.1fr .9fr; }
  .fan { margin: 0; justify-self: end; }
}

/* ---------- Catálogo ---------- */
.cat { padding-bottom: clamp(3rem, 7vw, 6rem); }
.cat__bar { position: sticky; top: 76px; z-index: 20; background: color-mix(in srgb, var(--lino) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-block: 1rem .75rem; border-bottom: 1px solid var(--linea); }
.cat__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cat__row h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.search { position: relative; display: block; flex: 1 1 260px; max-width: 360px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--gris); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 44px; padding: 0 1rem 0 2.6rem; border: 1.5px solid var(--linea); border-radius: 999px; background: var(--blanco); font-size: var(--t-sm); outline: none; }
.search input:focus { border-color: var(--rojo); }

.filters { margin-top: .8rem; display: grid; gap: .5rem; }
.frow, .frow__in { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); padding-bottom: 2px; }
.frow::-webkit-scrollbar, .frow__in::-webkit-scrollbar { display: none; }
.frow--sub { margin: 0; padding: 0; display: block; }
.fopt {
  flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: .35rem; min-height: 38px; padding: .45rem .9rem;
  border: 1.5px solid var(--linea); border-radius: 999px; background: var(--blanco); font-size: var(--t-sm); font-weight: 500; color: var(--tinta-2); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.fopt:hover { border-color: var(--rosa-2); color: var(--tinta); }
.fopt[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.fopt__n { font-size: var(--t-xs); opacity: .6; font-variant-numeric: tabular-nums; }
.frow--sub .fopt { min-height: 34px; padding: .3rem .8rem; font-size: var(--t-xs); }
.frow--sub .fopt[aria-pressed="true"] { background: var(--rojo); border-color: var(--rojo); }

.cat__meta { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; padding-block: 1.1rem; }
#resultado { font-size: var(--t-sm); color: var(--gris); margin-right: auto; }
.crumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.crumb { border: 1.5px solid var(--rojo); background: var(--blanco); color: var(--rojo); border-radius: 999px; padding: .2rem .7rem; font-size: var(--t-xs); font-weight: 600; cursor: pointer; }
.sort select { height: 38px; padding: 0 .9rem; border: 1.5px solid var(--linea); border-radius: 999px; background: var(--blanco); font-size: var(--t-sm); }

/* Ficha de guía: en el celular, lista compacta con la portada a la izquierda */
.grid { display: grid; gap: .9rem; }
.card {
  position: relative; display: grid; grid-template-columns: 96px 1fr; gap: 1rem; align-items: start;
  padding: .9rem; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-m);
  transition: border-color .2s, box-shadow .25s;
}
.card:hover { border-color: var(--rosa-2); box-shadow: var(--sombra); }
.cover {
  position: relative; aspect-ratio: 210 / 297; border-radius: 6px; overflow: hidden; background: var(--rosa);
  box-shadow: 0 1px 2px rgba(75, 11, 18, .08), 0 6px 14px -8px rgba(75, 11, 18, .4);
}
.cover__ph { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 10% 9%; }
.cover__ph b { font-size: .72rem; line-height: 1.15; font-weight: 700; color: var(--vino); letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cover__ph i { display: block; width: 36%; height: 3px; border-radius: 3px; background: var(--rojo); }
.cover img { position: absolute; inset: 0; opacity: 0; transition: opacity .4s; }
.cover.is-on img { opacity: 1; }
.card__body { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.card__tags { display: flex; gap: .35rem; flex-wrap: wrap; margin-bottom: .35rem; }
.tag { font-size: .75rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; background: var(--rosa); color: var(--vino); }
.tag--new { background: var(--rojo); color: #fff; }
.card h3 { font-size: 1.12rem; }
.card__esp { font-size: var(--t-xs); color: var(--gris); margin-top: .2rem; }
.card__desc { display: none; font-size: var(--t-sm); color: var(--tinta-2); margin-top: .5rem; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: .75rem; }
.price { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: var(--t-xs); font-weight: 500; color: var(--gris); margin-left: .2rem; letter-spacing: 0; }
.card__actions { display: flex; gap: .4rem; }
.card__actions .btn { min-height: 38px; padding: .4rem .9rem; }
.card__pages { font-size: var(--t-xs); color: var(--gris); }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .card { grid-template-columns: 120px 1fr; padding: 1.1rem; }
}
@media (min-width: 1000px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
  .card { grid-template-columns: 1fr; padding: 0; overflow: hidden; border-radius: var(--r-l); }
  .card .cover { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; background: var(--rosa); }
  .card .cover img { inset: 9% 16% auto; width: 68%; height: auto; aspect-ratio: 210 / 297; border-radius: 4px; box-shadow: 0 18px 30px -18px rgba(75, 11, 18, .55); transition: opacity .4s, transform .4s var(--ease); }
  .card:hover .cover img { transform: translateY(-4px) rotate(-1.5deg); }
  .card .cover__ph { inset: 9% 16% auto; height: 120%; background: var(--blanco); border-radius: 4px; padding: 9%; }
  .card .cover__ph b { font-size: 1rem; }
  .card__body { padding: 1.1rem 1.25rem 1.25rem; }
  .card h3 { font-size: 1.3rem; }
  .card__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
}
.loadmore { display: flex; justify-content: center; margin-top: 2rem; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--gris); }

/* ---------- Cómo funciona ---------- */
.how { padding-block: clamp(3.5rem, 8vw, 6rem); background: var(--blanco); border-block: 1px solid var(--linea); }
.steps { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1.5rem; counter-reset: s; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start; }
.steps__n {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 2px solid var(--rojo); color: var(--rojo); font-weight: 800; font-size: 1.25rem;
}
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--tinta-2); font-size: var(--t-sm); max-width: 38ch; }
@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .steps li { grid-template-columns: 1fr; position: relative; }
  .steps li:not(:last-child)::after { content: ""; position: absolute; top: 24px; left: 64px; right: -1rem; height: 2px; background: repeating-linear-gradient(90deg, var(--rosa-2) 0 8px, transparent 8px 14px); }
}

/* ---------- Qué incluye ---------- */
.inc { padding-block: clamp(3.5rem, 8vw, 6rem); }
.inc__grid { display: grid; gap: 2rem; align-items: center; }
.inc__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-l); }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.checks li { position: relative; padding-left: 2.1rem; font-size: var(--t-md); }
.checks li::before { content: ""; position: absolute; left: 0; top: .15em; width: 1.35rem; height: 1.35rem; border-radius: 50%; background: var(--rosa); }
.checks li::after { content: ""; position: absolute; left: .42rem; top: .42em; width: .55rem; height: .3rem; border-left: 2px solid var(--rojo); border-bottom: 2px solid var(--rojo); transform: rotate(-45deg); }
@media (min-width: 860px) { .inc__grid { grid-template-columns: 1fr 1fr; gap: 4rem; } }

/* ---------- Preguntas ---------- */
.faq { padding-block: clamp(3.5rem, 8vw, 6rem); background: var(--blanco); border-top: 1px solid var(--linea); }
.faq__grid { display: grid; gap: 1.5rem; }
.faq__head p { margin-top: .75rem; color: var(--tinta-2); }
.faq__head a { color: var(--rojo); }
.faq__list details { border-bottom: 1px solid var(--linea); }
.faq__list details:first-child { border-top: 1px solid var(--linea); }
.faq__list summary { list-style: none; cursor: pointer; padding: 1.1rem 2.25rem 1.1rem 0; font-weight: 600; position: relative; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: ""; position: absolute; right: .35rem; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--rojo); border-bottom: 2px solid var(--rojo); transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease); }
.faq__list details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq__list details p { padding: 0 2rem 1.2rem 0; color: var(--tinta-2); font-size: var(--t-sm); max-width: 62ch; }
@media (min-width: 860px) { .faq__grid { grid-template-columns: .8fr 1.2fr; gap: 4rem; } }

/* ---------- Pie ---------- */
.foot { background: var(--rosa); padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom)); }
.foot__inner { display: grid; gap: 1.25rem; font-size: var(--t-sm); }
.foot__tag { margin-top: .6rem; color: var(--vino); }
.foot__legal { color: var(--tinta-2); font-size: var(--t-xs); max-width: 52ch; }
.foot__copy { color: var(--tinta-2); font-size: var(--t-xs); display: flex; gap: 1rem; flex-wrap: wrap; }
.foot__admin { color: var(--gris); }
@media (min-width: 860px) { .foot__inner { grid-template-columns: 1fr 1.2fr auto; align-items: end; } }

/* ---------- Pago (hoja desde abajo en el celular) ---------- */
.modal {
  width: min(100% - 2rem, 460px); max-height: calc(100% - 2rem); padding: 1.75rem; border: 0; border-radius: var(--r-l);
  background: var(--blanco); color: var(--tinta); box-shadow: 0 30px 80px -20px rgba(75, 11, 18, .45); overflow-y: auto;
}
.modal::backdrop { background: rgba(29, 21, 23, .45); backdrop-filter: blur(4px); }
.modal[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal__close-form { position: absolute; top: .75rem; right: .75rem; margin: 0; }
.modal__x { width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--lino); font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--tinta-2); }
.modal__x:hover { background: var(--rosa); color: var(--vino); }
.modal h2 { font-size: 1.6rem; margin-bottom: 1.1rem; padding-right: 2.5rem; }
@media (max-width: 600px) {
  .modal--sheet { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: var(--r-l) var(--r-l) 0 0; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
  .modal--sheet[open] { animation: subir .32s var(--ease); }
  .modal--sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: var(--linea); margin: -.75rem auto 1rem; }
}
@keyframes subir { from { transform: translateY(100%); } }
.co-sum { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: center; padding: .9rem; background: var(--lino); border-radius: var(--r-m); margin-bottom: 1.25rem; }
.co-sum__cover .cover { box-shadow: 0 6px 14px -8px rgba(75, 11, 18, .45); }
.co-sum__title { font-weight: 700; line-height: 1.25; }
.co-sum__meta { font-size: var(--t-xs); color: var(--gris); margin-top: .2rem; }
.co-sum__price { font-size: 1.4rem; font-weight: 800; margin-top: .35rem; letter-spacing: -.02em; }
.field__err { display: block; color: var(--err); font-size: var(--t-sm); margin-bottom: .75rem; }
.demo-note { font-size: var(--t-xs); background: var(--rosa); padding: .75rem .9rem; border-radius: var(--r-s); margin-bottom: 1rem; }
.co-secure { display: flex; align-items: flex-start; justify-content: center; gap: .45rem; font-size: var(--t-xs); color: var(--gris); margin-top: .9rem; text-align: center; }
.co-secure svg { flex: 0 0 14px; width: 14px; height: 14px; margin-top: 2px; fill: none; stroke: currentColor; stroke-width: 2; }
.co-step[data-step="done"] .muted { margin-bottom: 1.25rem; }
.co-step[data-step="done"] .btn + .btn { margin-top: .6rem; }
.co-step[data-step="loading"] { padding: 3rem 0; text-align: center; }
.co-center { color: var(--gris); }
.spinner { width: 40px; height: 40px; margin: 0 auto 1rem; border: 3px solid var(--rosa); border-top-color: var(--rojo); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Vista previa ---------- */
.viewer { width: min(100% - 2rem, 920px); height: min(100% - 2rem, 94vh); max-height: none; padding: 0; border: 0; border-radius: var(--r-l); background: var(--lino); color: var(--tinta); box-shadow: 0 30px 80px -20px rgba(75, 11, 18, .5); overflow: hidden; }
.viewer[open] { display: flex; flex-direction: column; animation: pop .28s var(--ease); }
.viewer::backdrop { background: rgba(29, 21, 23, .55); backdrop-filter: blur(4px); }
.viewer__head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem .9rem 1.4rem; background: var(--blanco); border-bottom: 1px solid var(--linea); }
.viewer__info { min-width: 0; }
.viewer__meta { font-size: var(--t-xs); color: var(--gris); }
.viewer h2 { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer__x { margin: 0; }
.viewer__body { flex: 1; overflow-y: auto; padding: 1.25rem; -webkit-user-select: none; user-select: none; overscroll-behavior: contain; }
.viewer__pages { display: grid; gap: 1rem; max-width: 820px; margin: 0 auto; }
.vpage { position: relative; background: #fff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 12px rgba(75, 11, 18, .12); }
.vpage canvas { display: block; width: 100%; height: auto; pointer-events: none; }
.vpage::after { content: "Vista previa"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: clamp(1.5rem, 6vw, 3.5rem); color: rgba(195, 22, 31, .07); transform: rotate(-30deg); pointer-events: none; }
.viewer__status { text-align: center; padding: 3rem 1rem; color: var(--gris); }
.viewer__end { max-width: 480px; margin: 1.75rem auto .5rem; text-align: center; background: var(--blanco); border-radius: var(--r-m); padding: 1.5rem; }
.viewer__end p { margin-bottom: 1rem; color: var(--tinta-2); }
.viewer__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)) 1.4rem; background: var(--blanco); border-top: 1px solid var(--linea); }
.viewer__price { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
@media (max-width: 600px) {
  .viewer { width: 100%; height: 100%; max-width: 100%; max-height: 100%; margin: 0; border-radius: 0; }
  .viewer__body { padding: .75rem; }
}
@media print { .viewer { display: none !important; } }

/* ---------- Avisos ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--tinta); color: #fff; padding: .75rem 1.1rem; border-radius: 999px; font-size: var(--t-sm);
  transition: opacity .25s, transform .25s var(--ease); max-width: calc(100% - 2rem); text-align: center;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Página de compra ---------- */
.gracias { min-height: 100vh; display: grid; grid-template-rows: auto 1fr; }
.gracias__card { width: min(100% - var(--gutter) * 2, 520px); margin: clamp(1.5rem, 6vw, 4rem) auto; padding: clamp(1.5rem, 5vw, 2.5rem); background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--r-l); box-shadow: var(--sombra); }
.gracias__estado { font-size: var(--t-sm); font-weight: 600; color: var(--rojo); margin-bottom: .4rem; }
.gracias__card h1 { font-size: var(--t-xl); margin-bottom: 1rem; }
.gracias__card .muted { margin-bottom: 1.75rem; }
.gracias__card .btn + .btn { margin-top: .6rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .ecg__line { stroke-dashoffset: 0; }
  .ecg__blip { display: none; }
}
.card__cover-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 6px; }
@media (min-width: 1000px) { .card__cover-btn { border-radius: 0; } }

/* Ajustes de celular */
.hero__grid { grid-template-columns: minmax(0, 1fr); }
.hero__copy { min-width: 0; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); } }
@media (max-width: 639px) {
  .cat__bar { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .hsearch .btn { padding-inline: 1rem; }
  .fan { height: 250px; }
}
.co-secure { justify-content: flex-start; text-align: left; }
