.bpg-property-gallery,
.bpg-property-gallery * {
    box-sizing: border-box;
}

.bpg-property-gallery {
    --bpg-radius: 21px;
    --bpg-gap: 10px;
    --bpg-thumb-width: 160px;
    --bpg-thumb-height: 160px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.bpg-main-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--bpg-radius);
    background: #f1f1f1;
}

.bpg-main-stage::before {
    content: "";
    display: block;
    padding-top: 65.1%;
}

.bpg-main-image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    opacity: 1;
    transition: opacity .16s ease;
}

.bpg-main-image.is-changing {
    opacity: .3;
}

.bpg-thumbs-viewport {
    width: 100%;
    margin-top: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.bpg-thumbs-viewport::-webkit-scrollbar {
    display: none;
}

.bpg-thumbs-track {
    display: flex;
    gap: var(--bpg-gap);
    width: max-content;
    min-width: 100%;
}

.bpg-thumb {
    position: relative;
    flex: 0 0 var(--bpg-thumb-width);
    width: var(--bpg-thumb-width);
    height: var(--bpg-thumb-height);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: #efefef;
    cursor: pointer;
    outline: none;
    transition: transform .18s ease, opacity .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.bpg-thumb:hover {
    transform: translateY(-1px);
}

.bpg-thumb:focus-visible {
    box-shadow: 0 0 0 3px rgba(0,0,0,.25);
}

.bpg-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.bpg-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 0 solid transparent;
    pointer-events: none;
}

.bpg-thumb.is-active::after {
    border-width: 2px;
    border-color: rgba(0,0,0,.18);
}

.bpg-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 18px;
    margin-top: 4px;
}

.bpg-dot {
    width: 6px;
    height: 6px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #c9c9c9;
    transition: background .18s ease, transform .18s ease;
}

.bpg-dot.is-active {
    background: #111;
    transform: scale(1.12);
}

.bpg-error {
    padding: 12px 14px;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    background: #fafafa;
    color: #8a1f11;
    font-size: 14px;
}

/* Tablet */
@media (max-width: 1024px) {
    .bpg-property-gallery {
        --bpg-thumb-width: 138px;
        --bpg-thumb-height: 138px;
        --bpg-gap: 9px;
        --bpg-radius: 18px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .bpg-property-gallery {
        --bpg-thumb-width: 104px;
        --bpg-thumb-height: 104px;
        --bpg-gap: 8px;
        --bpg-radius: 14px;
    }

    .bpg-main-stage::before {
        padding-top: 67%;
    }

    .bpg-thumbs-viewport {
        margin-top: 10px;
    }

    .bpg-thumb {
        border-radius: 12px;
    }

    .bpg-dots {
        gap: 9px;
        margin-top: 3px;
    }

    .bpg-dot {
        width: 5px;
        height: 5px;
    }
}

/* Very small phones */
@media (max-width: 420px) {
    .bpg-property-gallery {
        --bpg-thumb-width: 88px;
        --bpg-thumb-height: 88px;
    }
}
