.product-media{position:relative;min-width:0;isolation:isolate}
.product-media .product-photo{position:relative;display:block;width:100%;overflow:hidden}
.catalog-page .product-card .product-image{mix-blend-mode:normal;transition:transform .6s ease,opacity .45s ease}
.product-media .product-reverse{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;pointer-events:none}
.product-media.reverse-ready.show-reverse .product-reverse{opacity:1}
.product-media.reverse-ready.show-reverse .product-image:first-child{opacity:0}
.product-card .product-open-icon{position:absolute;right:13px;bottom:13px;z-index:2;display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#fafaf7;color:#29372b;transition:transform .3s ease;pointer-events:none}
.product-open-icon svg,.view-toggle svg{width:20px;height:20px;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
@media(hover:hover) and (pointer:fine){.product-card .product-photo:hover .product-image{transform:scale(1.025)}.product-card .product-photo:hover .product-open-icon{transform:rotate(90deg)}.product-media.reverse-ready .product-photo:hover .product-reverse{opacity:1}.product-media.reverse-ready .product-photo:hover .product-image:first-child{opacity:0}.product-card .view-toggle{display:none}}
.product-card .view-toggle,.product-card .view-toggle[aria-pressed=true]{position:absolute;left:9px;bottom:9px;z-index:2;width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;border:0;border-radius:50%;background:#fafaf7;color:#354036;cursor:pointer;align-items:center;justify-content:center}
.product-card .view-toggle[hidden]{display:none!important}
@media(hover:none),(pointer:coarse){.product-card .view-toggle{display:flex}.product-card .product-open-icon{width:36px;height:36px;right:13px;bottom:13px}}
.view-toggle:hover{background:#fff}.view-toggle:focus-visible,.product-view-controls button:focus-visible{outline:2px solid #355344;outline-offset:3px}
.product-view-controls{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 0}
.product-view-controls button{display:flex;align-items:center;justify-content:center;width:72px;height:72px;padding:3px;border:1px solid transparent;background:transparent;cursor:pointer}
.product-view-controls button img{display:block;width:60px;height:60px;object-fit:contain;mix-blend-mode:normal}
.product-view-controls button[aria-pressed=true]{border-color:#354036;box-shadow:none;background:transparent}
.product-view-controls button[hidden]{display:none}
@media(prefers-reduced-motion:reduce){.catalog-page .product-card .product-image,.product-card .product-open-icon{transition:none;transform:none!important}}

/* Hide legacy card switches too if an already-open page retains older JS. */
.product-card .view-toggle{display:none!important}

/* Product detail external links, preview styling. */
.preview-detail .detail-resource-links{display:grid;gap:10px;margin-top:20px}
.preview-detail .detail-resource-link{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;min-height:52px;box-sizing:border-box;padding:14px 18px;border:1px solid #cbd3c8;background:#f7f8f4;color:#29372b;font-size:14px;line-height:1.5;text-decoration:none;transition:background .2s,border-color .2s}
.preview-detail .detail-resource-link:hover{background:#edf0e8;border-color:#8a9a88}
.preview-detail .detail-resource-link:focus-visible{outline:2px solid #355344;outline-offset:3px}

.preview-detail .detail-resource-link-centered{justify-content:center;gap:40px;background:#eeefe7}
.preview-detail .detail-resource-link-centered:hover{background:#e5e9df}

/* Product source photographs are square; preserve the complete photograph. */
#productDialog .preview-detail{align-items:start;gap:clamp(16px,3vw,30px)}
#productDialog #selectedFramePhoto{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain}
#productDialog .colors{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
#productDialog .colors label{padding:6px;min-width:0}
#productDialog .colors .color-thumbnail{width:100%;height:auto;aspect-ratio:1;object-fit:contain}
@media(max-width:420px){#productDialog .colors{grid-template-columns:repeat(2,minmax(0,1fr))}}
