/* =========================================================
   Página de productos · productos-a / -b / -c.html (js/productos.js)
   1. Base: cabecera, chips  2. Tarjeta  3. Bloque láser  4. Variantes A · B · C  5. Detalle  6. Responsive
   ========================================================= */
.pr-pag { --pr-borde: rgba(31, 26, 21, .2); --pr-linea: rgba(31, 26, 21, .1); --dorado: #F0C38A; --verde-noche: #10302A; }
.pr-pag main { overflow-x: clip; }
html.pr-sin-scroll { overflow: hidden; }
.pr { padding: 64px 0 var(--esp-seccion); }

/* ---------- 1. Base ---------- */
.pr-cab { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.pr-h1 { font-family: var(--serif); font-size: clamp(2.4rem, 4.4vw, 3.9rem); font-weight: 500; line-height: 1.04; letter-spacing: -0.04em; }
.pr-h1 em { font-style: normal; color: var(--acento-hondo); }
.pr-sub { font-size: 17px; line-height: 1.55; color: var(--texto-60); }
.pr-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pr-chips::-webkit-scrollbar { display: none; }
.pr-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 12px; border: 1.5px solid var(--pr-borde); border-radius: var(--r-pildora); background: var(--blanco); font-size: 14.5px; font-weight: 500; color: var(--texto); white-space: nowrap; transition: background-color .2s var(--curva-hover), border-color .2s var(--curva-hover), color .2s var(--curva-hover); }
.pr-chip .lucide { width: 18px; height: 18px; color: var(--verde); }
.pr-chip span { font-size: 12.5px; color: var(--texto-60); font-variant-numeric: tabular-nums; }
.pr-chip:hover { border-color: rgba(31, 26, 21, .4); }
.pr-chip[aria-pressed="true"], .pr-chip[aria-current] { border-color: var(--verde); background: var(--verde); color: var(--blanco); }
.pr-chip[aria-pressed="true"] .lucide, .pr-chip[aria-current] .lucide { color: var(--dorado); }
.pr-chip[aria-pressed="true"] span, .pr-chip[aria-current] span { color: rgba(255, 255, 255, .75); }

/* ---------- 2. Tarjeta ---------- */
.pr-grilla { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 24px; }
.pr-t { position: relative; display: flex; flex-direction: column; min-width: 0; }
.pr-t__abrir { position: relative; display: block; width: 100%; padding: 0; text-align: left; cursor: pointer; }
.pr-t__foto { display: block; overflow: hidden; aspect-ratio: 1; border-radius: 18px; background: var(--crema-2); }
.pr-t__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--curva); -webkit-user-drag: none; }
.pr-t__abrir:hover .pr-t__foto img { transform: scale(1.04); }
.pr-t__abrir:focus-visible { outline: none; }
.pr-t__abrir:focus-visible .pr-t__foto { outline: 2px solid var(--acento); outline-offset: 3px; }
.pr-t__marca { position: absolute; top: 12px; left: 12px; display: none; align-items: center; gap: 6px; height: 30px; padding: 0 12px 0 9px; border-radius: var(--r-pildora); background: var(--verde); color: var(--blanco); font-size: 12.5px; font-weight: 600; }
.pr-t__marca .lucide { width: 15px; height: 15px; color: var(--dorado); stroke-width: 2.2; }
.pr-t--en .pr-t__marca { display: inline-flex; }
.pr-t__info { display: flex; flex-direction: column; gap: 4px; flex: 1; padding-top: 14px; }
.pr-t__cat { font-size: 12.5px; font-weight: 600; color: var(--verde); }
.pr-t__nom { font-family: var(--serif); font-size: 17px; font-weight: 500; line-height: 1.3; letter-spacing: -0.02em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-t__pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; }
.pr-precio { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.pr-precio--consulta { font-family: var(--sans); font-size: 14px; font-weight: 500; color: var(--texto-60); letter-spacing: 0; }
.pr-mas { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--acento); color: var(--blanco); transition: background-color .2s var(--curva-hover); }
.pr-mas:hover { background: var(--acento-hondo); }
.pr-mas .lucide, .pr-mas svg { width: 20px; height: 20px; }
.pr-mas[aria-pressed="true"] { background: var(--verde); }
.pr-mas--wa { background: var(--crema); color: var(--texto); }
.pr-mas--wa:hover { background: var(--crema-2); }
.pr-entra > * { animation: pr-entra .45s var(--curva) both; }
.pr-entra > :nth-child(2) { animation-delay: .04s; } .pr-entra > :nth-child(3) { animation-delay: .08s; } .pr-entra > :nth-child(n+4) { animation-delay: .12s; }
@keyframes pr-entra { from { opacity: 0; transform: translateY(10px); } }
/* Esqueleto al cambiar de filtro (misma forma que la tarjeta y el mismo brillo que el blog) */
.pr-esq { display: flex; flex-direction: column; gap: 10px; }
.pr-esq__foto { display: block; aspect-ratio: 1; margin-bottom: 6px; border-radius: 18px; }
.pr-esq > i { display: block; height: 12px; border-radius: 6px; width: 40%; }
.pr-esq > i + i { height: 18px; width: 82%; }
.pr-esq__pie { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.pr-esq__pie i { display: block; width: 28%; height: 18px; border-radius: 6px; }
.pr-esq__pie b { display: block; width: 44px; height: 44px; border-radius: 50%; }
.pr-esq__foto, .pr-esq > i, .pr-esq__pie i, .pr-esq__pie b { background: linear-gradient(90deg, var(--crema) 25%, var(--crema-2) 50%, var(--crema) 75%); background-size: 200% 100%; animation: pr-brillo 1.1s linear infinite; }
@keyframes pr-brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* ---------- 3. Bloque láser (ticket alto, una sola vez) ---------- */
.pr-laser { grid-column: 1 / -1; display: flex; align-items: stretch; overflow: hidden; border-radius: 22px; background: var(--verde-noche); color: var(--blanco); }
.pr-laser__foto { flex: 0 0 34%; overflow: hidden; }
.pr-laser__foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; }
.pr-laser__txt { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; padding: 36px 44px; }
.pr-laser__t { font-family: var(--serif); font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; line-height: 1.15; letter-spacing: -0.03em; }
.pr-laser__t em { font-style: normal; color: var(--dorado); }
.pr-laser__p { font-size: 15.5px; color: rgba(255, 255, 255, .78); }
.pr-laser__p b { color: var(--blanco); font-weight: 600; }
.pr-laser .boton { margin-top: 8px; height: 48px; }

