/* =========================================================
   OH MAMI — Ficha de producto
   ========================================================= */
html.pdp-open { overflow: hidden; }
html.pdp-open .fab, html.pdp-open .to-top { opacity: 0; pointer-events: none; }

.pdp {
  --pdp-tint: var(--sage-100);
  position: fixed; inset: 0; z-index: 78; overflow-y: auto; overscroll-behavior: contain;
  background: var(--cream); padding: var(--pdp-top, var(--header-h)) 0 clamp(90px, 10vw, 140px);
  scrollbar-gutter: stable;
}
.pdp[hidden] { display: none; }
.pdp--in { animation: pdpIn .55s var(--ease) both; }
@keyframes pdpIn { from { opacity: 0; translate: 0 26px; } }

/* Barra superior: volver + migas */
.pdp__top { display: flex; align-items: center; gap: 18px; padding-block: 18px 22px; min-width: 0; }
.pdp__back { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 9px 12px; border-radius: 99px; background: #fff; box-shadow: var(--shadow-sm); font-weight: 700; font-size: .88rem; color: var(--forest); transition: translate .4s var(--ease), box-shadow .3s; }
.pdp__back svg { width: 18px; height: 18px; transition: translate .4s var(--ease); }
.pdp__back:hover { box-shadow: var(--shadow); }
.pdp__back:hover svg { translate: -3px 0; }
.pdp__crumbs { min-width: 0; }
.pdp__crumbs ol { display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.pdp__crumbs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pdp__crumbs li + li::before { content: '/'; color: var(--sage-400); }
.pdp__crumbs button { color: var(--muted); transition: color .2s; }
.pdp__crumbs button:hover { color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }
.pdp__crumbs [aria-current] { color: var(--forest); font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: block; }

/* Rejilla principal */
.pdp__grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: clamp(28px, 4.5vw, 76px); align-items: start; }

/* Galería */
.pdp__gallery { position: sticky; top: calc(var(--pdp-top, var(--header-h)) + 18px); }
.pdp__stage { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; overflow: hidden; border-radius: var(--r-lg); background: radial-gradient(circle at 50% 52%, #fff 0%, #fff 30%, var(--pdp-tint) 100%); cursor: zoom-in; }
.pdp__hero { width: 100%; height: 100%; object-fit: contain; padding: 9%; mix-blend-mode: multiply; transition: transform .4s var(--ease), opacity .18s; }
.pdp__hero.swap { opacity: 0; }
.pdp__stage.zoomed .pdp__hero { transform: scale(2.1); }
.pdp__badges { position: absolute; left: 18px; top: 18px; display: flex; gap: 8px; flex-wrap: wrap; pointer-events: none; }
.pdp__badges .card__tag { position: static; }
.card__tag--warn { background: var(--forest); }
.pdp__hint { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: .78rem; font-weight: 700; color: var(--forest); pointer-events: none; transition: opacity .3s; }
.pdp__hint svg { width: 15px; height: 15px; }
.pdp__stage.zoomed .pdp__hint { opacity: 0; }
.pdp__thumbs { display: flex; gap: 10px; margin-top: 12px; }
.pdp__thumb { width: 78px; aspect-ratio: 1; border-radius: 16px; background: #fff; border: 2px solid transparent; overflow: hidden; transition: border-color .25s, translate .3s var(--ease); }
.pdp__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; }
.pdp__thumb:hover { translate: 0 -2px; }
.pdp__thumb[aria-pressed="true"] { border-color: var(--forest); }

/* Información */
.pdp__info { container: pdpi / inline-size; padding-top: 4px; }
.pdp__info > * { animation: pdpUp .7s var(--ease) both; }
.pdp__info > :nth-child(2) { animation-delay: .05s; } .pdp__info > :nth-child(3) { animation-delay: .1s; }
.pdp__info > :nth-child(4) { animation-delay: .15s; } .pdp__info > :nth-child(5) { animation-delay: .2s; }
.pdp__info > :nth-child(6) { animation-delay: .25s; } .pdp__info > :nth-child(n+7) { animation-delay: .3s; }
@keyframes pdpUp { from { opacity: 0; translate: 0 18px; } }

.pdp__brand { display: inline-flex; align-items: center; gap: 12px; padding: 6px 16px 6px 6px; margin-bottom: 22px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); text-align: left; transition: box-shadow .3s, translate .4s var(--ease); }
.pdp__brand:hover { box-shadow: var(--shadow); translate: 0 -2px; }
.pdp__logo { display: grid; place-items: center; padding: 4px 8px; border-radius: 13px; background: var(--sage-50); }
.pdp__logo .lbox { width: 92px; }
.pdp__brand small { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pdp__brand b { font-size: .95rem; color: var(--forest); }
.pdp__brand > svg { width: 16px; height: 16px; color: var(--sage-600); transition: translate .3s var(--ease); }
.pdp__brand:hover > svg { translate: 3px 0; }
.pdp__cat { font-size: .76rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-deep); }
.pdp__title { font-size: clamp(2rem, 3.4vw, 3.15rem); line-height: 1.04; color: var(--forest); margin: 10px 0 16px; outline: none; text-wrap: balance; }
.pdp__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.pdp__price b { font-family: var(--ff-display); font-weight: 400; font-size: clamp(1.8rem, 2.4vw, 2.2rem); color: var(--forest); letter-spacing: -.02em; }
.pdp__price s { color: var(--muted); font-size: 1.1rem; }
.pdp__price small { font-size: .82rem; color: var(--muted); }
.pdp__lead { margin: 16px 0 26px; color: var(--muted); font-size: 1.04rem; line-height: 1.6; max-width: 48ch; }

.pdp__buy { display: flex; gap: 12px; align-items: stretch; }
.pdp__buy .qty { margin: 0; padding: 5px; }
.pdp__buy .qty button { width: 40px; height: 40px; }
.pdp__buy .qty button svg { width: 16px; height: 16px; }
.pdp__buy .qty span { min-width: 30px; font-size: 1.05rem; }
.pdp__add { flex: 1; min-height: 58px; white-space: nowrap; }
.badge[hidden] { display: none !important; }

.pdp__list { width: 100%; display: flex; align-items: center; gap: 14px; margin-top: 12px; padding: 12px 18px 12px 12px; border-radius: 20px; border: 1.5px dashed var(--sage-300); background: rgba(255, 255, 255, .6); text-align: left; transition: border-color .3s, background .3s; }
.pdp__list:hover { border-color: var(--accent); background: #fff; }
.pdp__list b { display: block; font-size: .98rem; color: var(--forest); }
.pdp__list small { font-size: .84rem; color: var(--muted); }
.pdp__listic { position: relative; flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; background: var(--blush-soft); color: var(--accent-deep); }
.pdp__listic svg { position: absolute; width: 22px; height: 22px; transition: opacity .3s, scale .45s var(--ease-spring); }
.pdp__listic svg:last-child { opacity: 0; scale: .4; }
.pdp__list.on { border-style: solid; border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--blush-soft); }
.pdp__list.on .pdp__listic { background: #fff; }
.pdp__list.on .pdp__listic svg:first-child { opacity: 0; scale: .4; }
.pdp__list.on .pdp__listic svg:last-child { opacity: 1; scale: 1; }

.pdp__tg { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-top: 18px; padding: 16px 16px 16px 18px; border-radius: 22px; background: var(--forest); color: #fff; }
.pdp__tgic { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.pdp__tgic .ico { width: 26px; height: 26px; }
.pdp__tg b { font-family: var(--ff-display); font-weight: 400; font-size: 1.12rem; }
.pdp__tg p { font-size: .86rem; color: rgba(255, 255, 255, .72); margin-top: 2px; }
.pdp__tg .btn { padding: 11px 18px; font-size: .86rem; color: #fff; border-color: rgba(255, 255, 255, .35); --fill: rgba(255, 255, 255, .14); white-space: nowrap; }

.pdp__perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 24px 0 8px; }
.pdp__perks li { display: grid; justify-items: start; gap: 8px; padding: 14px; border-radius: 18px; background: #fff; font-size: .8rem; line-height: 1.35; color: var(--muted); }
.pdp__perks .ico { width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: var(--sage-100); color: var(--forest); }
.pdp__perks b { display: block; font-size: .86rem; color: var(--forest); margin-bottom: 2px; }
@container pdpi (max-width: 430px) {
  .pdp__perks { grid-template-columns: minmax(0, 1fr); }
  .pdp__perks li { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px 14px; }
  .pdp__tg { grid-template-columns: auto minmax(0, 1fr); }
  .pdp__tg .btn { grid-column: 1 / -1; }
}

.pdp__acc { margin-top: 18px; border-top: 1px solid color-mix(in srgb, var(--forest) 12%, transparent); }
.pdp__acc details { border-bottom: 1px solid color-mix(in srgb, var(--forest) 12%, transparent); }
.pdp__acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 2px; list-style: none; cursor: pointer; font-family: var(--ff-display); font-size: 1.18rem; color: var(--forest); }
.pdp__acc summary::-webkit-details-marker { display: none; }
.pdp__acc summary svg { width: 18px; height: 18px; flex: none; transition: rotate .4s var(--ease); }
.pdp__acc details[open] summary svg { rotate: 45deg; }
.pdp__acc details[open] > :not(summary) { animation: pdpUp .45s var(--ease) both; }
.pdp__desc { padding: 0 2px 20px; color: var(--ink); font-size: .97rem; line-height: 1.65; }
.pdp__desc p + p, .pdp__desc p + ul, .pdp__desc ul + p, .pdp__desc h4 { margin-top: 10px; }
.pdp__desc ul { list-style: disc; padding-left: 1.2em; display: grid; gap: 4px; margin-top: 8px; }
.pdp__desc h4 { font-size: .95rem; font-weight: 700; color: var(--forest); }
.pdp__desc strong { color: var(--forest); }
.pdp__facts { padding: 0 2px 18px; display: grid; }
.pdp__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--sage-200); font-size: .93rem; }
.pdp__facts div:last-child { border-bottom: 0; }
.pdp__facts dt { color: var(--muted); }
.pdp__facts dd { margin: 0; font-weight: 700; color: var(--forest); text-align: right; }

.pdp__share { display: flex; gap: 22px; margin-top: 20px; }
.pdp__share button, .pdp__share a { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 700; color: var(--muted); transition: color .2s; }
.pdp__share svg { width: 18px; height: 18px; }
.pdp__share :hover { color: var(--forest); }

/* Secciones inferiores */
.pdp__sec { margin-top: clamp(64px, 8vw, 110px); }
.pdp__head { margin-bottom: clamp(20px, 2.6vw, 32px); }
.pdp__head .kicker { margin-bottom: 10px; }
.pdp__head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--forest); }
.pdp__head h2 em, .pdp__visit h2 em { color: var(--sage-600); font-weight: 300; }
.pdp__head--row { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.pdp__arrows { display: flex; gap: 10px; }
.pdp__arrows .round-btn { width: 48px; height: 48px; }
.pdp__arrows svg { width: 20px; height: 20px; }

/* Combínalo */
.combo { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(20px, 3vw, 40px); padding: clamp(18px, 3vw, 36px); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-sm); }
.combo__items { display: flex; align-items: center; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 4px; }
.combo__items::-webkit-scrollbar { display: none; }
.combo__it { position: relative; flex: 1 1 0; min-width: 150px; max-width: 220px; display: grid; gap: 6px; cursor: pointer; }
.combo__it.is-main { cursor: default; }
.combo__it input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.combo__img { position: relative; aspect-ratio: 1; display: grid; place-items: center; border-radius: 20px; background: var(--sage-50); border: 2px solid transparent; transition: border-color .3s, opacity .3s; }
.combo__img img { width: 100%; height: 100%; object-fit: contain; padding: 10%; mix-blend-mode: multiply; transition: opacity .3s, filter .3s; }
.combo__img i { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--forest); color: #fff; border: 2px solid var(--forest); transition: background .3s, color .3s; }
.combo__img i svg { width: 14px; height: 14px; }
.combo__it.is-main .combo__img { border-color: var(--sage-300); }
.combo__it.is-main .combo__img i { display: none; }
.combo__it:has(input:focus-visible) .combo__img { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.combo__it.off .combo__img img { opacity: .4; filter: grayscale(.6); }
.combo__it.off .combo__img i { background: #fff; color: transparent; border-color: var(--sage-300); }
.combo__it b { font-size: .9rem; font-weight: 700; line-height: 1.3; color: var(--forest); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.combo__it small { font-weight: 700; color: var(--muted); }
.combo__see { justify-self: start; font-size: .78rem; font-weight: 700; color: var(--sage-700); text-decoration: underline; text-underline-offset: 3px; }
.combo__plus { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--sage-100); color: var(--forest); }
.combo__plus svg { width: 16px; height: 16px; }
.combo__sum { display: grid; justify-items: start; gap: 10px; min-width: 230px; padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--sage-100); }
.combo__sum small { font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.combo__sum > b { font-family: var(--ff-display); font-weight: 400; font-size: 2.2rem; color: var(--forest); line-height: 1; }
.combo__sum .btn { width: 100%; }
.combo__sum .link-arrow svg { width: 16px; height: 16px; }

/* Carril de productos */
.pdp__rail { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 23%, 290px); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; padding: 4px 4px 14px; scrollbar-width: thin; scrollbar-color: var(--sage-300) transparent; }
.pdp__rail .card { scroll-snap-align: start; }
.pdp__recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pdp__recent .mini { background: #fff; }

/* Visita */
.pdp__visit { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px 40px; margin-top: clamp(64px, 8vw, 110px); padding: clamp(26px, 4vw, 52px); border-radius: var(--r-lg); background: var(--blush-soft); }
.pdp__visit .kicker { margin-bottom: 10px; }
.pdp__visit h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); color: var(--forest); }
.pdp__visit p:not(.kicker) { color: var(--muted); margin-top: 8px; }
.pdp__visitbtns { display: flex; flex-wrap: wrap; gap: 12px; }

/* Barra fija de compra */
.pdp__bar { position: fixed; z-index: 79; left: 50%; bottom: 18px; translate: -50% 160%; opacity: 0; visibility: hidden; width: min(560px, calc(100% - 24px)); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 10px; border-radius: 99px; background: rgba(255, 255, 255, .9); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); box-shadow: var(--shadow-lg); transition: translate .55s var(--ease), opacity .35s, visibility .55s; }
.pdp__bar.show { translate: -50% 0; opacity: 1; visibility: visible; }
.pdp__bar img { flex: none; width: 46px; height: 46px; border-radius: 50%; object-fit: contain; padding: 4px; background: var(--sage-50); mix-blend-mode: multiply; }
.pdp__bar div { flex: 1; min-width: 0; display: grid; }
.pdp__bar b { font-size: .9rem; color: var(--forest); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdp__bar span { font-size: .85rem; font-weight: 700; color: var(--muted); }
.pdp__bar .btn { padding: 12px 20px; font-size: .9rem; }

/* Transición tarjeta → ficha */
::view-transition-group(pdp-hero) { animation-duration: .6s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); z-index: 2; }
::view-transition-old(pdp-hero), ::view-transition-new(pdp-hero) { height: 100%; object-fit: contain; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .4s; }
html[data-vt="open"]::view-transition-new(root), html[data-vt="morph"]::view-transition-new(root) { animation: pdpRootIn .5s var(--ease) both; }
html[data-vt="close"]::view-transition-old(root) { animation: pdpRootOut .4s var(--ease) both; }
html[data-vt="close"]::view-transition-new(root) { animation: none; }
@keyframes pdpRootIn { from { opacity: 0; translate: 0 22px; } }
@keyframes pdpRootOut { to { opacity: 0; translate: 0 22px; } }

