/* pdp.css — ficha de producto. Mobile-first; solo se carga en /productos/*. */
.pdp { padding: 8px 0 var(--space-4); }
.pdp__grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .pdp__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 44px; align-items: start; } .pdp__media { position: sticky; top: calc(var(--header-h) + 16px); } }

/* Galería */
.pdp-gallery__main { position: relative; display: block; border: 1px solid var(--c-border); border-radius: 20px; overflow: hidden; background: #fff; cursor: zoom-in; }
.pdp-gallery__main img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; display: block; }
.pdp-gallery__zoom { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(21,27,32,.7); color: #fff; }
.pdp__off { position: absolute; top: 14px; left: 14px; z-index: 1; padding: 6px 10px; border-radius: 99px; background: #c0392b; color: #fff; font-weight: 800; font-size: .85rem; }
.pdp-gallery__thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; }
.pdp-thumb { flex: 0 0 64px; width: 64px; height: 64px; border: 1.5px solid var(--c-border); border-radius: 12px; overflow: hidden; background: #fff; padding: 0; cursor: pointer; }
.pdp-thumb.is-active { border-color: var(--c-primary); box-shadow: 0 0 0 2px rgba(1,154,124,.2); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; }

/* Zona de compra */
.pdp__eyebrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; font-size: .82rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.pdp__eyebrow a { color: var(--c-primary-d); text-decoration: none; }
.pdp__eyebrow a:hover { text-decoration: underline; }
.pdp__eyebrow span { color: var(--c-muted); }
.pdp__eyebrow a + span::before { content: "·"; margin-right: 8px; }
.pdp__title { font-size: clamp(1.6rem, 4.6vw, 2.35rem); line-height: 1.12; margin: 0 0 10px; }
.pdp__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 14px; font-size: .88rem; }
.pdp__rev { display: inline-flex; align-items: center; gap: 4px; color: var(--c-text); font-weight: 650; }
.pdp__rev .ico { color: var(--c-accent); fill: var(--c-accent); }
.pdp__stock { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #0b5c49; }
.pdp__stock > span { width: 8px; height: 8px; border-radius: 50%; background: #2bb685; box-shadow: 0 0 0 3px rgba(43,182,133,.18); }
.pdp__stock--order { color: #7a5300; } .pdp__stock--order > span { background: #e0a458; box-shadow: 0 0 0 3px rgba(224,164,88,.2); }
.pdp__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 10px; }
.pdp__from { font-size: .9rem; color: var(--c-muted); font-weight: 650; }
.pdp__now { font: 700 clamp(2rem, 6vw, 2.5rem)/1 var(--font-display); color: var(--c-dark); letter-spacing: -.01em; }
.pdp__old { color: var(--c-muted); font-size: 1.05rem; }
.pdp__iva { font-size: .78rem; color: var(--c-muted); }
.pdp__lead { color: var(--c-muted); line-height: 1.55; margin: 0 0 16px; }

.pdp__formats { border: 0; margin: 0 0 14px; padding: 0; }
.pdp__formats legend { font-weight: 750; font-size: .92rem; margin-bottom: 8px; }
.pdp__formats legend small { color: var(--c-muted); font-weight: 500; }
.pdp__fmts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pdp__fmt { position: relative; cursor: pointer; }
.pdp__fmt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pdp__fmt-in { display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--c-border); background: #fff; transition: border-color .15s, box-shadow .15s; }
.pdp__fmt-name { font-weight: 700; font-size: .9rem; line-height: 1.25; }
.pdp__fmt-price { font-weight: 800; color: var(--c-primary-d); font-size: .95rem; }
.pdp__fmt-price s { color: var(--c-muted); font-weight: 500; font-size: .8rem; }
.pdp__fmt-unit { font-size: .75rem; color: var(--c-muted); }
.pdp__fmt:hover .pdp__fmt-in { border-color: #9fd8c5; }
.pdp__fmt input:checked + .pdp__fmt-in { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(1,154,124,.16); background: #f4fbf8; }
.pdp__fmt input:focus-visible + .pdp__fmt-in { outline: 3px solid rgba(1,154,124,.4); outline-offset: 2px; }
.pdp__row { display: flex; gap: 10px; align-items: stretch; }
.pdp__row .qty { flex: 0 0 auto; }
.pdp__add { flex: 1; justify-content: center; gap: 10px; min-height: 54px; font-size: 1.05rem; border-radius: 14px; }
.pdp__add.is-added { background: var(--c-dark); }

.pdp__club { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 14px; background: #f0faf6; border: 1px solid #cfeee2; font-size: .88rem; line-height: 1.45; color: #0b5c49; }
.pdp__club a { font-weight: 750; color: var(--c-primary-d); margin-left: 4px; }
.pdp__deliv { list-style: none; margin: 14px 0 0; padding: 0; border: 1px solid var(--c-border); border-radius: 16px; background: #fff; }
.pdp__deliv li { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--c-border); }
.pdp__deliv li:last-child { border-bottom: 0; }
.pdp__deliv .ico { color: var(--c-primary-d); margin-top: 2px; }
.pdp__deliv strong { display: block; font-size: .92rem; }
.pdp__deliv small { color: var(--c-muted); font-size: .82rem; }
.pdp__deliv small .is-open { color: #0b5c49; font-weight: 700; }
.pdp__wa { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; color: var(--c-primary-d); text-decoration: none; min-height: 44px; }
.pdp__wa:hover { text-decoration: underline; }

/* Secciones */
.pdp-sec { margin-top: var(--space-5); }
.pdp-sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pdp-sec__head h2 { font-size: clamp(1.35rem, 3.5vw, 1.7rem); margin: 0; }
.pdp-sec__head p { margin: 0; color: var(--c-muted); font-size: .92rem; flex-basis: 100%; }
.pdp-sec__head a { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; text-decoration: none; }

/* Combínalo con */
.xsell { display: grid; gap: 10px; }
@media (min-width: 700px) { .xsell { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .xsell { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.xsell__item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--c-border); }
@media (min-width: 1100px) { .xsell__item { flex-direction: column; align-items: stretch; text-align: left; } }
.xsell__img { flex: 0 0 76px; }
.xsell__img img { width: 76px; height: 76px; object-fit: contain; border-radius: 12px; background: var(--c-bg); }
@media (min-width: 1100px) { .xsell__img img { width: 100%; height: 150px; } }
.xsell__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.xsell__body small { color: var(--c-muted); font-size: .75rem; font-weight: 650; }
.xsell__name { color: var(--c-dark); font-weight: 700; font-size: .9rem; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.xsell__price { font-weight: 800; color: var(--c-primary-d); }
.xsell__add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--c-primary); background: #fff; color: var(--c-primary-d); font: inherit; font-weight: 750; cursor: pointer; }
.xsell__add:hover { background: var(--c-primary); color: #fff; }
.xsell__add span { display: none; }
@media (min-width: 1100px) { .xsell__add { width: 100%; } .xsell__add span { display: inline; } }

/* Descripción + características */
.pdp-info { display: grid; gap: 26px; }
@media (min-width: 980px) { .pdp-info { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 44px; align-items: start; } .pdp-info__specs { position: sticky; top: calc(var(--header-h) + 16px); } }
.pdp-info h2 { font-size: 1.4rem; }
.pdp-info__desc p { line-height: 1.7; max-width: 70ch; }
.pdp-highlights { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-highlights li { display: flex; flex-direction: column; padding: 8px 12px; border-radius: 12px; background: #f3f8f6; border: 1px solid var(--c-border); min-width: 110px; }
.pdp-highlights span { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--c-muted); font-weight: 700; }
.pdp-highlights strong { font-size: .92rem; }
.pdp-guide { margin-top: 18px; border-top: 1px solid var(--c-border); }
.pdp-guide details { border-bottom: 1px solid var(--c-border); }
.pdp-guide summary { cursor: pointer; padding: 14px 0; font-weight: 750; font-size: 1.02rem; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.pdp-guide summary::-webkit-details-marker { display: none; }
.pdp-guide summary::after { content: "+"; font-weight: 400; font-size: 1.4rem; line-height: 1; color: var(--c-primary-d); }
.pdp-guide details[open] summary::after { content: "−"; }
.pdp-bullets { margin: 0 0 14px; padding-left: 1.2rem; line-height: 1.6; }
.pdp-specs { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--c-border); border-radius: 16px; overflow: hidden; background: #fff; font-size: .9rem; }
.pdp-specs th, .pdp-specs td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--c-border); vertical-align: top; }
.pdp-specs tr:last-child th, .pdp-specs tr:last-child td { border-bottom: 0; }
.pdp-specs th { width: 42%; color: var(--c-muted); font-weight: 650; background: #f9fbfa; }
.pdp-specs td { font-weight: 650; }
.pdp-tip { font-size: .85rem; color: var(--c-muted); line-height: 1.5; margin: 12px 0; }
.pdp-brandlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 750; text-decoration: none; }

/* Similares / recientes: carrusel horizontal con scroll nativo */
.simrow { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
@media (min-width: 1100px) { .simrow { grid-auto-columns: calc((100% - 36px) / 4); } }
.simcard { scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 16px; background: #fff; border: 1px solid var(--c-border); }
.simcard__img img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--c-bg); }
.simcard small { color: var(--c-muted); font-size: .75rem; font-weight: 650; }
.simcard__name { color: var(--c-dark); font-weight: 700; font-size: .9rem; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.simcard__price { font-weight: 800; color: var(--c-primary-d); margin-top: auto; }
.simcard__price s { color: var(--c-muted); font-weight: 500; font-size: .8rem; }
.simcard__add { margin-top: 6px; width: 100%; min-height: 42px; }
.simcard form { margin: 0; }

/* Barra fija móvil */
.pdp-sticky { display: none; }
@media (max-width: 899px) {
  .pdp-sticky { display: flex; align-items: center; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
    padding: 8px max(12px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
    border-top: 1px solid var(--c-border); box-shadow: 0 -8px 24px rgba(21,27,32,.1); transform: translateY(110%); transition: transform .22s ease; }
  .pdp-sticky.is-on { transform: none; }
  .pdp-sticky img { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; background: var(--c-bg); }
  .pdp-sticky__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .pdp-sticky__name { font-size: .75rem; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pdp-sticky__price { font-weight: 850; font-size: 1.1rem; color: var(--c-dark); }
  .pdp-sticky__add { gap: 6px; min-height: 48px; padding: 0 18px; }
  body { padding-bottom: 72px; }
  .wa-float { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8,12,16,.88); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(94vw, 1100px); max-height: 90vh; border-radius: 14px; background: #fff; }
.lightbox__close { position: absolute; top: 14px; right: 16px; width: 46px; height: 46px; border: 0; border-radius: 50%; background: rgba(255,255,255,.16); color: #fff; font-size: 1.6rem; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .pdp-sticky, .lightbox { transition: none; } }
