/* ==========================================================================
   Pigmento Cosméticos · estilos de las páginas interiores
   (catálogo, producto, bolsita, favoritos, maquillaje, rutina, mayorista, información)
   Lo compartido (botones, tarjetas, grilla, acordeón, chips…) está en tienda.css.
   ========================================================================== */

.pg-main { min-height: 60vh; padding-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.pg-main > .wrap > .crumbs { padding-top: clamp(1rem, 2.6vw, 1.6rem); }
.page-head .btn-row { margin-top: 1rem; }
[data-top], #probador { scroll-margin-top: calc(var(--hd-h, 120px) + 12px); }

/* Pasos numerados */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .7rem; }
.step { display: flex; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.step-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; font-size: .86rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.step h3 { font-size: .86rem; }
.step p { margin-top: .25rem; font-size: .93rem; line-height: 1.45; color: var(--ink-2); }

/* ───────────── Catálogo ───────────── */
.cat-head h1 { margin: .8rem 0 1.1rem; }
.cat { display: grid; gap: 1.5rem; }
.cat-main { min-width: 0; }
.cat-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-bottom: 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.cat-count { margin-right: auto; font-size: .9rem; color: var(--ink-2); }
.cat-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.cat-sort { display: flex; align-items: center; gap: .5rem; }
.cat-sort span { font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.cat-sort .select { width: auto; min-height: 40px; font-size: .9rem; }
.cat-filtros { min-height: 40px; padding-inline: 1.1rem; }
.cat-may { font-size: .86rem; }
.cat-chips { align-items: center; margin-bottom: 1rem; }
.cat-chips .chip { min-height: 34px; padding-inline: .8rem; }
.chips-clear { margin-left: .3rem; font-size: .8rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.chips-clear:hover { color: var(--pink); }
.cat-pager { margin-top: 1.8rem; }
.pager .is-off { opacity: .35; }
.cat-empty .btn-row, .cat-empty-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; }

/* Filtros: columna fija en pantallas anchas, panel lateral en angostas */
.cf-head { display: flex; align-items: center; justify-content: space-between; padding: .5rem .5rem .5rem 1rem; border-bottom: 1px solid var(--line); }
.cf-head h2 { font-size: .9rem; }
.cf-foot { padding: .8rem 1rem; border-top: 1px solid var(--line); }
.cf-block { border-bottom: 1px solid var(--line); }
.cf-block summary { display: flex; align-items: center; justify-content: space-between; padding: .85rem 0; list-style: none; font-size: .76rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.cf-block summary::-webkit-details-marker { display: none; }
.cf-block summary .ic { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.cf-block[open] summary .ic { transform: rotate(180deg); }
.cf-body { display: grid; gap: 1px; padding-bottom: .9rem; }
.cf-link { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .36rem .55rem; border-radius: 8px; font-size: .92rem; color: var(--ink-2); transition: background .2s, color .2s; }
.cf-link:hover { background: var(--soft); color: var(--ink); }
.cf-link.is-on { background: var(--soft); color: var(--ink); font-weight: 500; box-shadow: inset 2px 0 0 var(--ink); }
.cf-link.is-group { margin-top: .35rem; color: var(--ink); }
.cf-link.is-sub { padding-left: 1.3rem; }
.cf-link i, .cf-check i { font-style: normal; font-size: .76rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cf-check { display: flex; align-items: center; gap: .6rem; padding: .32rem .55rem; border-radius: 8px; font-size: .92rem; cursor: pointer; }
.cf-check:hover { background: var(--soft); }
.cf-check input { flex: none; width: 17px; height: 17px; accent-color: var(--ink); }
.cf-check span { flex: 1; min-width: 0; }
.cf-check.is-solo { padding-block: .95rem; font-weight: 500; }
.cf-back { position: fixed; inset: 0; z-index: 299; background: rgba(29, 26, 27, .45); opacity: 0; pointer-events: none; transition: opacity .3s; }
.cf-back.is-open { opacity: 1; pointer-events: auto; }
html.cf-lock { overflow: hidden; }

@media (max-width: 899px) {
  .cf { position: fixed; inset: 0 auto 0 0; z-index: 300; display: flex; flex-direction: column; width: min(88vw, 340px); background: #fff; box-shadow: var(--shadow-lg); transform: translateX(-104%); transition: transform .4s var(--ease); }
  .cf.is-open { transform: none; }
  .cf-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 1rem 1rem; }
}
@media (min-width: 900px) {
  .cat { grid-template-columns: 240px minmax(0, 1fr); gap: 2rem; align-items: start; }
  .cf { position: sticky; top: calc(var(--hd-h, 120px) + 1rem); max-height: calc(100vh - var(--hd-h, 120px) - 2rem); overflow-y: auto; scrollbar-width: thin; padding-right: .4rem; }
  .cf-head, .cf-foot, .cf-back, .cat-filtros { display: none; }
  .grid.cat-grid { --cols: 3; }
}
@media (min-width: 1200px) { .grid.cat-grid { --cols: 4; } }
@media (min-width: 1500px) { .cat { grid-template-columns: 260px minmax(0, 1fr); } .grid.cat-grid { --cols: 5; } }

/* ───────────── Producto ───────────── */
.pd { display: grid; gap: 1.4rem; padding-top: 1rem; }
.pd-gal { min-width: 0; }
.pd-main { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; }
.pd-main img { width: 100%; height: 100%; transition: transform .5s var(--ease); }
.pd-main img.cut { object-fit: contain; padding: 9%; }
.pd-main img.cover { object-fit: cover; }
.pd-main img.in { animation: fade .45s var(--ease); }
.pd-main .badge { position: absolute; top: .8rem; left: .8rem; z-index: 2; }
.pd-thumbs { display: flex; gap: .5rem; margin-top: .6rem; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs:empty { display: none; }
.pd-thumb { flex: none; width: 68px; height: 68px; border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.pd-thumb:hover { border-color: var(--ink-2); }
.pd-thumb.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb img.cut { object-fit: contain; padding: 6px; }

.pd-info { display: grid; gap: 1.05rem; min-width: 0; align-content: start; }
.pd-brand { justify-self: start; font-size: .72rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); transition: color .2s; }
.pd-brand:hover { color: var(--pink); }
.pd-info h1 { margin-top: -.7rem; font-size: clamp(1.35rem, 3.4vw, 2rem); }
.pd-what { margin-top: -.55rem; color: var(--ink-2); }
.pd-price strong { font-size: 1.65rem; font-weight: 600; line-height: 1.1; }
.pd-may { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; font-size: .9rem; color: var(--pink); }
.pd-may .ic { width: 16px; height: 16px; }
.pd-label { margin-bottom: .55rem; font-size: .74rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.pd-label b { color: var(--ink); }
.pd-opts.is-pending .pd-label b { color: var(--pink); }
.pd-opts.shake { animation: pd-shake .45s; }
.pd-opts.shake .opt-btn { border-color: var(--pink); }
@keyframes pd-shake { 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.pd-tono { padding: 1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.pd-buy { display: flex; align-items: center; gap: .6rem; }
.pd-add { flex: 1; min-height: 52px; padding-inline: 1rem; }
.pd-add.is-wait, .pd-bar .btn.is-wait { background: #fff; color: var(--ink); }
.pd-add.is-wait:hover { background: var(--ink); color: #fff; }
/* Sin stock: foto atenuada, botón apagado y enlace para pedir aviso por WhatsApp */
.pd-main.is-out img { opacity: .5; }
.pd-avisar { min-height: 48px; }
.pd-sum { display: grid; gap: .35rem; padding: .9rem 1rem; border: 1px dashed var(--line-2); border-radius: var(--r); background: #fff; }
.pd-sum-t { font-size: .68rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.pd-sum p:not(.pd-sum-t):not(.pd-sum-may) { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15rem .7rem; }
.pd-sum p span { font-size: .92rem; color: var(--ink-2); }
.pd-sum p strong { margin-left: auto; white-space: nowrap; }
.pd-sum-may { font-size: .86rem; line-height: 1.45; color: var(--ink-2); }
.pd-sum-may b { color: var(--pink); }
.pd-links { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.pd-link { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: var(--ink-2); transition: color .2s; }
.pd-link:hover { color: var(--ink); }
.pd-link .ic { width: 18px; height: 18px; }
.pd-link[data-ask] .ic { color: var(--wa); }
.pd-acc .pd-tags { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; list-style: none; }
.pd-tags li { padding: .25rem .75rem; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: .82rem; color: var(--ink); }
.pd-rel { margin-top: clamp(2.2rem, 5vw, 3.6rem); }
.pd-none .fine { max-width: 44ch; }

.pd-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; align-items: center; gap: .8rem; padding: .6rem var(--gutter); border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -12px 30px -18px rgba(0, 0, 0, .4); animation: rise .35s var(--ease); }
.pd-bar[hidden] { display: none; }
.pd-bar-txt { flex: 1; display: grid; min-width: 0; line-height: 1.25; }
.pd-bar-txt b { overflow: hidden; font-size: .9rem; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.pd-bar-txt span { overflow: hidden; font-size: .78rem; color: var(--ink-2); white-space: nowrap; text-overflow: ellipsis; }
.pd-bar .btn { flex: none; min-height: 44px; padding-inline: 1.1rem; font-size: .7rem; }
@media (max-width: 859px) { body[data-page="producto"] { --fab-lift: 66px; } }
@media (min-width: 860px) {
  .pd { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3.6rem); align-items: start; }
  .pd-gal { position: sticky; top: calc(var(--hd-h, 120px) + 1rem); }
  .pd-bar { display: none !important; }
}
@media (hover: hover) and (pointer: fine) {
  .pd-main { cursor: zoom-in; }
  .pd-main:hover img { transform: scale(1.9); transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .25s var(--ease); }
}

/* ───────────── Bolsita ───────────── */
.ct-n { font-size: .9rem; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.ct { display: grid; gap: 1.6rem; }
.ct-lines { min-width: 0; }
.ct-lines .bag-line { grid-template-columns: 84px minmax(0, 1fr) auto; }
.ct-lines .bag-line:first-child { border-top: 1px solid var(--line); }
.ct-lines .bag-img { width: 84px; height: 84px; }
.ct-lines .may-hint { margin-top: 1rem; }
.ct-back { margin-top: 1.3rem; }
.ct-side { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.4rem); border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.ct-sub { display: grid; gap: .45rem; }
@media (min-width: 900px) {
  .ct { grid-template-columns: minmax(0, 1fr) 380px; gap: 2.6rem; align-items: start; }
  .ct-side { position: sticky; top: calc(var(--hd-h, 120px) + 1rem); }
}

/* ───────────── Maquillaje y probador ───────────── */
.mk-marcas { display: grid; gap: 1rem; padding-bottom: clamp(2rem, 5vw, 3.6rem); }
.tn { display: grid; gap: 1.4rem; }
.tn-view { min-width: 0; }
.tn-pick { display: grid; gap: 1rem; min-width: 0; align-content: start; }
.tn-pick .pd-label { margin-bottom: -.4rem; }
.tn-sum { display: grid; gap: .9rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.tn-sum-txt { display: grid; gap: .1rem; line-height: 1.3; }
.tn-sum-txt small { font-size: .66rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.tn-sum-txt b { font-weight: 500; }
.tn-sum-txt span { font-size: .93rem; color: var(--ink-2); }
@media (min-width: 860px) { .tn { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.6rem, 4vw, 3rem); align-items: start; } }

/* ───────────── Rutina ───────────── */
.rt-bajada { margin: 1rem 0; color: var(--ink-2); }
.rt-steps { display: grid; gap: .6rem; }
.rt-step { position: relative; display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; transition: border-color .3s, box-shadow .3s; }
.rt-step:hover { border-color: #cdc2c3; box-shadow: var(--shadow); }
.rt-card { flex: 1; display: flex; align-items: center; gap: .8rem; min-width: 0; }
.rt-img { flex: none; width: 76px; height: 76px; }
.rt-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .6s var(--ease); }
.rt-img img.cover { object-fit: cover; border-radius: 8px; }
.rt-step:hover .rt-img img { transform: scale(1.07); }
.rt-txt { display: grid; gap: .1rem; min-width: 0; line-height: 1.3; }
.rt-txt small { font-size: .64rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.rt-txt b { font-size: .95rem; font-weight: 400; }
.rt-txt i { font-style: normal; font-size: .8rem; color: var(--ink-2); }
.rt-txt strong { font-size: .95rem; }
/* Paso agotado: se muestra, pero no se agrega ni suma al total */
.rt-step.is-out .rt-img img { opacity: .5; }
.rt-step.is-out .rt-txt strong { color: var(--ink-2); }
.rt-out { flex: none; display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: .3rem .95rem; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: .68rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; color: var(--ink-2); }
.rt-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.1rem; padding: 1rem 1.2rem; border-radius: var(--r); background: var(--ink); color: #fff; }
.rt-total span { display: block; font-size: .7rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
.rt-total b { font-size: 1.5rem; font-weight: 600; }
.rt-total .btn { background: #fff; border-color: #fff; color: var(--ink); }
.rt-total .btn:hover { background: var(--soft); }
.rt-nota { margin-top: .8rem; }
@media (min-width: 900px) {
  .rt-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
  .rt-step { flex-direction: column; align-items: stretch; padding: 1rem; }
  .rt-step .step-n { position: absolute; top: .7rem; left: .7rem; z-index: 1; }
  .rt-card { flex-direction: column; align-items: flex-start; }
  .rt-img { width: 100%; height: auto; aspect-ratio: 1; padding: 8%; }
}

/* ───────────── Mayorista ───────────── */
.calc { display: grid; gap: 1.4rem; padding: clamp(1.1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--r); background: var(--soft); }
.calc-form { display: grid; gap: 1rem; align-content: start; }
.calc-range { width: 100%; height: 34px; accent-color: var(--ink); cursor: pointer; }
.calc-out { display: grid; gap: 1rem; padding: 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.calc-img { width: 120px; height: 120px; margin-inline: auto; }
.calc-img img { width: 100%; height: 100%; object-fit: contain; animation: fade .4s var(--ease); }
.calc-img img.cover { object-fit: cover; border-radius: 8px; }
.calc-nums { display: grid; gap: .4rem; }
.calc-msg { margin-top: .3rem; padding: .65rem .85rem; border-radius: 10px; background: var(--soft); font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.calc-msg.is-ok { background: #fdf0f4; color: var(--ink); }
.calc-msg b { color: var(--pink); }
@media (min-width: 760px) { .calc { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; } }

/* ───────────── Sucursales e información ───────────── */
.st-list { display: grid; gap: 1rem; }
.st { display: grid; align-content: start; border: 1px solid var(--line); border-radius: var(--r); background: #fff; overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.st:hover { border-color: #cdc2c3; box-shadow: var(--shadow); }
.st-media { aspect-ratio: 16 / 9; overflow: hidden; }
.st-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.st:hover .st-media img { transform: scale(1.05); }
.st-body { display: grid; gap: .7rem; justify-items: start; padding: clamp(1.1rem, 3vw, 1.8rem); }
.st-row { display: flex; align-items: center; gap: .5rem; color: var(--ink-2); }
.st-row .ic { width: 18px; height: 18px; color: var(--ink); }
.st-label { margin-top: .4rem; font-size: .7rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.st-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; width: 100%; }
.st-person { display: flex; align-items: center; gap: .6rem; padding: .55rem .8rem; border: 1px solid var(--line-2); border-radius: 10px; transition: border-color .2s, background .2s, transform .2s; }
.st-person:hover { border-color: var(--wa); background: #f3fbf6; transform: translateY(-1px); }
.st-person .ic { width: 22px; height: 22px; color: var(--wa); }
.st-person span { display: grid; line-height: 1.25; }
.st-person b { font-weight: 500; }
.st-person i { font-style: normal; font-size: .8rem; color: var(--ink-2); }
.info-cta { margin-top: 1.6rem; }
@media (min-width: 860px) { .st-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
