/* Ficha editorial: la fotografía y la selección comparten protagonismo. */
.product-detail { max-width: 1320px; margin: auto; }
.product-detail .breadcrumb { margin-bottom: 26px; }
.product-detail .product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: clamp(32px, 5vw, 76px); }
.product-detail .product-gallery { width: 100%; min-width: 0; position: sticky; top: 112px; }
.gallery-signature { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 2px solid var(--ink); }
.gallery-signature > span:first-child { font-family: var(--display); font-size: 1.1rem; font-weight: 600; letter-spacing: -.05em; }
.gallery-signature small { font-size: .6rem; color: var(--blue); letter-spacing: -.01em; }
.gallery-signature > span:last-child { font-size: .7rem; color: var(--muted); }
.gallery-stage { position: relative; width: 100%; aspect-ratio: 1; background: #f0eee8; overflow: hidden; }
.gallery-slide { width: 100%; height: 100%; }
.gallery-slide[hidden], .gallery-thumb[hidden], .gallery-arrow[hidden], .color-picker[hidden], .size-group[hidden] { display: none !important; }
.gallery-slide img, .gallery-slide .catalog-sprite { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: 1px solid #d8d7cf; border-radius: 50%; background: #fbfbf7ee; color: var(--ink); display: grid; place-items: center; font-size: 22px; }
.gallery-arrow:hover { background: var(--lime); border-color: var(--lime); }
.gallery-arrow-prev { left: 12px; }
.gallery-arrow-next { right: 12px; }
.gallery-caption { margin: 12px 0 0; font-size: .75rem; color: var(--muted); }
.gallery-controls { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; }
.gallery-counter { margin: 0; font-size: .7rem; color: var(--muted); }
.gallery-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding: 3px; }
.gallery-thumb { flex: 0 0 70px; width: 70px; height: 70px; padding: 3px; border: 1px solid #dedbd3; background: #f0eee8; }
.gallery-thumb.is-active { border: 2px solid var(--blue); }
.gallery-thumb img, .gallery-thumb .catalog-sprite { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-detail .product-info { width: 100%; min-width: 0; padding-top: 12px; }
.product-detail .product-info > .eyebrow { font-size: .65rem; color: var(--blue); letter-spacing: .14em; margin-bottom: 16px; }
.product-detail .product-info h1 { font-size: clamp(1.8rem, 2.8vw, 2.55rem); line-height: 1.08; letter-spacing: -.05em; max-width: 22ch; margin: 0 0 18px; overflow-wrap: anywhere; }
.product-detail .detail-price { font-size: 1.55rem; margin-bottom: 5px; }
.product-detail .product-info > .muted { font-size: .7rem; }
.product-detail .product-info .description { font-size: .9rem; line-height: 1.65; margin: 22px 0; }
.product-detail .product-buy { border-top: 1px solid var(--ink); margin-top: 24px; }
.selection-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 13px 0 22px; }
.selection-heading .eyebrow { margin: 0; font-size: .65rem; }
.selection-heading > span:last-child { font-size: .7rem; color: var(--muted); }
.picker-label { font-size: .85rem; margin-bottom: 12px; font-weight: 600; }
.picker-label strong { float: right; color: var(--blue); }
.color-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.color-option { display: flex; align-items: center; gap: 8px; position: relative; min-height: 58px; padding: 5px 12px 5px 5px; background: white; border: 1px solid var(--line); color: var(--ink); font-size: .8rem; text-align: left; }
.color-option img, .color-monogram { width: 44px; height: 48px; flex-shrink: 0; object-fit: contain; background: #f0eee8; }
.color-monogram { display: grid; place-items: center; font-family: var(--display); font-size: 1.4rem; }
.color-option small { display: block; font-size: .65rem; color: var(--muted); }
.color-option[aria-pressed="true"] { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.color-option.has-quantity::after { content: ''; position: absolute; width: 6px; height: 6px; border-radius: 50%; right: 5px; top: 5px; background: var(--blue); }
.color-check { color: var(--blue); opacity: 0; }
.color-option[aria-pressed="true"] .color-check { opacity: 1; }
.selection-guide { font-size: .75rem; color: var(--muted); margin: -5px 0 16px; }
.size-group { margin: 0 0 16px; min-width: 0; }
.size-group legend { font-size: .75rem; font-weight: 500; margin-bottom: 10px; }
.size-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 9px; }
.size-cell { display: flex; flex-direction: column; align-items: stretch; text-align: center; background: #f2f2ec; border: 1px solid transparent; padding: 9px 6px 7px; gap: 6px; }
.size-cell.is-selected { background: #eef1ff; border-color: var(--blue); }
.size-name { font-weight: 600; font-size: .85rem; }
.product-buy .size-cell input { width: 100%; min-height: 44px; border: 1px solid #c5c7be; padding: 8px 3px; font-size: 16px; text-align: center; background: white; border-radius: 0; }
.size-cell small { font-size: .6rem; color: var(--muted); }
.size-cell.is-sold-out { opacity: .55; }
.selection-receipt { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; margin-top: 4px; border-top: 1px solid var(--line); }
.selection-receipt span { font-size: .85rem; font-weight: 600; }
.selection-receipt > div > small { display: block; color: var(--muted); font-size: .7rem; margin-top: 4px; overflow-wrap: anywhere; }
.selection-receipt > strong { font-size: 1.1rem; white-space: nowrap; letter-spacing: -.03em; }
.selection-receipt strong small { font-size: .65rem; font-weight: 400; }
.purchase-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-buy .purchase-actions .btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 52px; padding: 13px 16px; border: 1px solid var(--ink); font-size: .8rem; }
.purchase-add { background: var(--ink); color: white; }
.purchase-now { background: var(--lime); color: var(--ink); }
.purchase-add:hover { background: var(--blue); }
.purchase-now:hover { background: #d0f754; }
.purchase-footnote { color: var(--muted); font-size: .68rem; line-height: 1.5; margin: 12px 0 0; }
.selection-error { font-size: .8rem; color: #a22424; }
.stock-note { font-size: .85rem; padding: 12px 0; }
.shipping-preview { margin: 24px 0; padding: 20px; border: 1px solid #dfe0d8; background: #f5f5ef; }
.shipping-preview .eyebrow { font-size: .65rem; margin-bottom: 8px; }
.shipping-preview h2 { font-size: 1.1rem; letter-spacing: -.03em; margin: 6px 0 18px; }
.shipping-preview label { display: block; font-size: .8rem; margin-bottom: 8px; }
.shipping-preview select { width: 100%; min-height: 48px; background: white; padding: 10px; border: 1px solid #bac2b6; font-size: 16px; }
.shipping-preview p { font-size: .8rem; line-height: 1.5; }
.shipping-preview .shipping-threshold { font-weight: 600; }
.shipping-preview .text-link { font-size: .75rem; }
.mobile-purchase { display: none; }
@media (max-width: 800px) {
  .product-detail .product-layout { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .product-detail .product-gallery { position: static; max-width: 440px; margin: auto; }
  .product-detail .product-info { max-width: 560px; margin: auto; padding-top: 0; }
  .product-detail .product-info h1 { font-size: clamp(1.75rem, 6vw, 2.15rem); margin-bottom: 15px; }
  .gallery-signature { padding: 8px 0; }
  .gallery-stage { max-height: 410px; }
  .gallery-thumb { flex-basis: 58px; width: 58px; height: 58px; }
  .gallery-caption { font-size: .7rem; }
  .product-detail .product-info .description { font-size: .875rem; margin: 18px 0; }
}
/* Una sola barra inferior, con el total de la selección actual. */
@media (max-width: 700px) {
  body.has-mobile-purchase { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .has-mobile-purchase .mobile-bottom { display: none; }
  .mobile-purchase:not([hidden]) { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; inset: auto 0 0; z-index: 44; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: #fbfbf7fa; border-top: 1px solid #dce1d9; }
  .mobile-purchase strong { display: block; font-size: 1.05rem; }
  .mobile-purchase small { font-size: .65rem; }
  .mobile-purchase span { display: block; font-size: .7rem; margin-top: 3px; }
  .mobile-purchase button { min-height: 48px; padding: 10px 14px; font-size: .75rem; }
  .has-mobile-purchase .floating-whatsapp { bottom: calc(100px + env(safe-area-inset-bottom)); }
  .selection-receipt { align-items: flex-start; }
  .selection-receipt > strong { font-size: 1rem; }
  .product-buy .purchase-actions .btn { padding: 12px; font-size: .75rem; }
}
@media (max-width: 360px) { .size-matrix { grid-template-columns: repeat(3, minmax(0, 1fr)); } .purchase-actions { grid-template-columns: 1fr; } }
