:root {
    /* Цветовые токены */
    --color-dark: #20000A;
    --color-light: #E2DDD7;
    --color-bg-light: #E0DCD5;
    --color-bg-white: #FFFFFF;

    /* Тема по умолчанию — тёмный хедер (на фоне изображения) */
    --header-text: var(--color-light);
    --header-bg: transparent;
}

html, body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--color-bg-white);
    color: var(--color-dark);
    min-height: 100%;
}

body {
    height: 100dvh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@supports (height: 100dvh) {
    body {
        height: 100dvh;
        min-height: 100dvh;
    }
}

.bojeni-main {
    position: relative;
    background-color: #E6E0D7;
}
@media (max-width: 900px) {
    .bojeni-site .bojeni-main {
        padding-bottom: 0;
    }
}



/*КАРТОЧКА ТОВАРА*/

.bojeni-product-card {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bojeni-product-card__image-wrap {
    position: relative;
    display: block;
    aspect-ratio: 588 / 664;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 4px rgba(94,94,94,0.2);
    border: 1px solid #e6dad1;
}

/* Фоновый градиент карточки */
.bojeni-product-card__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, #808080, #d6d1ca);
    border-radius: 14px;
}

/* Фото */
.bojeni-product-card__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* Иконки свойств (ICON → HLBlock) */
.bojeni-product-card__icons {
    position: absolute;
    top: 19px;
    left: 19px;
    display: flex;
    gap: 10px;
    z-index: 2;
}
.bojeni-product-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f6f6f6;
    border: 1px solid #20000a;
    border-radius: 7px;
    overflow: hidden;
    font-size: 12px;
    font-weight: 400;
    color: #20000a;
}
.bojeni-product-card__icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

/* Переключатель цветов */
.bojeni-product-card__colors {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.bojeni-product-card__color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.5);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.bojeni-product-card__color-dot:hover,
.bojeni-product-card__color-dot.is-active {
    transform: scale(1.2);
    border-color: #fff;
}

