.pb-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--pb-gap-lg);
    max-width: 960px;
    margin: calc(var(--pb-gap-lg) + 8px) auto 0;
}

.pb-compare {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: #f4f4f4;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
    margin: 0 auto;
}

.pb-compare__figure,
.pb-compare__figure img.pb-compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pb-compare__figure--clip {
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.pb-compare__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--pos);
    width: 2px;
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 2;
}

.pb-compare__handle::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.15s ease;
}

.pb-compare:hover .pb-compare__handle::after,
.pb-compare:focus-within .pb-compare__handle::after {
    transform: translate(-50%, -50%) scale(1.08);
}

.pb-compare__handle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 26px;
    height: 14px;
    transform: translate(-50%, -50%);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 16'%3E%3Cpath d='M9 2 L2 8 L9 14' stroke='%23333' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M21 2 L28 8 L21 14' stroke='%23333' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
}

.pb-compare__range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    appearance: none;
}

.pb-compare__badge {
    position: absolute;
    top: 16px;
    padding: 7px 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    border-radius: 999px;
    z-index: 3;
    transition: opacity 0.15s ease;
}
.pb-compare__badge--before { left: 16px; }
.pb-compare__badge--after  { right: 16px; }

.pb-static-grid {
    display: flex;
    flex-direction: column;
    gap: var(--pb-gap-lg);
    max-width: 960px;
    margin: calc(var(--pb-gap-lg) + 8px) auto 0;
}

.pb-static-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--pb-gap-md);
}

.pb-static-pair__figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #f4f4f4;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.pb-static-pair__img {
    width: 100%;
    height: 600px;
    max-height: 600px;
    object-fit: cover;
    display: block;
}

.pb-static-pair__title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 32px var(--pb-gap-sm) 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #fff;
}

@media (max-width: 640px) {
    .pb-static-pair {
        grid-template-columns: 1fr;
    }
    .pb-static-pair__img {
        height: 420px;
        max-height: 420px;
    }
}

.pb-before-after .pb-footnote {
    max-width: 640px;
    margin: 28px auto 0;
    padding: var(--pb-gap-sm) var(--pb-gap-md);
    background: #f8f8f8;
    border-radius: var(--pb-radius);
    text-align: center;
}