/* Móvil */
@media (max-width: 900px) {
  .pdp__grid { grid-template-columns: minmax(0, 1fr); }
  .pdp__gallery { position: relative; top: auto; margin-inline: calc(var(--gutter) * -1); }
  .pdp__stage { border-radius: 0; aspect-ratio: 1 / .92; }
  .pdp__thumbs { padding-inline: var(--gutter); }
  .combo { grid-template-columns: minmax(0, 1fr); }
  .combo__sum { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--sage-100); min-width: 0; }
  .pdp__rail { grid-auto-columns: 62%; }
}
@media (max-width: 760px) {
  .pdp { padding-bottom: calc(150px + env(safe-area-inset-bottom)); }
  .pdp__top { padding-block: 12px 14px; }
  .pdp__crumbs { display: none; }
  .pdp__bar { bottom: calc(90px + env(safe-area-inset-bottom)); }
  .pdp__arrows { display: none; }
  .combo__items { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; overflow: visible; padding: 0; }
  .combo__it { min-width: 0; max-width: none; }
  .combo__plus { display: none; }
  .combo__it b { font-size: .82rem; }
  .pdp__add { padding-inline: 18px; font-size: .92rem; }
  .pdp__visitbtns, .pdp__visitbtns .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .pdp--in, .pdp__info > *, .pdp__acc details[open] > :not(summary) { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* ---------- Talla o color (ficha y vista rápida) ---------- */
.opick { display: grid; gap: 14px; margin: 0 0 22px; }
.opick__lbl { margin: 0 0 8px; font-size: .86rem; font-weight: 700; color: var(--forest); }
.opick__lbl b { font-weight: 500; color: var(--muted); }
.opick__lbl b.on { font-weight: 700; color: var(--forest); }
.opick__row { display: flex; flex-wrap: wrap; gap: 8px; }
.opick__o { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 16px 8px 10px; border: 1.5px solid var(--sage-200); border-radius: 99px; background: #fff; color: var(--forest); font: 600 .9rem/1.1 var(--ff-body); cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; }
.opick__o:not(:has(i)) { padding-left: 16px; }
.opick__o i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(31, 58, 51, .16); }
.opick__o:hover { border-color: var(--sage-400); }
.opick__o[aria-checked="true"] { border-color: var(--forest); background: var(--cream); box-shadow: inset 0 0 0 1.5px var(--forest); }
.opick__o.is-out { border-style: dashed; color: var(--muted); }
.opick__o.is-out span { text-decoration: line-through; text-decoration-thickness: 1px; }
.opick__o:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.opick__low { margin: 0; font-size: .82rem; font-weight: 700; color: var(--accent-deep); }
.opick__low[hidden] { display: none; }
.opick.need { animation: opick-need .5s; }
.opick.need .opick__lbl b { color: var(--accent-deep); }
@keyframes opick-need { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .opick.need { animation: none; } }
.quick__info .opick { margin: 4px 0 14px; }
.pdp__add:disabled, #qAdd:disabled { opacity: .55; cursor: not-allowed; }
.pfrom { margin-right: 2px; font-family: var(--ff-body); font-size: .62em; font-style: normal; font-weight: 600; color: var(--muted); vertical-align: .15em; }
.line-item__var { display: block; margin-top: 2px; font-size: .8rem; color: var(--muted); }
.quick__info .price small, .pdp__price small { white-space: nowrap; }

/* Ropita agotada (v0.1.28) */
.card__tag--out { background: #8a8f98; color: #fff; }
.card .add:disabled { opacity: .35; cursor: not-allowed; }
.pdp__add:disabled, #qAdd:disabled { opacity: .5; cursor: not-allowed; }
.pdp__agot { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: .88rem; color: var(--muted); }
.pdp__agot svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.pdp__agot a { color: var(--forest); font-weight: 600; }
