.pbu-comparison { width: 100%; margin-block: 0; }
.pbu-comparison__stage { user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.pbu-comparison__stage img { -webkit-user-drag: none; }
.pbu-comparison[hidden], .pbu-comparison-slot[hidden] { display: none !important; }
.pbu-comparison-slot [data-pbu-comparison-index][hidden] { display: none !important; }
.pbu-comparison-editor__pair { border: 1px solid #c3c4c7; margin-block: 12px; border-radius: 3px; }
.pbu-comparison-editor__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 16px; }
.pbu-comparison-editor [data-pbu-comparison-preview] { width: 100%; max-width: 1020px; margin-inline: auto; }
.pbu-comparison-editor [data-pbu-comparison-preview] .pbu-comparison__after img { max-height: 680px; width: 100%; object-fit: contain; }
.pbu-comparison-editor__pair > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; cursor: pointer; background: #f6f7f7; }
.pbu-comparison-editor__pair > summary::before { content: "+"; font-size: 20px; }
.pbu-comparison-editor__pair[open] > summary::before { content: "\2212"; }
.pbu-comparison-editor__pair > summary:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }
.pbu-comparison-editor__pair > summary img { width: 56px; height: 42px; object-fit: cover; }
.pbu-comparison-editor__pair > summary span { flex: 1; overflow-wrap: anywhere; }
.pbu-comparison-badge { display: block; font-size: .75rem; background: #222; color: white; padding: .15rem .3rem; }
.pbu-gallery-viewer__image[hidden], .pbu-gallery-meta[hidden] { display: none !important; }
.image-display.has-comparison { width: 100%; max-width: min(100%, calc(clamp(260px, 52vw, 680px) * var(--pbu-comparison-ratio, 1.5))); }
.screen.has-comparison { height: auto; block-size: auto; display: block; background: transparent; }
.screen.has-comparison .pbu-comparison__stage { height: clamp(260px, 52vw, 680px); }
.screen.has-comparison .pbu-comparison__after { height: 100%; }
.screen.has-comparison .pbu-comparison__stage img { width: 100%; height: 100%; inline-size: 100%; block-size: 100%; object-fit: contain; }
.screen.has-comparison .pbu-comparison__control, .screen.has-comparison .pbu-comparison__details { padding-inline: .75rem; }
.screen.has-comparison .pbu-comparison__details { display: none; }
.screen.has-comparison .pbu-comparison__control { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.pbu-comparison:focus-within .pbu-comparison__divider { box-shadow: 0 0 0 3px #2271b1; }
.screen.has-comparison figcaption { font: inherit; font-size: .8rem; border-radius: 4px; background: rgb(0 0 0 / 65%); }
.thumbnail:has(.pbu-comparison-badge) { position: relative; }
.thumbnail .pbu-comparison-badge { position: absolute; right: .35rem; bottom: .35rem; border-radius: 50%; width: 1.5rem; height: 1.5rem; padding: 0; text-align: center; line-height: 1.5rem; }
.pbu-comparison__stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: #f4f4f4; overflow: hidden; }
.pbu-comparison figure { margin: 0; min-width: 0; }
.pbu-comparison img { display: block; width: 100%; height: auto; }
.pbu-comparison figcaption { padding: .4rem .7rem; background: #222; color: #fff; }
.pbu-comparison__divider { display: none; }
.pbu-comparison.is-ready .pbu-comparison__stage { display: block; touch-action: pan-y; cursor: ew-resize; }
.pbu-comparison.is-ready .pbu-comparison__after { position: relative; }
.pbu-comparison.is-ready .pbu-comparison__before { position: absolute; inset: 0; z-index: 1; clip-path: inset(0 calc(100% - var(--pbu-position, 50%)) 0 0); }
.pbu-comparison.is-ready .pbu-comparison__before img { height: 100%; object-fit: contain; background: #f4f4f4; }
.pbu-comparison.is-ready figcaption { position: absolute; top: .5rem; right: .5rem; }
.pbu-comparison.is-ready .pbu-comparison__before figcaption { right: auto; left: .5rem; }
.pbu-comparison.is-ready .pbu-comparison__divider { display: block; position: absolute; inset-block: 0; left: var(--pbu-position, 50%); width: 3px; background: #fff; box-shadow: 0 0 3px #222; z-index: 2; pointer-events: none; }
.pbu-comparison__divider::after { content: "\2194"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; box-sizing: border-box; width: 44px; height: 44px; padding: 0; background: #fff; color: #222; border-radius: 50%; font-size: 24px; line-height: 1; }
.pbu-comparison__control:not([hidden]) { display: grid; gap: .5rem; margin-top: .75rem; }
.pbu-comparison__control input { width: 100%; accent-color: #2271b1; }
.pbu-comparison__control input:focus-visible { outline: 3px solid #2271b1; outline-offset: 4px; }
.pbu-comparison__details { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pbu-comparison__details p { display: flex; flex-wrap: wrap; gap: .5rem 1rem; }
.pbu-comparison-editor__choices { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pbu-comparison-editor__choices fieldset { max-height: 320px; overflow: auto; border: 1px solid #c3c4c7; padding: .75rem; }
.pbu-comparison-editor__choices legend { font-weight: 600; }
.pbu-comparison-editor__choice { display: inline-flex; flex-direction: column; width: 110px; padding: .5rem; vertical-align: top; overflow-wrap: anywhere; }
.pbu-comparison-editor__choice img { width: 100px; height: 75px; object-fit: cover; margin-block: .5rem; }
.pbu-comparison-editor__choice:has(input:checked) { background: #e5f5ff; outline: 2px solid #2271b1; }
@media(max-width:600px) { .pbu-comparison__details, .pbu-comparison-editor__choices { grid-template-columns: 1fr; } }