/* ---------- 4A · Grilla con filtros ---------- */
.pr--a .pr-filtros { position: sticky; top: var(--pr-nav, 64px); z-index: 20; margin-top: 36px; padding: 14px 0; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pr--a .pr-grilla { margin-top: 24px; }

/* ---------- 4B · Una fila por tipo + índice pegajoso ---------- */
.pr-indice { position: sticky; top: var(--pr-nav, 64px); z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-top: 36px; padding: 14px 0; background: rgba(255, 255, 255, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.pr-indice::-webkit-scrollbar { display: none; }
.pr-fila { margin-top: 64px; }
.pr-fila__cab { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.pr-fila__t { display: flex; align-items: center; gap: 14px; font-family: var(--serif); font-size: clamp(1.5rem, 2.3vw, 2rem); font-weight: 500; letter-spacing: -0.03em; }
.pr-fila__ico { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--verde-claro); color: var(--verde); }
.pr-fila__ico .lucide { width: 22px; height: 22px; }
.pr-fila__nav { display: flex; gap: 8px; }
.pr-fila__nav button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--crema); color: var(--texto); transition: background-color .2s var(--curva-hover), opacity .2s; }
.pr-fila__nav button:hover:not(:disabled) { background: var(--crema-2); }
.pr-fila__nav button:disabled { opacity: .35; cursor: default; }
.pr-fila__nav .lucide { width: 20px; height: 20px; }
.pr-fila--sin-nav .pr-fila__nav { visibility: hidden; }
.pr-fila__pista { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin-top: 24px; padding-bottom: 4px; outline: none; }
.pr-fila__pista::-webkit-scrollbar { display: none; }
.pr-fila__pista > * { scroll-snap-align: start; }
.pr-fila__pista.pr-arrastra { scroll-snap-type: none; cursor: grabbing; }
.pr-fila__pista.pr-arrastra * { pointer-events: none; }
.pr-fila__laser { margin-top: 64px; }
.pr-fila__laser .pr-laser { grid-column: auto; }

/* ---------- 4C · Arma tu rutina: lateral por pasos + grilla ---------- */
.pr-c__in { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 56px; align-items: start; margin-top: 48px; }
.pr-lado { position: sticky; top: calc(var(--pr-nav, 64px) + 24px); padding: 22px 16px 16px; border-radius: 24px; background: var(--crema); }
.pr-lado__t { padding: 0 10px; font-size: 13px; font-weight: 600; color: var(--texto-60); }
.pr-lado__t + .pr-lado__grupo { margin-top: 10px; }
.pr-lado__grupo + .pr-lado__t { margin-top: 22px; }
.pr-lado__grupo { display: grid; gap: 4px; }
.pr-lado__rutina { position: relative; }
.pr-lado__rutina::before { content: ""; position: absolute; left: 31px; top: 30px; bottom: 30px; width: 2px; background: rgba(33, 94, 79, .18); }
.pr-paso { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px 8px 10px; border-radius: 14px; text-align: left; transition: background-color .2s var(--curva-hover); }
.pr-paso:hover { background: rgba(255, 255, 255, .6); }
.pr-paso[aria-pressed="true"] { background: var(--blanco); }
.pr-paso__n, .pr-paso__ico { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--blanco); color: var(--verde); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-paso__ico .lucide { width: 20px; height: 20px; }
.pr-paso[aria-pressed="true"] .pr-paso__n, .pr-paso[aria-pressed="true"] .pr-paso__ico { background: var(--verde); color: var(--blanco); }
.pr-paso__txt { display: grid; flex: 1; min-width: 0; }
.pr-paso__txt b { font-size: 15.5px; font-weight: 600; }
.pr-paso__txt small { font-size: 13px; color: var(--texto-60); }
.pr-paso__c { font-size: 13px; color: var(--texto-60); font-variant-numeric: tabular-nums; }
.pr-c__cab { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.pr-c__t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 500; letter-spacing: -0.03em; }
.pr-c__paso { font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: 0; color: var(--verde); }
.pr-c__n { font-size: 14px; color: var(--texto-60); }
.pr--c .pr-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pr-sig { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; min-height: 200px; padding: 28px; border-radius: 18px; background: var(--verde-noche); color: var(--blanco); text-align: left; transition: background-color .2s var(--curva-hover); }
.pr-sig:hover { background: var(--verde-hondo); }
.pr-sig span { font-size: 14px; color: rgba(255, 255, 255, .7); }
.pr-sig b { font-family: var(--serif); font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.pr-sig .lucide { width: 26px; height: 26px; margin-top: 10px; color: var(--dorado); }

/* ---------- 5. Detalle ---------- */
.pr-det { width: min(1000px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 0; border: 0; border-radius: 28px; background: var(--blanco); color: var(--texto); overflow: hidden; }
.pr-det::backdrop { background: rgba(20, 14, 8, .5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pr-det[open] { animation: pr-entra .3s var(--curva) both; }
.pr-det__marco { position: relative; display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); max-height: calc(100dvh - 48px); }
.pr-det__cerrar { position: absolute; top: 16px; right: 16px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--crema); transition: background-color .2s var(--curva-hover); }
.pr-det__cerrar:hover { background: var(--crema-2); }
.pr-det__cerrar .lucide { width: 20px; height: 20px; }
.pr-det__foto { background: var(--crema-2); }
.pr-det__foto img { width: 100%; height: 100%; object-fit: cover; }
.pr-det__info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain; padding: 44px 44px 0; }
.pr-det__t { padding-right: 40px; font-family: var(--serif); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.03em; }
.pr-det__precio { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.pr-det__p { margin-top: 4px; font-size: 15.5px; line-height: 1.6; color: rgba(31, 26, 21, .78); }
.pr-det__ben { display: grid; gap: 8px; margin-top: 6px; padding: 0; list-style: none; }
.pr-det__ben li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.pr-det__ben .lucide { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--verde-claro); color: var(--verde); stroke-width: 2.2; }
.pr-det__rut { margin-bottom: 4px; display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; padding: 14px 16px; border-radius: 14px; background: var(--crema); font-size: 14.5px; line-height: 1.5; color: rgba(31, 26, 21, .78); }
.pr-det__rut b { color: var(--texto); font-weight: 600; }
.pr-det__rut .lucide { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--acento-hondo); }
.pr-det__acc { position: sticky; bottom: 0; z-index: 1; display: flex; gap: 10px; align-self: stretch; margin: auto -44px 0; padding: 20px 44px 28px; background: linear-gradient(rgba(255, 255, 255, 0), var(--blanco) 26%); }
.pr-det__acc .pr-det__btn { flex: 1; width: auto; }
.pr-cant { display: inline-flex; align-items: center; flex: none; gap: 2px; height: 56px; padding: 4px; border: 1.5px solid var(--pr-borde); border-radius: var(--r-pildora); background: var(--blanco); }
.pr-cant button { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--texto); transition: background-color .2s var(--curva-hover); }
.pr-cant button:hover:not(:disabled) { background: var(--crema); }
.pr-cant button:disabled { color: rgba(31, 26, 21, .25); cursor: default; }
.pr-cant .lucide { width: 18px; height: 18px; }
.pr-cant output { min-width: 28px; text-align: center; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pr-det__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; border-radius: var(--r-pildora); background: var(--acento); color: var(--blanco); font-size: 16px; font-weight: 600; transition: background-color .2s var(--curva-hover); }
.pr-det__btn:hover { background: var(--acento-hondo); }
.pr-det__btn .lucide, .pr-det__btn svg { width: 20px; height: 20px; }
.pr-det__btn--en { background: var(--verde); }
.pr-det__btn--en:hover { background: var(--verde-hondo); }
.pr-det__btn--wa { background: var(--crema); color: var(--texto); }
.pr-det__btn--wa:hover { background: var(--crema-2); }

