/* Scoped to the generic product page; preserves the existing light/dark theme. */
.item-page .generic-product>section{min-width:0}
.item-page .panel h1{overflow-wrap:anywhere}
.item-page #customOptions input:not([type="checkbox"]):not([type="hidden"]),.item-page #customOptions select,.item-page #customOptions textarea{max-width:100%;font-size:16px}
.item-page #genericSwatches .swatch{width:44px;height:44px}
.item-page .swatch[aria-pressed="true"]{outline:2px solid var(--terra);outline-offset:3px}
.item-page .gallery-thumb:focus-visible,.item-page .image-lightbox button:focus-visible{outline:3px solid var(--terra);outline-offset:3px}
.item-page .purchase-status{font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.item-page .purchase-status:empty{display:none}
.item-page .product-unavailable{grid-column:1/-1}
.item-page.lightbox-open{overflow:hidden}
.item-page .image-lightbox button{min-width:44px;min-height:44px}
.item-page .image-lightbox .lb-close{top:max(18px,env(safe-area-inset-top));right:max(18px,env(safe-area-inset-right))}
.item-page .image-lightbox .lb-count{bottom:max(18px,env(safe-area-inset-bottom))}
@media(max-width:700px){
 .item-page .generic-product{gap:18px;padding-top:16px}
 .item-page .generic-media{min-height:0;padding:8px;border-radius:20px}
 .item-page .product-gallery-main img{object-fit:contain!important}
 .item-page .panel h1{font-size:28px;line-height:1.18;margin:6px 0 10px}
 .item-page .backlink{margin-bottom:8px;min-height:44px;display:flex;width:fit-content;align-items:center}
 .item-page .purchase-tools{display:flex;flex-wrap:wrap;gap:12px}
 .item-page .qty-stepper{grid-template-columns:44px minmax(0,1fr) 44px!important;max-width:200px;gap:0}
 .item-page .qty-stepper button{height:44px!important;min-height:44px;min-width:44px}
 .item-page #itemQty{height:44px!important;min-height:44px;font-size:16px;max-width:none}
 .item-page .sticky-buy{display:flex!important;flex-wrap:wrap;gap:8px!important;padding:0;box-shadow:none;background:transparent}
 .item-page .sticky-buy #genericAdd{flex:1 0 100%;min-height:52px!important}
 .item-page .sticky-buy .btn:not(#genericAdd){flex:1 1 120px;min-height:44px!important;margin:0}
 .item-page .gallery-thumbs{gap:8px}
 .item-page .info-box{padding:14px}
}

.item-page .product-zoom-btn{min-height:44px;min-width:44px}
.item-page .product-photo-error{position:absolute;inset:30% 16px auto;margin:0;padding:16px;text-align:center;color:var(--text,var(--ink));background:var(--card,#fff);border-radius:12px;font-size:14px}

/* Portrait products must remain entirely visible in recommendation cards. */
.item-page .related-card>img,.item-page .recent-card>img{height:auto;aspect-ratio:1/1;object-fit:contain;object-position:center;padding:10px}
.item-page .related-card>div,.item-page .recent-card{min-width:0;overflow-wrap:anywhere}
.item-page .related-section .section-head{flex-wrap:wrap;align-items:center}
