.rivi-variant-selectors {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.rivi-variant-article {
    margin: 8px 0 12px;
    letter-spacing: 0;
}

.js-selectOfferItem.disabled,
.js-selectOfferItem[aria-disabled="true"] {
    cursor: not-allowed;
    opacity: 0.35;
}

.rivi-color-fallback {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 24px;
    min-height: 24px;
    border: 1px solid currentColor;
    background: transparent;
}

.product-card .color-palette .rivi-color-fallback {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

.rivi-color-selector .choice-color-option-image {
    box-sizing: border-box;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
}

.rivi-color-selector .choice-color-option-image > img,
.rivi-color-selector .choice-color-option-image > .rivi-color-fallback,
.rivi-color-selector .choice-color-option-item > img,
.rivi-color-selector .choice-color-option-item > .rivi-color-fallback {
    box-sizing: border-box;
    display: block;
    flex: 0 0 25px;
    width: 25px;
    min-width: 25px;
    max-width: 25px;
    height: 25px;
    min-height: 25px;
    max-height: 25px;
    object-fit: cover;
}

.choice-overflow-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rivi-size-dropdown,
.rivi-size-select,
.rivi-custom-select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.rivi-size-dropdown,
.rivi-custom-select {
    position: relative;
}

.rivi-size-select {
    display: block;
}

.rivi-custom-select__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.rivi-custom-select__toggle,
.rivi-custom-select__option {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    color: #ede4d7;
    font: inherit;
    letter-spacing: 0;
    text-align: left;
}

.rivi-custom-select__toggle {
    position: relative;
    display: flex;
    min-height: 50px;
    padding: 11px 44px 11px 16px;
    align-items: center;
    border: 1px solid rgba(237, 228, 215, 0.72);
    background: #242220;
    cursor: pointer;
}

.rivi-custom-select__value {
    display: block;
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.rivi-custom-select__arrow {
    position: absolute;
    top: 50%;
    right: 17px;
    width: 9px;
    height: 9px;
    border-right: 1px solid currentColor;
    border-bottom: 1px solid currentColor;
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.2s ease;
}

.rivi-custom-select__toggle[aria-expanded="true"] .rivi-custom-select__arrow {
    transform: translateY(-20%) rotate(225deg);
}

.rivi-custom-select__toggle:focus-visible {
    outline: 2px solid #ae9877;
    outline-offset: 2px;
}

.rivi-custom-select__list {
    position: absolute;
    top: calc(100% + 2px);
    right: 0;
    left: 0;
    z-index: 120;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    max-height: 260px;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid rgba(237, 228, 215, 0.72);
    background: #242220;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.rivi-custom-select__list[hidden] {
    display: none;
}

.rivi-custom-select__option {
    display: block;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.rivi-custom-select__option:hover,
.rivi-custom-select__option:focus-visible,
.rivi-custom-select__option[aria-selected="true"] {
    background: #5d5347;
    outline: 0;
}

.rivi-custom-select__option:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .rivi-variant-selectors--desktop {
        display: none;
    }
}

/* Furniture category images use a fixed frame without changing image proportions. */
.categories-one-option .categories-swiper .category a {
    width: 100%;
}

.categories-one-option .categories-swiper .category img {
    box-sizing: border-box;
    display: block;
    width: 100% !important;
    height: 142px !important;
    max-height: 142px !important;
    object-fit: contain;
    object-position: center;
    background: #fff;
}

@media (max-width: 635px) {
    .categories-one-option .categories-swiper .category img {
        height: 114px !important;
        max-height: 114px !important;
    }
}

@media (max-width: 435px) {
    .categories-one-option .categories-swiper .category img {
        height: 92px !important;
        max-height: 92px !important;
    }
}

/* Root catalog category tiles match the square mobile product photos. */
@media (max-width: 900px) {
    .categories-one-option--catalog-root .categories-swiper .swiper-wrapper .swiper-slide {
        width: calc((100% - 35px) / 2) !important;
        max-width: none !important;
    }

    .categories-one-option--catalog-root .categories-swiper .category img {
        height: auto !important;
        min-height: 0 !important;
        max-width: 100% !important;
        max-height: none !important;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        object-position: center;
        background: transparent;
    }
}

/* The product lightbox shows one complete image without scaled overlaps. */
.modal-product .modal-product-content {
    box-sizing: border-box;
    padding: 32px 72px 72px;
}

.modal-product .modal-product-swiper {
    box-sizing: border-box;
    width: 100% !important;
    height: 100% !important;
    max-width: 1600px;
    max-height: calc(100vh - 32px) !important;
    overflow: hidden !important;
    cursor: default;
}

.modal-product .modal-product-swiper .swiper-wrapper {
    height: 100%;
    overflow: visible;
}

.modal-product .modal-product-swiper .swiper-slide {
    box-sizing: border-box;
    display: flex;
    width: 100% !important;
    height: 100% !important;
    padding-bottom: 52px;
    align-items: center;
    justify-content: center;
}

.modal-product .modal-product-swiper .swiper-slide .slide-inner,
.modal-product .modal-product-swiper .swiper-slide-active .slide-inner {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: none !important;
}

.modal-product .modal-product-swiper .swiper-slide img,
.modal-product .modal-product-swiper .swiper-slide-active .slide-inner img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.modal-product .close-product-modal {
    top: 16px;
    right: 20px;
    z-index: 30;
    margin: 0;
}

.modal-product .modal-product-arrows {
    position: absolute;
    bottom: 16px !important;
    left: 50%;
    z-index: 30;
    display: flex;
    flex-direction: row-reverse;
    gap: 32px;
    width: auto;
    transform: translateX(-50%);
}

.modal-product .modal-product-arrows .swiper-button-next,
.modal-product .modal-product-arrows .swiper-button-prev {
    position: static;
    inset: auto;
    flex: 0 0 54px;
    width: 54px;
    height: 33px;
    margin: 0;
    transform: none;
}

@media (max-width: 645px) {
    .modal-product .modal-product-content {
        padding: 56px 12px 72px;
    }

    .modal-product .modal-product-swiper {
        max-height: 100vh;
    }

    .modal-product .close-product-modal {
        top: 8px;
        right: 8px;
    }

    .modal-product .close-product-modal svg {
        width: 48px;
        height: 48px;
    }
}

/* Optional Radostone console accessory. */
.radostone-addon {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 12px;
    width: 100%;
    margin: 0 0 18px;
    padding: 14px 0;
    align-items: center;
    border-top: 1px solid rgba(237, 228, 215, 0.22);
    border-bottom: 1px solid rgba(237, 228, 215, 0.22);
    color: #ede4d7;
    cursor: pointer;
}

.radostone-addon input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.radostone-addon__check {
    position: relative;
    box-sizing: border-box;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(237, 228, 215, 0.72);
}

.radostone-addon input:checked + .radostone-addon__check::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 7px;
    width: 6px;
    height: 10px;
    border-right: 2px solid #ede4d7;
    border-bottom: 2px solid #ede4d7;
    transform: rotate(45deg);
}

.radostone-addon input:focus-visible + .radostone-addon__check {
    outline: 2px solid #ae9877;
    outline-offset: 3px;
}

.radostone-addon__name {
    min-width: 0;
    font-size: 16px;
    line-height: 1.3;
}

.radostone-addon__price {
    font-size: 16px;
    font-weight: 400;
    white-space: nowrap;
}

@media (max-width: 767px) {
    .radostone-addon--mobile {
        margin-top: 18px;
    }

    .radostone-addon__name,
    .radostone-addon__price {
        font-size: 15px;
    }
}