/* ---------- 6. Responsive ---------- */
@media (max-width: 1180px) {
  .pr-grilla, .pr--c .pr-grilla { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pr-fila__pista { grid-auto-columns: calc((100% - 2 * 24px) / 3); }
  .pr-c__in { grid-template-columns: 260px minmax(0, 1fr); gap: 36px; }
  .pr--c .pr-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pr { padding-top: 36px; }
  .pr-sub { font-size: 16px; }
  .pr-grilla, .pr--c .pr-grilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .pr--a .pr-filtros, .pr-indice { margin-top: 20px; margin-inline: calc(var(--pad-x) * -1); padding-inline: var(--pad-x); }
  .pr-chips { margin-inline: calc(var(--pad-x) * -1); padding-inline: var(--pad-x); }
  .pr--a .pr-filtros .pr-chips { margin-inline: 0; padding-inline: 0; }
  .pr-fila { margin-top: 48px; }
  .pr-fila__nav { display: none; }
  .pr-fila__pista { grid-auto-columns: 62%; gap: 14px; margin-inline: calc(var(--pad-x) * -1); padding-inline: var(--pad-x); scroll-padding-inline: var(--pad-x); }
  .pr-c__in { grid-template-columns: 1fr; gap: 24px; margin-top: 24px; }
  .pr-lado { position: sticky; top: var(--pr-nav, 64px); z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-inline: calc(var(--pad-x) * -1); padding: 12px var(--pad-x); border-radius: 0; background: rgba(255, 255, 255, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .pr-lado::-webkit-scrollbar { display: none; }
  .pr-lado__t { display: none; }
  .pr-lado__grupo { display: flex; gap: 6px; margin: 0 !important; }
  .pr-lado__rutina::before { display: none; }
  .pr-paso { flex: none; width: auto; min-height: 44px; padding: 0 14px 0 4px; border: 1.5px solid var(--pr-borde); border-radius: var(--r-pildora); background: var(--blanco); }
  .pr-paso[aria-pressed="true"] { border-color: var(--verde); background: var(--verde); color: var(--blanco); }
  .pr-paso__n, .pr-paso__ico { width: 34px; height: 34px; background: var(--verde-claro); font-size: 13.5px; }
  .pr-paso[aria-pressed="true"] .pr-paso__n, .pr-paso[aria-pressed="true"] .pr-paso__ico { background: rgba(255, 255, 255, .16); color: var(--dorado); }
  .pr-paso__txt small, .pr-paso__c { display: none; }
  .pr-paso__txt b { font-size: 14.5px; white-space: nowrap; }
  .pr-sig { min-height: 0; padding: 22px; }
  .pr-laser { flex-direction: column; }
  .pr-laser__foto { flex: none; aspect-ratio: 16 / 9; }
  .pr-laser__txt { padding: 24px 22px 26px; }
  .pr-det { width: 100%; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .pr-det__marco { grid-template-columns: 1fr; max-height: 92dvh; overflow-y: auto; }
  .pr-det__foto { aspect-ratio: 4 / 3; }
  .pr-det__info { max-height: none; overflow: visible; padding: 24px 20px 0; }
  .pr-det__acc { bottom: 0; margin: 12px -20px 0; padding: 14px 20px 20px; }
  .pr-cant { height: 52px; } .pr-cant button { width: 40px; height: 40px; }
  .pr-det__btn { height: 52px; font-size: 15px; }
}
@media (max-width: 420px) {
  .pr-t__nom { font-size: 15.5px; }
  .pr-precio { font-size: 17px; }
  .pr-mas { width: 40px; height: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-entra > *, .pr-det[open] { animation: none; }
  .pr-t__foto img { transition: none; }
}

/* Espacio reservado mientras js/productos.js pinta filtros y grilla (evita el salto de diseño) */
.pr-filtros:empty { min-height: 72px; }
.pr-grilla:empty, [data-pr-secciones]:empty { min-height: 150vh; }
