/* Product composition: the gallery and details share a bounded frame. */
.product-dialog { width:min(1120px,calc(100% - 64px)); max-width:1120px; height:min(780px,calc(var(--ar-viewport-height) - 64px)); max-height:calc(var(--ar-viewport-height) - 64px); overflow:hidden; }
.product-dialog>.modal-close { position:absolute; float:none; inset:12px 12px auto auto; margin:0; width:44px; height:44px; z-index:4; }
#product-detail { height:100%; min-height:0; }
.product-layout { display:grid; grid-template-columns:1fr 1fr; height:100%; min-height:0; }
.product-gallery { position:relative; top:auto; align-self:stretch; display:flex; flex-direction:column; height:100%; min-width:0; min-height:0; background:#e6e2da; overflow:hidden; }
.product-image-stage { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; padding:20px 24px 12px; }
.product-main-image { display:block; width:100%; height:100%; min-height:0; max-height:none; flex:none; object-fit:contain; object-position:center; }
.product-thumbnails { position:static; flex-shrink:0; display:flex; gap:12px; height:88px; padding:10px 24px 18px; overflow-x:auto; overscroll-behavior-x:contain; }
.product-thumbnails button { width:44px; min-width:44px; height:56px; min-height:56px; flex-shrink:0; }
.product-copy { min-width:0; min-height:0; padding:52px 36px 28px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; scrollbar-color:#beb4a7 transparent; overflow-wrap:anywhere; }
.product-copy h2 { font-size:clamp(36px,3.5vw,50px); margin-bottom:12px; }
.product-copy>.ar-eyebrow { margin-bottom:16px; }
.detail-price { margin-bottom:20px; }
.detail-description { margin-bottom:20px; }
.variant-label { margin:20px 0 8px; }
.product-copy>.size-link { margin:0 0 8px; }
.stock-message { min-height:32px; padding:8px 0; }
.detail-disclosures { margin-top:18px; }
.product-copy .solid, .product-copy .outline-button { min-width:0; }
.product-copy .solid>span { text-align:left; }
.product-copy .solid>.icon, .product-copy .outline-button>.icon { flex-shrink:0; }
.product-copy .form-note { margin-top:16px; }
/* The same image containment applies to isolated catalogue pieces. */
.product-image>img { object-fit:contain; }
@media(min-width:750px) and (max-width:989px) {
 .product-dialog { width:calc(100% - 40px); height:calc(var(--ar-viewport-height) - 40px); max-height:calc(var(--ar-viewport-height) - 40px); }
 .product-layout { grid-template-columns:.9fr 1fr; }
 .product-copy { padding:52px 24px 24px; }
 .product-copy h2 { font-size:38px; }
 .product-image-stage { padding-inline:16px; }
 .product-thumbnails { padding-inline:16px; }
}
@media(max-width:989px) {
 .product-dialog { width:100%; max-width:100%; height:auto; max-height:calc(var(--ar-viewport-height) - 12px); overflow-y:auto; inset:auto 0 0; margin:0; }
 #product-detail { height:auto; }
 .product-layout { display:block; height:auto; }
 .product-gallery { height:auto; }
 .product-image-stage { flex:none; height:clamp(260px,48svh,420px); padding:16px 20px 8px; }
 .product-thumbnails { height:76px; padding:8px 20px 12px; }
 .product-copy { overflow:visible; padding:24px 20px max(24px,env(safe-area-inset-bottom)); }
 .product-copy h2 { font-size:38px; }
 .product-dialog>.modal-close { position:sticky; float:right; top:10px; margin:10px 10px -54px 0; right:auto; }
 .detail-description { font-size:13px; line-height:1.75; }
}
@media(max-width:989px) and (max-height:500px) {
 .product-image-stage { height:240px; }
}

@media(max-width:989px) { html { scrollbar-gutter:auto; } }
@media(min-width:750px) and (max-width:989px) {
 .product-dialog { width:min(680px,calc(100% - 40px)); max-height:calc(var(--ar-viewport-height) - 40px); inset:0; margin:auto; }
 .product-image-stage { height:clamp(300px,48svh,420px); }
 .product-copy { padding-inline:32px; }
}
/* Landscape keeps the purchase controls alongside the image. */
@media(min-width:750px) and (max-height:500px) {
 .product-dialog { width:calc(100% - 40px); height:calc(var(--ar-viewport-height) - 40px); max-height:calc(var(--ar-viewport-height) - 40px); overflow:hidden; }
 #product-detail { height:100%; }
 .product-layout { display:grid; grid-template-columns:.9fr 1fr; height:100%; }
 .product-gallery { height:100%; }
 .product-image-stage { flex:1; height:auto; min-height:0; }
 .product-thumbnails { height:76px; }
 .product-copy { height:100%; min-height:0; padding:52px 24px 24px; overflow-y:auto; }
 .product-dialog>.modal-close { position:absolute; float:none; inset:12px 12px auto auto; margin:0; }
}
