/* ==========================================================================
   Pigmento Cosméticos · sistema de diseño compartido (tienda multipágina)
   Lo cargan todas las páginas. Cada página suma solo su css/PAGINA.css.

   Índice
     1. Variables               11. Tarjeta de producto, grilla y fila
     2. Base                    12. Insignias, puntos de tono, cantidad
     3. Tipografía              13. Opciones, pestañas, chips, acordeón
     4. Contenedores y utilidades 14. Banner, ventajas, avisos, vacío
     5. Botones e íconos        15. Bolsita: líneas, totales, envío
     6. Formularios             16. Paneles laterales y menú
     7. Franja de avisos        17. Aviso flotante (toast) y WhatsApp
     8. Encabezado y buscador   18. Pie
     9. Barra de secciones      19. Movimiento
    10. Migas y encabezados     20. Impresión

   Cortes: 560 · 720 · 960 · 1320 px (se diseña primero para pantallas angostas).
   ========================================================================== */

/* ───────────── 1. Variables ───────────── */
:root {
  --bg: #fff;
  --soft: #faf7f6;
  --ink: #1d1a1b;
  --ink-2: #5f5659;
  --line: #ebe4e4;
  --line-2: #d8cece;
  --pink: #c9517a;
  --wa: #1faa59;
  --wa-2: #178f4a;

  --r: 12px;
  --r-sm: 8px;
  --pill: 999px;

  --font: "Jost", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 12px 30px -14px rgba(29, 26, 27, .22);
  --shadow-lg: 0 24px 60px -20px rgba(29, 26, 27, .32);

  --gutter: clamp(1rem, 3.2vw, 2rem);   /* margen lateral de la página */
  --max: 1440px;                        /* ancho máximo del contenido */
  --gap: .6rem;                         /* separación entre tarjetas */
  --ctl: 44px;                          /* alto de campos y botones redondos */
  --strip-h: 34px;                      /* alto de la franja negra */
}

