/* Product photos stay inside the existing A/B columns on every screen. */
.compare-primary-photos{--product-photo-height:220px}
.compare-primary-photos>.compare-cell{display:flex;align-items:stretch}
.product-gallery,.product-photo-unavailable{display:grid;flex:1;grid-template-rows:var(--product-photo-height,220px) 44px minmax(0,1fr) auto;gap:8px;align-content:start;min-width:0}
.photo-unavailable-notice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px;background:#f5f8f0;text-align:center}
.photo-notice-title{font-size:15px;line-height:1.6;word-break:keep-all}
.compare-cell .product-photo-unavailable p{font-size:13px!important;line-height:1.7;color:#60715f}.photo-source-link{display:flex!important;align-items:center;justify-content:center;min-height:44px;font-size:13px;text-decoration:underline;text-underline-offset:4px}
@media(max-width:600px){.compare-primary-photos{--product-photo-height:150px}.photo-unavailable-notice{padding:12px;gap:8px}.photo-notice-title{font-size:13px}.compare-cell .product-photo-unavailable p{font-size:12px!important}.photo-source-link{font-size:12px}}
@media(max-width:350px){.compare-primary-photos{--product-photo-height:128px}.photo-unavailable-notice{padding:8px;gap:6px}}
.product-gallery [hidden],.product-photo-unavailable [hidden],.gallery-modal[hidden]{display:none!important}
.product-gallery{position:relative;min-width:0}
.gallery-viewport{grid-row:1;position:relative;min-width:0;height:var(--product-photo-height,220px);border:1px solid var(--line,#dce5d5);border-radius:8px;overflow:hidden;touch-action:pan-y pinch-zoom}
.gallery-slide{height:100%}
.gallery-open{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:8px;border:0;background:#fff;cursor:zoom-in;color:inherit;-webkit-tap-highlight-color:transparent;touch-action:pan-y pinch-zoom}
.gallery-open img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}
.gallery-open img{user-select:none;-webkit-user-drag:none}
.gallery-open:focus-visible{outline:3px solid #367b28;outline-offset:-4px}
.gallery-step:focus-visible,.gallery-thumb:focus-visible,.gallery-modal button:focus-visible{outline:3px solid #367b28;outline-offset:3px}
.gallery-controls{grid-row:2;display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px}
.gallery-controls-multiple{justify-content:space-between}
.gallery-step{display:grid;place-items:center;border:1px solid var(--line,#dce5d5);border-radius:50%;background:#f5f8f0;color:var(--ink,#203924);width:44px;height:44px;padding:0;font-size:25px;line-height:1;cursor:pointer;touch-action:manipulation;flex-shrink:0}
.gallery-step:hover{background:#e8f4da}
.gallery-counter{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--muted,#60715f)}
.gallery-thumbnails{grid-row:3;display:flex;align-items:center;align-self:start;gap:6px;min-width:0;max-width:100%;min-height:56px;overflow-x:auto;padding:4px;scrollbar-width:thin;touch-action:pan-x pan-y pinch-zoom}
.gallery-thumb{display:block;flex:0 0 48px;width:48px;height:48px;padding:3px;border:1px solid var(--line,#dce5d5);border-radius:6px;background:#fff;cursor:pointer;touch-action:manipulation}
.gallery-thumb[aria-current=true]{border:2px solid #367b28;padding:2px;background:#edf7e4}
.compare-photo .gallery-thumb img{width:100%;height:100%;object-fit:contain;pointer-events:none}
.gallery-hint{grid-row:4;display:block;text-align:center;font-size:11px;line-height:1.5;color:var(--muted,#60715f);word-break:keep-all}
.gallery-modal{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:20px;background:rgb(8 18 10 / .86);overscroll-behavior:contain;isolation:isolate}
.gallery-modal-panel{width:min(1040px,100%);height:min(88dvh,860px);max-height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:12px;background:#fff;color:#203924;padding:16px;border-radius:14px;box-shadow:0 14px 60px #0007;overflow:hidden}
.gallery-modal-header{display:flex;align-items:center;justify-content:space-between;gap:14px;min-width:0}
.gallery-modal h2{font-size:16px;line-height:1.5;letter-spacing:-.03em;overflow-wrap:anywhere;min-width:0;max-height:4.5em;overflow:auto}
.gallery-modal-close{flex-shrink:0;width:44px;height:44px;display:grid;place-items:center;border:1px solid #dce5d5;border-radius:50%;background:#fff;color:#203924;cursor:pointer;font-size:25px;line-height:1;touch-action:manipulation}
.gallery-modal-stage{position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;min-height:0;min-width:0;background:#fafcf7;border-radius:8px;touch-action:none;cursor:default;user-select:none}
.gallery-modal-stage.can-zoom{cursor:zoom-in}
.gallery-modal-stage.is-zoomed{cursor:grab}
.gallery-modal-stage.is-dragging{cursor:grabbing}
.gallery-modal-image{display:block;width:auto;height:auto;max-width:100%;max-height:100%;flex-shrink:1;object-fit:contain;transform-origin:center;will-change:transform;pointer-events:none;user-select:none;-webkit-user-drag:none}
.gallery-modal-tools{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap}
.gallery-modal-tools button{min-width:44px;min-height:40px;padding:5px 12px;border:1px solid #dce5d5;border-radius:8px;background:#f5f8f0;color:#203924;font:inherit;font-size:14px;cursor:pointer;touch-action:manipulation}
.gallery-modal-tools button:disabled{opacity:.4;cursor:default}
.gallery-modal-tools [data-modal-prev],.gallery-modal-tools [data-modal-next]{font-size:24px;padding-block:0}
.gallery-modal-counter{min-width:36px;text-align:center;font-size:14px;font-variant-numeric:tabular-nums}
.gallery-modal-caption{font-size:12px;line-height:1.6;text-align:center;color:#60715f;max-height:4.8em;overflow:auto;overflow-wrap:anywhere}
.gallery-modal-note{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){.gallery-hint{font-size:10px}.gallery-modal{padding:12px}.gallery-modal-panel{height:90dvh;padding:12px;gap:10px;border-radius:10px}.gallery-modal h2{font-size:14px}.gallery-modal-tools{gap:6px}.gallery-modal-tools button{min-width:38px;padding-inline:8px;font-size:12px}.gallery-modal-caption{font-size:11px}.gallery-controls{gap:3px}}
@media(prefers-reduced-motion:reduce){.gallery-modal *{scroll-behavior:auto!important}}
