/* The original product photos stay intact. Framing uses measured white margins. */
.gallery-open{display:block;position:relative;width:100%;height:100%;padding:0;border:0;background:#fff;overflow:hidden;cursor:zoom-in;border-radius:14px;color:#264778}
.gallery-open:focus-visible{outline:3px solid var(--primary);outline-offset:-4px}
.gallery-open .detail-image{position:absolute;max-width:none!important;max-height:none!important;object-fit:contain;inset:auto;margin:0;align-self:auto}
#entityView #productDetail .gallery-stage{height:clamp(300px,39vw,440px);padding:0;background:#fff;border-radius:14px}
.gallery-open{touch-action:pan-y;user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent}
.gallery-open.is-zoomed{cursor:zoom-out;touch-action:none}
.gallery-open .detail-image{pointer-events:none;-webkit-user-drag:none}
.gallery .gallery-open .detail-image{max-width:none!important;max-height:none!important;position:absolute;width:100%;height:100%;display:block;margin:0}
@media(max-width:700px){#entityView #productDetail .gallery-stage{height:clamp(240px,38dvh,340px)}#entityView #productDetail .gallery{padding:12px}#entityView #productDetail .gallery-thumbs button{width:48px;height:40px}#entityView #productDetail .gallery-thumbs img{height:36px}}

.home-sofas{margin-block:20px 26px}.home-sofas .product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.home-sofas .product-photo{aspect-ratio:4/3;background:#f0ece7}.home-sofas .product-photo img{object-fit:contain}.sofa-known-price{padding:18px;border-radius:12px;background:var(--surface-soft);display:grid;gap:6px}.sofa-known-price>span{font-size:12px}.sofa-known-price>strong{font-size:34px;color:var(--primary)}.sofa-known-price p{margin:0;font-size:15px;font-weight:650}.sofa-payment-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-block:14px}.sofa-payment-grid>div{display:grid;gap:5px;padding:10px;border:1px solid var(--line);border-radius:9px;font-size:11px}.sofa-payment-grid strong{font-size:15px}.sofa-payment-grid small{color:var(--muted)}
@media(max-width:700px){.home-sofas .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.home-sofas .product-card:last-child{grid-column:1/-1;max-width:100%}.home-sofas .product-card:last-child .product-photo{aspect-ratio:16/9}.home-sofas .section-heading h2{font-size:21px}.home-sofas .section-heading{gap:10px}.home-sofas .text-link{font-size:11px}.sofa-payment-grid{gap:5px}.sofa-payment-grid>div{padding:8px}.sofa-payment-grid strong{font-size:13px}}

/* Keep the two short footer groups together on phones. */
@media(max-width:620px){.footer-links>div:last-child{grid-column:auto}}