/* Нижняя часть */
.bojeni-product-card__info {
    padding: 14px 0 6px;
}
.bojeni-product-card__name {
    display: block;
    font-size: 16px;
    font-weight: 300;
    color: var(--color-light);
    text-decoration: none;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.bojeni-product-card__price {
    font-size: 16px;
    font-weight: 300;
    color: var(--color-light);
}

/* =========================================
   SKU — точки цветов на карточке товара
   (вынесены сюда, чтобы работали на любой
    странице, не только в каталоге)
   ========================================= */

.bojeni-catalog-section .product-item-scu-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 0;
    overflow: visible;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.bojeni-catalog-section .product-item-scu-container * {
    pointer-events: auto;
}

.bojeni-catalog-section .product-item-scu-block-title {
    display: none;
}

.bojeni-catalog-section .product-item-scu-item-list {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 2;
    justify-content: center;
}

.bojeni-catalog-section .product-item-scu-item-color-container {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: transform 0.15s, border-color 0.15s;
    flex-shrink: 0;
    position: relative;
}

.bojeni-catalog-section .product-item-scu-item-color-container:hover,
.bojeni-catalog-section .product-item-scu-item-color-container.bx-active {
    transform: scale(1.2);
    border-color: #fff;
}

.bojeni-catalog-section .product-item-scu-item-color-block {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* Скрываем лишние блоки в списке (цвета SKU оставляем) */
.bojeni-catalog-section .product-item-compare-container,
.bojeni-catalog-section .product-item-button-container,
.bojeni-catalog-section .product-item-amount,
.bojeni-catalog-section [data-entity="quantity-block"],
.bojeni-catalog-section [data-entity="buttons-block"],
.bojeni-catalog-section [data-entity="props-block"] {
    display: none !important;
}

/* Bitrix по умолчанию скрывает product-item-hidden — показываем SKU-блок принудительно */
.bojeni-catalog-section .product-item-info-container:has(.product-item-scu-container),
.bojeni-catalog-section .product-item-scu-container {
    display: block !important;
    visibility: visible !important;
}

/* Лейблы скидок/акций */
.bojeni-catalog-section .product-item-label-ring,
.bojeni-catalog-section .product-item-label-text {
    z-index: 2;
}

/*ТУЛБАР КАТАЛОГА*/

/* Активные теги фильтра */
.bojeni-catalog-section__active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}
.bojeni-catalog-section__filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 5px;
    border: 1px solid rgba(32, 0, 10, 0.25);
    background: none;
    font-family: var(--font-main);
    font-weight: 300;
    color: var(--color-dark, #20000A);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
    text-decoration: none;
    font-size: 16px;
    line-height: 21.28px;
    letter-spacing: -0.16px;
    vertical-align: middle;
}
.bojeni-catalog-section__filter-tag:hover {
    background: rgba(32, 0, 10, 0.05);
}
.bojeni-catalog-section__filter-reset {
    font-family: var(--font-main);
    color: rgba(32, 0, 10, 0.5);
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color 0.15s;
    text-decoration: none;
    font-weight: 300;
    font-size: 16px;
    line-height: 21.28px;
    letter-spacing: -0.16px;
}
.bojeni-catalog-section__filter-reset:hover {
    opacity: 0.7;
}

.bojeni-catalog-section__toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
@media (max-width: 1024px) {
    .bojeni-catalog-section__toolbar {
        gap: 10px;
        margin-bottom: 20px;
    }
}
@media (max-width: 768px) {
    .bojeni-catalog-section__toolbar {
        justify-content: space-between;
        margin-bottom: 20px;
    }
}





/* Светлая тема */
[data-theme="light"] .bojeni-catalog-section__filter-btn {
    background: var(--color-light, #F9F8F3);
    border-color: rgba(32, 0, 10, 0.2);
    color: var(--color-dark, #20000A);
}
[data-theme="light"] .bojeni-catalog-section__sort-btn {
    background: rgba(32, 0, 10, 0.05);
    color: var(--color-dark, #20000A);
    border: 1px solid rgba(32, 0, 10, 0.2);
}
[data-theme="light"] .bojeni-catalog-section__sort-btn:hover {
    background: rgba(32, 0, 10, 0.1);
}
[data-theme="light"] .bojeni-catalog-section__sort-dropdown {
    background: #fff;
    border-color: rgba(32, 0, 10, 0.15);
}
[data-theme="light"] .bojeni-catalog-section__sort-option {
    color: var(--color-dark, #20000A);
}
[data-theme="light"] .bojeni-catalog-section__sort-option:hover {
    background: rgba(32, 0, 10, 0.06);
    color: var(--color-dark, #20000A);
}

/* ТУЛБАР КАТАЛОГА (фильтр + сортировка)*/
.bojeni-catalog-section__sort-wrap { position: relative; }


.bojeni-catalog-section__sort-btn:hover { opacity: .7}
.bojeni-catalog-section__sort-chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
}
.bojeni-catalog-section__sort-btn[aria-expanded="true"] .bojeni-catalog-section__sort-chevron {
    transform: rotate(180deg);
}

.bojeni-catalog-section__sort-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 200;
    min-width: 220px;
    background: var(--color-dark, #20000A);
    border: 1px solid rgba(249, 248, 243, 0.15);
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}
.bojeni-catalog-section__sort-option.is-active {
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (max-width: 1024px) {
    .bojeni-catalog-section__sort-dropdown {
        left: unset;
        right: 0;
    }
}
@media (max-width: 768px) {
    .bojeni-catalog-section__sort-dropdown {
        top: 0;
        left: 0;
        right: 0;
        transform: unset !important;
        width: 100%;
        position: fixed;
        border-radius: 0;
        justify-content: center;
        align-items: center;
        z-index: 1001;
        transition: .3s;
        padding: 10px 0;
    }

    .bojeni-catalog-section__sort-option.is-active {
        text-decoration: unset;
        text-underline-offset: unset;
        width: 100%;
        text-align: center;
        background: #bc8f8f;
        border-radius: 0;
        border: 1px solid #F9F8F3
    }
}
.bojeni-catalog-section__sort-dropdown[aria-hidden="false"] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.bojeni-catalog-section__sort-option {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--color-light, #F9F8F3);
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 300;
    text-decoration: none;
    transition: background 0.15s;
    white-space: nowrap;
}
.bojeni-catalog-section__sort-option:hover {
    background: rgba(249, 248, 243, 0.08);
    color: var(--color-light, #F9F8F3);
}
[data-theme="light"] .bojeni-catalog-section__filter-btn {
    background: var(--color-light, #F9F8F3);
    border-color: rgba(32, 0, 10, 0.2);
    color: var(--color-dark, #20000A);
}
[data-theme="light"] .bojeni-catalog-section__sort-btn {
    background: rgba(32, 0, 10, 0.05);
    color: var(--color-dark, #20000A);
}
[data-theme="light"] .bojeni-catalog-section__sort-btn:hover { background: rgba(32, 0, 10, 0.1); }
[data-theme="light"] .bojeni-catalog-section__sort-dropdown {
    background: #fff;
    border-color: rgba(32, 0, 10, 0.15);
}
[data-theme="light"] .bojeni-catalog-section__sort-option { color: var(--color-dark, #20000A); }
[data-theme="light"] .bojeni-catalog-section__sort-option:hover {
    background: rgba(32, 0, 10, 0.06);
    color: var(--color-dark, #20000A);
}

/* =========================================
   ПАГИНАЦИЯ
   ========================================= */

.bojeni-catalog-section__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bojeni-pagination__page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    font-size: 16px;
    font-weight: 300;
    color: var(--color-light);
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.bojeni-pagination__page:hover { opacity: 1; }
.bojeni-pagination__page--active {
    opacity: 1;
    border-bottom: 2px solid var(--color-light);
}
.bojeni-pagination__ellipsis {
    font-size: 16px;
    color: var(--color-light);
    opacity: 0.4;
}
.bojeni-pagination__btn {
    display: flex;
    align-items: center;
    color: var(--color-light);
    opacity: 0.6;
    transition: opacity 0.2s;
    text-decoration: none;
}
.bojeni-pagination__btn:hover { opacity: 1; }



/* =========================================
   СВЕТЛАЯ ТЕМА
   ========================================= */
[data-theme="light"] .bojeni-catalog-section {

}
[data-theme="light"] .bojeni-catalog-section__title,
[data-theme="light"] .bojeni-breadcrumb,
[data-theme="light"] .bojeni-catalog-section__subcat,
[data-theme="light"] .bojeni-product-card__name,
[data-theme="light"] .bojeni-product-card__price,
[data-theme="light"] .bojeni-catalog-section .product-item-title,
[data-theme="light"] .bojeni-catalog-section .product-item-title a,
[data-theme="light"] .bojeni-catalog-section .product-item-price-current {
    color: var(--color-dark);
}
[data-theme="light"] .bojeni-catalog-section__subcat--active {
    background: rgba(32, 0, 10, 0.08);
}
[data-theme="light"] .bojeni-product-card__image-wrap,
[data-theme="light"] .bojeni-catalog-section .product-item-image-wrapper {
    border-color: rgba(32,0,10,0.15);
}


@media (max-width: 768px) {
    .bojeni-footer__inner {
        padding: 20px 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* ИЗБРАННОЕ — кнопка сердечко на карточке*/

.product-item-image-outer {
    position: relative;
}

.bj-fav-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
    width: 33px;
    height: 31px;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #20000A;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 0;
    flex-shrink: 0;
    transition: 0.3s;
}
@media (max-width: 768px) {
    .bj-fav-btn {
        top: 10px;
        right: 10px;
        width: 25px;
        height: 25px;
    }
}

.bj-fav-btn svg {
    width: 100%;
    transition: 0.3s;
}
.bj-fav-btn:hover path {
    fill: rgba(255, 255, 255, 0.97);
}

.bj-fav-btn svg path {
    stroke-width: 1px;
    fill: transparent;
    backdrop-filter: blur(43px);
    box-shadow: 0 8px 40px 0 #00000033;
    stroke: rgba(255, 255, 255, 0.8);
    filter: drop-shadow(0 8px 40px rgba(0, 0, 0, 0.2));
}

.bj-fav-btn.is-active svg path {
    fill: currentColor;
}

/* Счётчик избранного в шапке */
.bj-fav-counter {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    background: #E2DDD7;
    color: #20000A;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0 3px;
    pointer-events: none;
}

/* Страница избранного */
.bj-favorites-page {
    background: #E6E0D7;
    padding-top: 120px;
    min-height: 100vh;
}

.bj-favorites-page__inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 60px 58px;
}

.bj-favorites-page__title {
    font-weight: 400;
    font-size: 40px;
    line-height: 120%;
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-dark);
}

.bj-favorites-page__empty {
    text-align: center;
    font-size: 20px;
    font-weight: 300;
    color: var(--color-dark);
    opacity: 0.6;
    padding: 80px 0;
}

.bj-favorites-page__empty a {
    color: var(--color-dark);
    text-underline-offset: 4px;
}

/* Иконки товара (компонент bojeni:product.icons) */
.product-icons {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 20;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

.product-icons__item {
    display: block;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}

@media (max-width: 1024px) {
    .product-icons__item {
        max-width: 30px;
        max-height: 30px;
    }
}