/* ───────────── 2. Base ───────────── */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;      /* navegadores sin "clip" */
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hd-h, 112px) + 14px);   /* --hd-h lo mide core.js */
}
html.is-locked { overflow: hidden; }                     /* con un panel abierto no se desplaza el fondo */
html.is-locked body { padding-right: var(--sbw, 0px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { display: block; min-height: 60vh; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { padding: 0; border: 0; background: none; cursor: pointer; }
summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
::selection { background: var(--ink); color: #fff; }

/* ───────────── 3. Tipografía ───────────── */
h1, h2, h3, h4, .h1, .h2, .h3 {
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  line-height: 1.15;
  text-wrap: balance;
}
h1, .h1 { font-size: clamp(1.5rem, 4.2vw, 2.5rem); }
h2, .h2 { font-size: clamp(1.2rem, 2.8vw, 1.7rem); }
h3, .h3 { font-size: 1rem; letter-spacing: .06em; }
h4 { font-size: .82rem; letter-spacing: .1em; }
b, strong { font-weight: 600; }
small { font-size: .82rem; }
.eyebrow { font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.lead { font-size: 1.05rem; color: var(--ink-2); max-width: 62ch; }
.fine { font-size: .8rem; line-height: 1.45; color: var(--ink-2); }
.muted { color: var(--ink-2); }
.pink { color: var(--pink); }
.link { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }

/* ───────────── 4. Contenedores y utilidades ───────────── */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap.narrow { max-width: 860px; }
.section { padding-block: clamp(2rem, 5vw, 3.6rem); }
.section.tight { padding-block: clamp(1.2rem, 3vw, 2rem); }
.section.soft, .soft { background: var(--soft); }
.center { text-align: center; }
.stack { display: grid; gap: var(--stack, 1rem); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.6rem; } .mt-4 { margin-top: 2.4rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 200; padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: var(--r-sm); transition: top .2s; }
.skip:focus { top: .5rem; }
@media (max-width: 559px) { .hide-sm { display: none !important; } }
@media (min-width: 560px) { .show-sm { display: none !important; } }

/* ───────────── 5. Botones e íconos ───────────── */
.ic { width: 1.3em; height: 1.3em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic.fill { fill: currentColor; stroke: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 46px; padding: .5rem 1.6rem;
  border: 1px solid var(--ink); border-radius: var(--pill);
  background: var(--ink); color: #fff;
  font-size: .78rem; font-weight: 500; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; text-align: center;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.btn:hover { background: #000; border-color: #000; transform: translateY(-1px); box-shadow: 0 12px 22px -14px rgba(0, 0, 0, .6); }
.btn:active { transform: scale(.98); box-shadow: none; }
.btn .ic { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.btn:hover .ic-right, .sh-link:hover .ic-right, .sr-all:hover .ic-right { transform: translateX(4px); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-wa { background: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: var(--wa-2); border-color: var(--wa-2); box-shadow: 0 12px 22px -14px rgba(23, 143, 74, .9); }
.btn-white { background: #fff; border-color: #fff; color: var(--ink); }
.btn-white:hover { background: var(--soft); border-color: var(--soft); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .7); color: #fff; }   /* sobre fondo oscuro */
.btn-ghost:hover { background: #fff; border-color: #fff; color: var(--ink); }
.btn-sm { min-height: 40px; padding: .4rem 1.2rem; font-size: .74rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn.is-off { opacity: .4; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-mini {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  min-height: 34px; padding: .3rem .95rem;
  border: 1px solid var(--ink); border-radius: var(--pill);
  background: var(--ink); color: #fff;
  font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background .25s, color .25s, transform .2s;
}
.btn-mini:hover { background: #000; }
.btn-mini:active { transform: scale(.96); }
.btn-mini.is-line { background: transparent; color: var(--ink); }
.btn-mini.is-line:hover { background: var(--ink); color: #fff; }

/* Botón redondo con ícono */
.ibtn {
  position: relative; flex: none; display: inline-grid; place-items: center;
  width: var(--ctl); height: var(--ctl); border-radius: 50%; color: var(--ink);
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.ibtn:hover { background: var(--soft); }
.ibtn:active { transform: scale(.93); }
.ibtn .ic { width: 23px; height: 23px; }
.ibtn.is-line { border: 1px solid var(--line-2); background: #fff; }
.ibtn.is-line:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.ibtn.sm { width: 36px; height: 36px; }
.ibtn.sm .ic { width: 18px; height: 18px; }
/* Contador sobre un ícono (bolsita, favoritos) */
.ibtn .count {
  position: absolute; top: 3px; right: 0; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 9px; background: var(--pink); color: #fff;
  font-size: .66rem; font-weight: 600; font-style: normal; line-height: 18px; text-align: center; letter-spacing: 0;
}
.ibtn .count.bump { animation: bump .5s var(--ease); }

/* Enlace con flecha (encabezados de sección) */
.sh-link {
  position: relative; display: inline-flex; align-items: center; gap: .4rem; padding-bottom: .2rem;
  font-size: .76rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
}
.sh-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform-origin: left; transition: transform .4s var(--ease); }
.sh-link:hover::after { transform: scaleX(.35); }
.sh-link .ic { width: 16px; height: 16px; transition: transform .3s var(--ease); }

/* ───────────── 6. Formularios ───────────── */
.field { display: grid; gap: .3rem; min-width: 0; }
.field > span { font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: var(--ctl); padding: 0 .9rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink);
  font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
.textarea { padding: .7rem .9rem; min-height: 96px; resize: vertical; }
.select {
  -webkit-appearance: none; appearance: none; padding-right: 2.3rem; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d1a1b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .75rem center; background-size: 15px;
}
.select.pill { border-radius: var(--pill); padding-left: 1.1rem; font-size: .9rem; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 26, 27, .08); }
/* Interruptor */
.switch { position: relative; display: inline-flex; align-items: center; gap: .6rem; font-size: .9rem; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { position: relative; flex: none; width: 40px; height: 22px; border-radius: var(--pill); background: var(--line-2); transition: background .25s; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.switch input:checked + .switch-ui { background: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ───────────── 7. Franja de avisos ───────────── */
#pig-header { position: sticky; top: calc(-1 * var(--strip-h)); z-index: 60; }   /* la franja se va con el scroll; el resto queda fijo */
#pig-header:empty { min-height: 196px; }   /* reserva el lugar hasta que core.js arma el encabezado */
.strip { height: var(--strip-h); background: var(--ink); color: #fff; font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.strip-in { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.strip-msgs { position: relative; height: 100%; overflow: hidden; }
.strip-msgs p {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  text-align: center; line-height: 1.15; opacity: 0; transform: translateY(100%);
  transition: transform .6s var(--ease), opacity .6s;
}
.strip-msgs p.is-on { opacity: 1; transform: none; }
.strip-msgs p.is-out { opacity: 0; transform: translateY(-100%); }
.strip-links { display: none; }
.strip-links a { opacity: .78; transition: opacity .2s; }
.strip-links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* ───────────── 8. Encabezado y buscador ───────────── */
.hd { position: relative; }
.hd-main { position: relative; z-index: 2; background: #fff; }
.hd-row {
  display: grid; align-items: center; column-gap: .9rem; row-gap: .5rem; padding-block: .55rem;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  grid-template-areas: "menu logo search actions";
}
.hd-menu { grid-area: menu; display: inline-flex; align-items: center; gap: .45rem; height: var(--ctl); margin-left: -.2rem; padding: 0 .2rem; font-size: .72rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.hd-menu .ic { width: 24px; height: 24px; }
.hd-menu:hover { color: var(--pink); }
.logo { grid-area: logo; display: block; }
.logo img { height: 40px; width: auto; transition: transform .4s var(--ease); }
.logo:hover img { transform: scale(1.04); }
.hd-row .search { grid-area: search; }
.hd-actions { grid-area: actions; display: flex; align-items: center; gap: .1rem; margin-right: -.3rem; }

.search {
  position: relative; display: flex; align-items: center;
  height: var(--ctl); padding: 0 5px 0 1.05rem;
  border: 1px solid var(--line); border-radius: var(--pill); background: var(--soft);
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.search:hover { border-color: var(--line-2); }
.search:focus-within { border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(29, 26, 27, .07); }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0 .5rem 0 0; border: 0; background: transparent; font-size: 1rem; outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--ink-2); opacity: 1; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-go { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: #fff; transition: background .25s, transform .2s; }
.search-go:hover { background: #000; transform: scale(1.06); }
.search-go .ic { width: 17px; height: 17px; }
.search-panel {
  position: absolute; z-index: 5; top: calc(100% + 8px); right: 0;
  width: max(100%, min(390px, calc(100vw - 2rem))); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain;
  padding: .4rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-lg);
  animation: drop .25s var(--ease) backwards;
}
.sr { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: .45rem .5rem; border-radius: var(--r-sm); transition: background .2s; }
.sr:hover, .sr:focus-visible { background: var(--soft); }
.sr-img { width: 46px; height: 46px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.sr-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.sr-img img.cover { object-fit: cover; padding: 0; }
.sr small { display: block; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.sr b { display: block; font-size: .9rem; font-weight: 400; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr > span:last-child { font-size: .84rem; font-weight: 600; white-space: nowrap; }
.sr-brand { grid-template-columns: minmax(0, 1fr) auto; padding: .55rem .7rem; }
.sr-brand > span:last-child { font-weight: 400; color: var(--pink); }
.sr-all { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: .3rem; padding: .8rem; border-top: 1px solid var(--line); font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.sr-all .ic { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.sr-none { padding: .9rem; font-size: .92rem; color: var(--ink-2); }
.sr-none a { color: var(--pink); text-decoration: underline; text-underline-offset: 3px; }

/* ───────────── 9. Barra de secciones ───────────── */
/* Siempre visible. Si no entra, se desliza de costado y aparecen las flechas. */
.nav { position: relative; z-index: 1; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .3s; }
.hd.is-scrolled .nav { box-shadow: 0 14px 24px -22px rgba(29, 26, 27, .55); }
.nav-scroll { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-list { display: flex; width: max-content; margin-inline: auto; padding-inline: calc(var(--gutter) - .75rem); }
.nav-link {
  position: relative; display: inline-flex; align-items: center; gap: .3rem; height: 46px; padding: 0 .75rem;
  font-size: .78rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap;
  transition: color .2s;
}
.nav-link::after { content: ""; position: absolute; left: .75rem; right: .75rem; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-link:hover::after, .nav-link.is-active::after, .nav-item.is-open .nav-link::after { transform: scaleX(1); }
.nav-link .ic { display: none; width: 13px; height: 13px; stroke-width: 1.8; transition: transform .3s var(--ease); }
.nav-item.is-open .nav-link .ic { transform: rotate(180deg); }
.nav-arrow { position: absolute; top: 0; bottom: 0; z-index: 2; display: none; place-items: center; width: 36px; background: #fff; color: var(--ink); }
.nav-arrow.prev { left: 0; border-right: 1px solid var(--line); }
.nav-arrow.next { right: 0; border-left: 1px solid var(--line); }
.nav-arrow .ic { width: 16px; height: 16px; stroke-width: 1.8; }
.nav-arrow:hover { background: var(--soft); }
.nav.can-prev .nav-arrow.prev, .nav.can-next .nav-arrow.next { display: grid; }

/* Desplegables (solo ≥ 960 px; en pantallas angostas está el menú lateral) */
.dd-layer { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 5; }
.dd { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 34px 40px -34px rgba(29, 26, 27, .4); animation: drop .28s var(--ease) backwards; }
.dd-in { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 2.4rem; align-items: start; padding-block: 1.6rem 1.8rem; }
.dd-in.no-promo { grid-template-columns: minmax(0, 1fr); }
.dd-main { min-width: 0; }
.dd-title { margin-bottom: .8rem; font-size: .7rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.dd-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .15rem 1.2rem; margin: 0 -.5rem 1.1rem; }
.dd-list.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dd-list.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dd-list a { display: flex; align-items: center; gap: .75rem; min-height: 44px; padding: .4rem .5rem; border-radius: var(--r-sm); transition: background .2s; }
.dd-list a:hover, .dd-list a:focus-visible { background: var(--soft); }
.dd-thumb { flex: none; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.dd-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; transition: transform .4s var(--ease); }
.dd-thumb img.cover { object-fit: cover; padding: 0; }
.dd-list a:hover .dd-thumb img { transform: scale(1.1); }
.dd-name { min-width: 0; font-size: .96rem; line-height: 1.25; }
.dd-list i { margin-left: auto; padding-left: .5rem; font-style: normal; font-size: .76rem; color: var(--pink); }
.dd-promo { display: block; aspect-ratio: 5 / 4; border-radius: var(--r); overflow: hidden; }
.dd-promo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.dd-promo:hover img { transform: scale(1.05); }

/* ───────────── 10. Migas y encabezados ───────────── */
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); }

/* Cabecera de página interior: migas + título + bajada */
.page-head { padding-block: clamp(1rem, 2.6vw, 1.6rem); }
.page-head h1 { margin-top: .8rem; }
.page-head .lead { margin-top: .5rem; }

/* Encabezado de sección: título + bajada a la izquierda, enlace a la derecha */
.sh { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .6rem 1.2rem; margin-bottom: clamp(1rem, 2.4vw, 1.5rem); }
.sh > div { min-width: 0; }
.sh p { margin-top: .3rem; font-size: .95rem; color: var(--ink-2); }
.sh.center { flex-direction: column; align-items: center; text-align: center; }

/* ───────────── 11. Tarjeta de producto, grilla y fila ───────────── */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.card:hover, .card:focus-visible { border-color: #cdc2c3; box-shadow: var(--shadow); }
.card-media { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; }
.card-media img { width: 100%; height: 100%; transition: transform .7s var(--ease); }
.card-media img.cut { object-fit: contain; padding: 11%; }     /* recorte transparente, centrado sobre blanco */
.card-media img.cover { object-fit: cover; }                    /* foto real (labiales) */
.card:hover .card-media img { transform: scale(1.07); }
.card .badge { position: absolute; top: .55rem; left: .55rem; z-index: 2; }
.card-fav {
  position: absolute; top: .45rem; right: .45rem; z-index: 2; display: grid; place-items: center;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink);
  transition: color .2s, border-color .2s, transform .25s var(--ease);
}
.card-fav .ic { width: 17px; height: 17px; }
.card-fav:hover { border-color: var(--ink); transform: scale(1.1); }
.card-fav.is-on, [data-fav].is-on { color: var(--pink); border-color: var(--pink); }
.card-fav.is-on .ic, [data-fav].is-on .ic { fill: currentColor; animation: bump .45s var(--ease); }
.card-body { flex: 1; display: flex; flex-direction: column; gap: .2rem; padding: .55rem .75rem .8rem; }
.card-brand { font-size: .64rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.card-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.6em;
  font-size: .92rem; font-weight: 400; line-height: 1.3; letter-spacing: 0; text-transform: none; text-wrap: wrap;
}
.card-opts { display: flex; align-items: center; gap: .4rem; min-height: 1.4em; font-size: .76rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.card-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .5rem; margin-top: auto; padding-top: .35rem; line-height: 1.3; }
.card-price strong { font-size: 1.02rem; font-weight: 600; white-space: nowrap; }
.card-price s { font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
.card-price small { width: 100%; font-size: .74rem; color: var(--pink); }
.card-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  width: 100%; min-height: 38px; margin-top: .6rem; padding: 0 .5rem;
  border: 1px solid var(--ink); border-radius: var(--pill); background: var(--ink); color: #fff;
  font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.card-btn .ic { width: 15px; height: 15px; }
.card-btn:hover { background: #000; }
.card-btn:active { transform: scale(.97); }
.card-btn.is-line { background: #fff; color: var(--ink); }       /* hay que elegir una opción: lleva al producto */
.card-btn.is-line:hover { background: var(--ink); color: #fff; }
.card-btn.is-added, .btn.is-added, .btn-mini.is-added { background: var(--pink); border-color: var(--pink); color: #fff; }
/* Agotado: la foto se atenúa y el botón deja de agregar (la tarjeta sigue llevando al producto) */
.card.is-out .card-media img { opacity: .5; }
.card.is-out .card-price strong { color: var(--ink-2); }
.card-btn.is-out, .card-btn.is-out:hover { background: #fff; border-color: var(--line-2); color: var(--ink-2); }

/* Grilla: 2 · 3 · 4 · 5 columnas. Una página puede fijar otra cantidad con --cols. */
.grid { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); gap: var(--gap); }
.grid > .empty { grid-column: 1 / -1; }

/* Fila horizontal con flechas (PIG.ui.rowHTML). --per = cuántas tarjetas se ven. */
.row-wrap { position: relative; --per: 2.25; }
.row-scroll {
  display: flex; gap: var(--gap); overflow-x: auto; overflow-y: hidden;
  margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 1.1rem; scroll-padding-inline: var(--gutter);
  scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per)); min-width: 0; scroll-snap-align: start; }
.row-nav {
  position: absolute; top: calc(50% - 1.6rem); z-index: 3; display: none; place-items: center;
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; transition: opacity .3s, background .25s, color .25s, transform .25s var(--ease);
}
.row-nav.prev { left: -.55rem; }
.row-nav.next { right: -.55rem; }
.row-nav .ic { width: 18px; height: 18px; stroke-width: 1.8; }
.row-nav:hover { background: var(--ink); border-color: var(--ink); color: #fff; transform: scale(1.06); }
.row-wrap.can-prev .row-nav.prev, .row-wrap.can-next .row-nav.next { opacity: 1; pointer-events: auto; }

/* ───────────── 12. Insignias, puntos de tono, cantidad ───────────── */
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 .55rem; border-radius: var(--pill); background: var(--ink); color: #fff; font-size: .6rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.badge.nuevo { background: var(--pink); }
.badge.is-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.tag-may { color: var(--pink) !important; }
.dots { display: inline-flex; gap: 3px; flex: none; }
.dots i { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }

.qty { display: inline-flex; align-items: center; height: var(--ctl); border: 1px solid var(--line-2); border-radius: var(--pill); background: #fff; }
.qty button { display: grid; place-items: center; width: 40px; height: 100%; border-radius: 50%; transition: background .2s, transform .2s; }
.qty button:hover { background: var(--soft); }
.qty button:active { transform: scale(.88); }
.qty .ic { width: 14px; height: 14px; stroke-width: 1.8; }
.qty span { min-width: 1.6rem; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.qty.sm { height: 32px; }
.qty.sm button { width: 30px; }
.qty.sm span { min-width: 1.3rem; font-size: .9rem; }

/* ───────────── 13. Opciones, pestañas, chips, acordeón ───────────── */
/* Elegir tono / tamaño / formato: botones con la foto de cada opción */
.opt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: .5rem; }
.opt-btn { display: flex; align-items: center; gap: .6rem; min-width: 0; padding: .35rem .6rem .35rem .35rem; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s; }
.opt-btn img { flex: none; width: 46px; height: 46px; border-radius: 6px; object-fit: contain; }
.opt-btn img.cover { object-fit: cover; }
.opt-btn span { min-width: 0; display: grid; line-height: 1.25; }
.opt-btn b { font-size: .86rem; font-weight: 400; }
.opt-btn small { font-size: .76rem; color: var(--ink-2); }
.opt-btn:hover { border-color: var(--ink); }
.opt-btn:active { transform: scale(.98); }
.opt-btn.is-on, .opt-btn[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.opt-btn.is-on b, .opt-btn[aria-pressed="true"] b { font-weight: 500; }
/* Opción agotada: se ve, dice "Agotado" y (en la página del producto) no se puede elegir */
.opt-btn.is-out { border-style: dashed; color: var(--ink-2); }
.opt-btn.is-out img { opacity: .45; }
.opt-btn:disabled { cursor: not-allowed; }
.opt-btn:disabled:hover { border-color: var(--line-2); }
.opt-btn:disabled:active { transform: none; }

/* Chips de filtro (se deslizan de costado si no entran; .is-wrap los parte en varias líneas) */
.chips { display: flex; gap: .45rem; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chips.is-wrap { flex-wrap: wrap; overflow: visible; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 1rem;
  border: 1px solid var(--line-2); border-radius: var(--pill); background: #fff;
  font-size: .74rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  cursor: pointer; transition: background .25s, color .25s, border-color .25s;
}
.chip:hover { border-color: var(--ink); }
.chip i { font-style: normal; font-size: .7rem; color: var(--pink); }
.chip.is-on, .chip[aria-pressed="true"], .chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.is-on i, .chip[aria-pressed="true"] i, .chip[aria-selected="true"] i { color: rgba(255, 255, 255, .7); }
.chip .ic { width: 14px; height: 14px; }

/* Pestañas con subrayado */
.tabs { display: flex; gap: 1.5rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; flex: none; padding: .85rem 0; font-size: .78rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--ink-2); transition: color .2s; }
.tab::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.tab:hover, .tab.is-on, .tab[aria-selected="true"] { color: var(--ink); }
.tab.is-on::after, .tab[aria-selected="true"]::after { transform: scaleX(1); }

/* Acordeón: <div class="acc"><details><summary>Título <svg/></summary><div>…</div></details></div> */
.acc details { border-bottom: 1px solid var(--line); }
.acc details:first-child { border-top: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; list-style: none; font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; transition: color .2s; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { color: var(--pink); }
.acc summary .ic { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.acc details[open] summary .ic { transform: rotate(180deg); }
.acc details > div { display: grid; gap: .6rem; padding-bottom: 1.1rem; color: var(--ink-2); animation: rise .4s var(--ease) backwards; }
.acc details > div b { color: var(--ink); }
.acc ul { display: grid; gap: .25rem; padding-left: 1.15rem; list-style: disc; }

/* Paginación */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .35rem; }
.pager a, .pager button, .pager span { display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 .4rem; border: 1px solid var(--line); border-radius: var(--pill); font-size: .9rem; font-variant-numeric: tabular-nums; transition: background .2s, color .2s, border-color .2s; }
.pager a:hover, .pager button:hover { border-color: var(--ink); }
.pager .is-on, .pager [aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager .ic { width: 16px; height: 16px; }

/* ───────────── 14. Banner, ventajas, avisos, vacío ───────────── */
/* Banner partido: foto real + texto. .flip invierte el orden, .dark lo pone en negro. */
.banner { display: grid; grid-template-columns: minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); overflow: hidden; }
.banner-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.banner:hover .banner-media img { transform: scale(1.05); }
.banner-copy { display: grid; gap: .7rem; align-content: center; justify-items: start; padding: clamp(1.3rem, 4vw, 3rem); }
.banner-copy p:not(.eyebrow) { color: var(--ink-2); max-width: 46ch; }
.banner-copy .btn { margin-top: .4rem; }
.banner.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.banner.dark .eyebrow, .banner.dark .banner-copy p:not(.eyebrow) { color: rgba(255, 255, 255, .72); }

/* Ventajas: 4 ítems con ícono */
.usp { border-bottom: 1px solid var(--line); background: #fff; }
.usp-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.usp-item { display: flex; align-items: center; gap: .7rem; padding: .9rem .6rem .9rem 0; }
.usp-item:nth-child(even) { padding-left: .9rem; border-left: 1px solid var(--line); }
.usp-item:nth-child(n + 3) { border-top: 1px solid var(--line); }
.usp-item .ic { width: 26px; height: 26px; stroke-width: 1.3; }
.usp-item b { display: block; font-size: .76rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; line-height: 1.25; }
.usp-item span { display: block; margin-top: .1rem; font-size: .82rem; line-height: 1.3; color: var(--ink-2); }

.notice { display: flex; align-items: flex-start; gap: .7rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); font-size: .92rem; color: var(--ink-2); }
.notice .ic { width: 20px; height: 20px; margin-top: .1rem; color: var(--ink); }
.notice b { color: var(--ink); }

.empty { display: grid; justify-items: center; gap: .9rem; padding: clamp(2rem, 8vw, 4rem) 1rem; text-align: center; color: var(--ink-2); }
.empty > .ic { width: 44px; height: 44px; stroke-width: 1.1; color: var(--ink); }

/* ───────────── 15. Bolsita: líneas, totales, envío ───────────── */
.bag-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .8rem; align-items: start; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.bag-img { display: block; width: 64px; height: 64px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; overflow: hidden; }
.bag-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.bag-img img.cover { object-fit: cover; padding: 0; }
.bag-info { display: grid; gap: .1rem; min-width: 0; }
.bag-info small { font-size: .64rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.bag-info a { font-size: .92rem; line-height: 1.3; }
.bag-info a:hover { text-decoration: underline; text-underline-offset: 3px; }
.bag-info i { font-style: normal; font-size: .8rem; color: var(--ink-2); }
.bag-info .hint { margin-top: .15rem; font-size: .76rem; line-height: 1.3; color: var(--ink-2); }
/* Línea que quedó sin stock después de agregarla: hay que quitarla para poder enviar el pedido */
.bag-info .hint.is-out { font-weight: 500; color: var(--pink); }
.bag-line.is-out .bag-img img { opacity: .5; }
.bag-line.is-out .bag-side strong { color: var(--ink-2); }
.bag-side { display: grid; justify-items: end; gap: .4rem; }
.bag-side strong { font-size: .95rem; white-space: nowrap; }
.bag-del { font-size: .72rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.bag-del:hover { color: var(--pink); }

.totals { display: grid; gap: .3rem; }
.tot-line { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.tot-line.save b { font-weight: 500; color: var(--pink); }
.tot-line.total { font-size: .8rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.tot-line.total b { font-size: 1.3rem; font-weight: 600; letter-spacing: 0; }

.may-hint { padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); font-size: .86rem; line-height: 1.4; color: var(--ink-2); }
.may-hint b { color: var(--ink); }
.may-hint .bar { display: block; height: 4px; margin-top: .5rem; border-radius: 4px; background: var(--line); overflow: hidden; }
.may-hint .bar i { display: block; height: 100%; border-radius: 4px; background: var(--pink); transition: width .5s var(--ease); }

.checkout { display: grid; gap: .7rem; }
.checkout-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.checkout .fine { text-align: center; }
.checkout-warn { padding: .6rem .8rem; border: 1px solid #f0c9d6; border-radius: 10px; background: #fdf0f4; font-size: .86rem; line-height: 1.4; color: var(--ink); }

/* ───────────── 16. Paneles laterales y menú ───────────── */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(29, 26, 27, .5); opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.overlay.is-on { opacity: 1; visibility: visible; transition: opacity .35s; }
.drawer {
  position: fixed; top: 0; bottom: 0; right: 0; z-index: 100; display: flex; flex-direction: column;
  width: min(430px, 100vw); background: #fff; box-shadow: var(--shadow-lg);
  transform: translateX(104%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s;
}
.drawer.left { right: auto; left: 0; width: min(360px, 88vw); transform: translateX(-104%); }
.drawer.is-open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
.drawer-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem .6rem .6rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: .92rem; letter-spacing: .1em; }
.drawer-head h2 span { font-weight: 400; color: var(--pink); }
.drawer-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 1.2rem; }
.drawer-foot { flex: none; display: grid; gap: .7rem; padding: 1rem 1.2rem 1.1rem; border-top: 1px solid var(--line); background: #fff; }
@media (max-height: 780px) {       /* pantallas bajas: se desplaza el panel entero (el pie de la bolsita es alto) */
  .drawer { overflow-y: auto; }
  .drawer-body { flex: none; overflow: visible; }
}

/* Menú lateral (pantallas angostas) */
.drawer .menu { padding: 0 0 1rem; }
.menu-link, .menu-acc summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem 1.2rem;
  border-bottom: 1px solid var(--line); list-style: none;
  font-size: .82rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; transition: color .2s, background .2s;
}
.menu-link:hover, .menu-acc summary:hover { background: var(--soft); }
.menu-acc summary::-webkit-details-marker { display: none; }
.menu-acc summary .ic { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.menu-acc[open] summary .ic { transform: rotate(180deg); }
.menu-acc > div { display: grid; padding: .35rem 0 .6rem; border-bottom: 1px solid var(--line); background: var(--soft); animation: rise .35s var(--ease) backwards; }
.menu-acc > div a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .55rem 1.2rem .55rem 1.9rem; font-size: .96rem; transition: color .2s; }
.menu-acc > div a:hover { color: var(--pink); }
.menu-acc > div a.is-all { font-weight: 500; }
.menu i { font-style: normal; font-size: .76rem; font-weight: 400; letter-spacing: 0; color: var(--pink); }

/* ───────────── 17. Aviso flotante (toast) y WhatsApp ───────────── */
.toast {
  position: fixed; z-index: 110; left: 50%; bottom: 5.2rem; display: flex; align-items: center; gap: .8rem;
  width: min(440px, calc(100vw - 2rem)); padding: .55rem .65rem; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg);
  transform: translate(-50%, 160%); opacity: 0; visibility: hidden; transition: transform .5s var(--ease), opacity .3s, visibility 0s .5s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .5s var(--ease), opacity .3s; }
.toast img { flex: none; width: 48px; height: 48px; border-radius: var(--r-sm); background: #fff; object-fit: contain; padding: 4px; }
.toast img.cover { object-fit: cover; padding: 0; }
.toast p { flex: 1; min-width: 0; display: grid; font-size: .88rem; line-height: 1.3; }
.toast b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast span { font-size: .8rem; color: rgba(255, 255, 255, .7); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .btn-mini { flex: none; background: #fff; border-color: #fff; color: var(--ink); }
.toast .btn-mini:hover { background: var(--soft); }
.toast.is-wrap b, .toast.is-wrap span { overflow: visible; white-space: normal; text-overflow: clip; }   /* avisos largos: en dos líneas */

/* Foto que viaja a la bolsita al agregar */
.fly { position: fixed; z-index: 120; width: 84px; height: 84px; border-radius: var(--r); object-fit: contain; pointer-events: none; transition: transform .8s cubic-bezier(.5, -.15, .3, 1), opacity .8s; }
.fly.cover { object-fit: cover; }

/* Botón flotante de WhatsApp. Una página puede subirlo con --fab-lift en body. */
.wa-fab {
  position: fixed; right: 1rem; bottom: calc(1rem + var(--fab-lift, 0px)); z-index: 40; display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 12px 24px -10px rgba(23, 143, 74, .85);
  transition: transform .3s var(--ease), background .25s; animation: pop .6s var(--ease) .9s backwards;
}
.wa-fab .ic { width: 29px; height: 29px; }
.wa-fab:hover { background: var(--wa-2); transform: scale(1.08); }

/* ───────────── 18. Pie ───────────── */
.ft { margin-top: clamp(2rem, 5vw, 3.6rem); border-top: 1px solid var(--line); background: var(--soft); }
.ft-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 1.2rem; padding-block: clamp(2rem, 5vw, 3.2rem) 1.6rem; }
.ft-brand { grid-column: 1 / -1; display: grid; gap: .8rem; justify-items: start; }
.ft-brand img { height: 46px; width: auto; }
.ft-brand p { max-width: 36ch; font-size: .95rem; color: var(--ink-2); }
.ft-col { display: grid; gap: .5rem; align-content: start; justify-items: start; }
.ft-col h3 { margin-bottom: .3rem; font-size: .74rem; letter-spacing: .14em; }
.ft-col a { position: relative; font-size: .95rem; color: var(--ink-2); transition: color .2s; }
.ft-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ft-legal { padding-block: 1.1rem 1.4rem; border-top: 1px solid var(--line); font-size: .78rem; line-height: 1.5; color: var(--ink-2); }
main:has(> .soft:last-child) + #pig-footer .ft { margin-top: 0; }   /* si la página termina en una sección gris, van pegados */

/* ───────────── 19. Movimiento ───────────── */
/* .reveal: aparece subiendo cuando entra en pantalla (core.js agrega .is-visible).
   --rd = demora, para escalonar. Si el script no llegara a correr, se muestra solo a los 5 s. */
.reveal { opacity: 0; animation: reveal-safe 0s linear 5s forwards; }
.reveal.is-visible { opacity: 1; animation: rise .7s var(--ease) var(--rd, 0ms) backwards; }

@keyframes reveal-safe { to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } }
@keyframes drop { from { opacity: 0; transform: translateY(-8px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.5); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ───────────── Cortes ───────────── */
/* Teléfonos: logo centrado, buscador en una segunda línea que se esconde al bajar */
@media (max-width: 559px) {
  .hd-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "menu logo actions" "search search search"; }
  .logo { justify-self: center; }
  .logo img { height: 36px; }
  .search { transition: border-color .25s, background .25s, box-shadow .25s, opacity .25s, visibility 0s; }
  /* El encabezado no cambia de alto (nada salta): la barra de secciones sube y tapa el buscador */
  #pig-header, .hd { pointer-events: none; }
  .strip, .hd-main, .nav { pointer-events: auto; }
  .hd.is-compact .search { opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
  .hd.is-compact .nav { z-index: 3; transform: translateY(calc(-1 * (var(--ctl) + .5rem))); }
  .strip { font-size: .62rem; letter-spacing: .08em; }
  .checkout-fields { gap: .5rem; }
}

@media (min-width: 560px) {
  :root { --gap: .75rem; }
  #pig-header:empty { min-height: 144px; }
  .grid { --cols: 3; }
  .row-wrap { --per: 3.25; }
  .row-nav { display: grid; }
  .banner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner-media { aspect-ratio: auto; min-height: 300px; }
  .banner.flip .banner-media { order: 2; }
  .ft-in { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 720px) {
  .toast { bottom: 1.2rem; }
  .usp-in { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .usp-item:nth-child(n) { justify-content: center; padding: 1.15rem .8rem; border-top: 0; border-left: 0; }
  .usp-item:nth-child(n + 2) { border-left: 1px solid var(--line); }
}

@media (min-width: 960px) {
  :root { --gap: 1rem; }
  #pig-header:empty { min-height: 158px; }
  .grid { --cols: 4; }
  .row-wrap { --per: 4.25; }
  .strip-in { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 1rem; }
  .strip-msgs { grid-column: 2; width: 560px; max-width: 50vw; }
  .strip-links { grid-column: 3; display: flex; justify-self: end; gap: 1.5rem; }
  .hd-menu { display: none; }
  .hd-row { grid-template-columns: minmax(0, 1fr) minmax(0, 620px) minmax(0, 1fr); grid-template-areas: "logo search actions"; column-gap: 1.5rem; padding-block: .8rem; }
  .logo { justify-self: start; }
  .logo img { height: 48px; }
  .hd-actions { justify-self: end; }
  .nav-link { height: 48px; padding: 0 .9rem; }
  .nav-link::after { left: .9rem; right: .9rem; }
  .nav-link .ic { display: block; }
  .dd-layer { display: block; }
  .ft-in { grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .ft-brand { grid-column: auto; }
  .card-body { padding: .65rem .9rem .95rem; }
  .card-btn { min-height: 40px; }
}

@media (min-width: 1320px) {
  :root { --gap: 1.1rem; }
  .grid { --cols: 5; }
  .row-wrap { --per: 5; }
  .nav-link { padding: 0 1.1rem; font-size: .8rem; }
  .nav-link::after { left: 1.1rem; right: 1.1rem; }
}

/* ───────────── 20. Impresión ───────────── */
@media print {
  #pig-header, #pig-footer, #pig-extra { display: none !important; }
  .reveal { opacity: 1 !important; animation: none !important; }
}
