/* Controles de imágenes: sin cambios en las dimensiones de las tarjetas. */
.catalog-page [data-product-gallery]{cursor:zoom-in}
.catalog-page [data-product-gallery]:focus-visible{outline:3px solid #708a18;outline-offset:4px}
.product-gallery{box-sizing:border-box;width:min(700px,calc(100% - 32px));max-height:90dvh;padding:24px;border:1px solid #dc397740;border-radius:24px;background:#fcf9f5;color:#203e36;overflow:auto}
.product-gallery::backdrop{background:#102b24b8}
.product-gallery h2{margin:4px 48px 16px 0;font-style:italic}
.product-gallery .gallery-close{position:absolute;right:14px;top:12px;font-size:28px;line-height:1;padding:8px;width:44px;height:44px;border-radius:50%;background:#dc3977;border:0;color:white}
.gallery-stage{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:10px;align-items:center}
.gallery-stage .gallery-photo{width:auto;height:auto;max-width:100%;max-height:min(52dvh,520px);justify-self:center;object-fit:contain;touch-action:pan-y;user-select:none}
.gallery-stage button{width:44px;height:44px;padding:0;border-radius:50%;background:#dc3977;border:0;font-size:24px;color:white}
.gallery-stage button[hidden]{display:none}
.gallery-stage:has(button[hidden]){grid-template-columns:minmax(0,1fr)}
.product-gallery .gallery-counter{text-align:center;margin:10px auto;font-size:14px}
.product-gallery .gallery-description{white-space:pre-line;margin:10px 0 16px}
.admin-gallery-list{display:grid;gap:18px;margin:0 0 22px}
.admin-gallery-image{min-width:0;border:1px solid #203e3630;border-radius:12px;padding:16px;margin:0}
.admin-gallery-image legend{font-weight:700;padding:0 6px}
.admin-gallery-image img{display:block;width:120px;height:90px;object-fit:contain;margin-bottom:12px}
.admin-gallery-image input[type=radio],.admin-new-primary input[type=radio]{min-height:0;width:auto;accent-color:#dc3977}
.admin-gallery-image input[type=file]{max-width:100%}
@media(prefers-reduced-motion:no-preference){
 @keyframes gallery-expand{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
 .product-gallery[open]{animation:gallery-expand 180ms ease-out}
}
@media(max-width:480px){.product-gallery{padding:20px 14px;width:calc(100% - 20px)}.gallery-stage{grid-template-columns:44px minmax(0,1fr) 44px;gap:4px}.product-gallery h2{font-size:25px}.gallery-stage .gallery-photo{max-height:40dvh}.product-gallery .reference-cta{font-size:18px;padding:14px 18px}}
