/* ───────── Glassitas · ficha de producto y pasarela de pago (demo) ─────────
   Se carga después de sub.css y usa sus variables. */

/* ───────── Ficha ───────── */
.pd {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 24px clamp(28px, 4vw, 72px); align-items: start;
  padding-top: clamp(20px, 3vw, 36px); padding-bottom: clamp(40px, 6vw, 80px);
}
.pd-crumbs { grid-column: 1 / -1; }

/* galería */
.pd-gallery { position: sticky; top: calc(var(--bar) + 20px); display: grid; gap: 12px; }
.pd-stage { position: relative; aspect-ratio: 1; overflow: hidden; background: #fff; border: 1px solid var(--line); touch-action: pan-y; user-select: none; }
.pd-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .45s var(--ease); }
.pd-slide.is-on { opacity: 1; }
.pd-slide img { width: 100%; height: 100%; object-fit: contain; padding: 9%; mix-blend-mode: multiply; filter: brightness(1.05) contrast(1.04); }
.pd-slide.is-pad img { padding: 13%; }
.pd-slide[data-kind="detail"] img { transform: scale(2.1); transform-origin: 22% 36%; }
.pd-slide--photo img { padding: 0; object-fit: cover; mix-blend-mode: normal; filter: none; }
.pd-slide--photo.is-wide img { object-position: 22% 30%; }
.pd-tag { position: absolute; z-index: 2; top: 16px; left: 16px; padding: 6px 12px; border-radius: 999px; background: #fff; color: var(--red-deep); font-weight: 650; font-size: .86rem; }
.pd-nav {
  position: absolute; z-index: 2; top: 50%; width: 44px; height: 44px; margin-top: -22px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .9); opacity: 0; transition: opacity .25s, background-color .2s;
}
.pd-nav:hover { background: #fff; border-color: var(--ink); }
.pd-stage:hover .pd-nav, .pd-nav:focus-visible { opacity: 1; }
.pd-prev { left: 14px; }
.pd-next { right: 14px; }
.pd-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pd-count { position: absolute; z-index: 2; right: 16px; bottom: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: .8rem; font-weight: 600; }
@media (hover: none) { .pd-nav { opacity: 1; } }

.pd-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.pd-thumbs.is-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-thumbs button {
  position: relative; display: grid; gap: 6px; padding: 0; border: 0; background: none; text-align: left;
  color: var(--muted); font-size: .8rem; font-weight: 600;
}
.pd-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #fff; border: 1px solid var(--line); transition: border-color .2s; }
.pd-thumbs button:nth-child(-n+2) img { object-fit: contain; padding: 12%; mix-blend-mode: multiply; }
.pd-thumbs button:nth-child(2) img { object-fit: cover; object-position: 20% 40%; padding: 0; }
.pd-thumbs button[aria-selected="true"] { color: var(--ink); }
.pd-thumbs button[aria-selected="true"] img { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pd-thumbs button:hover img { border-color: var(--line-strong); }

/* compra */
.pd-buy { display: grid; gap: 22px; min-width: 0; }
.pd-code { display: flex; gap: 14px; color: var(--muted); }
.pd-buy h1 { font-size: clamp(2.2rem, 4.4vw, 4rem); margin-top: -8px; }
.pd-sub { margin-top: -12px; color: var(--muted); }
.pd-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.pd-price b { font-stretch: 125%; font-weight: 800; font-size: clamp(1.6rem, 2.4vw, 2rem); letter-spacing: -.01em; }
.pd-price span { color: var(--muted); font-size: .92rem; }
.pd-desc { color: var(--ink-2); max-width: 54ch; }

.pd-opt { display: grid; gap: 12px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pd-opt-h { padding: 0; color: var(--muted); font-size: .92rem; }
.pd-opt-h b { color: var(--ink); font-weight: 650; }
.pd-colors { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.pd-colors button { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--c); transition: transform .2s var(--ease); }
.pd-colors button:hover { transform: scale(1.08); }
.pd-colors button[aria-checked="true"] { outline: 1.5px solid var(--ink); outline-offset: 3px; }

#pdLens { display: grid; gap: 8px; }
.pd-lens-opt {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--cut); cursor: pointer; transition: border-color .2s, background-color .2s;
}
.pd-lens-opt:hover { border-color: var(--line-strong); }
.pd-lens-opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pd-lens-opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.pd-lens-opt b { display: block; font-weight: 650; font-size: .98rem; }
.pd-lens-opt small { display: block; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.pd-lens-opt > .num { font-weight: 650; font-size: .92rem; white-space: nowrap; }
.pd-hint { color: var(--muted); font-size: .86rem; }
.pd-hint a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.pd-ctas { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pd-ctas .b { height: 54px; padding: 0 16px; }
.pd-qty { display: inline-flex; align-items: center; height: 54px; border: 1px solid var(--line-strong); border-radius: var(--cut); }
.pd-qty button { width: 40px; height: 100%; padding: 0; border: 0; background: none; font-size: 1.15rem; }
.pd-qty button:hover { background: var(--stock); }
.pd-qty span { min-width: 24px; text-align: center; font-weight: 650; }

.pd-perks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; margin: 0; padding: 18px 0 0; list-style: none; border-top: 1px solid var(--line); }
.pd-perks li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.pd-perks b { color: var(--ink); font-weight: 650; }
.pd-perks svg { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.pd-info { border-top: 1px solid var(--line); }
.pd-info details { border-bottom: 1px solid var(--line); }
.pd-info summary {
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; cursor: pointer; list-style: none;
  font-stretch: 80%; font-weight: 700; font-size: .9rem; letter-spacing: .07em; text-transform: uppercase;
}
.pd-info summary::-webkit-details-marker { display: none; }
.pd-info summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transform: rotate(180deg); transition: transform .3s var(--ease); }
.pd-info details[open] summary svg { transform: none; }
.pd-info-body { display: grid; gap: 16px; padding-bottom: 22px; }
.pd-measure { width: min(320px, 100%); height: auto; fill: none; stroke: var(--ink); stroke-width: 2.4; }
.pd-measure .m { stroke: var(--red-deep); stroke-width: 1.4; }
.pd-measure text { fill: var(--red-deep); stroke: none; font: 650 12px var(--f); text-anchor: middle; }
.pd-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.pd-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.pd-specs dt { color: var(--muted); }
.pd-specs dd { margin: 0; font-weight: 600; text-align: right; }
.pd-list { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .95rem; }
.pd-list li::marker { color: var(--red); }

.pd-more { border-top: 1px solid var(--line); }
.pd-related { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 28px); }
.pd-related .tile-img { border: 1px solid var(--line); }

/* ───────── Responsive ───────── */
@media (max-width: 1100px) {
  .pd-related { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .pd { grid-template-columns: 1fr; }
  .pd-gallery { position: static; }
}
@media (max-width: 560px) {
  .pd-ctas { grid-template-columns: auto minmax(0, 1fr); }
  .pd-now { grid-column: 1 / -1; grid-row: 1; }
  .pd-perks, .pd-specs { grid-template-columns: 1fr; }
  .pd-thumbs { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pd-slide { transition-duration: .01ms; }
}
