/* ==========================================================================
   Variant 2: Editorial Catalog
   - Верхний блок: Заголовок + Секция 1 (Кураторский текст слева | Контакты справа в 3 блока)
   - Нижний блок: Секция 2 (Сайдбар слева и товары справа, стартующие на одном уровне)
   - Мобильная навигация: прилипает к низу окна браузера (position: fixed; bottom: 0; height: auto)
   - Развёрнутые заголовки рубрик + вводные текстовые описания
   - Карточки БЕЗ тени в обычном состоянии (тень только на hover)
   - Мультифото слайдер по невидимым зонам наведения
   ========================================================================== */

/* --------------------------------------------------------------------------
   ВЕРХНИЙ БЛОК: Заголовок + Секция 1 (О лавке и Контакты)
   -------------------------------------------------------------------------- */
.store-top-block {
    width: 100%;
    margin-bottom: 35px;
    box-sizing: border-box;
}

.store-top-block .header {
    width: 100%;
    float: none;
    margin-bottom: 20px;
    padding: 0;
}

/* Информационный блок лавки (без паддинга на десктопе по запросу) */
.store-pickup-section {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.store-intro-split {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 36px;
    align-items: start;
}

/* Левая колонка: Кураторский выставочный текст */
.store-intro-text {
    display: flex;
    flex-direction: column;
}

.store-intro-text p {
    font-size: 15.5px;
    line-height: 1.6;
    color: #383838;
    margin: 0 0 14px 0;
}

.store-intro-text p:last-child {
    margin-bottom: 0;
}

/* Правая колонка: Контакты (3 подблока строго вертикально друг под другом) */
.store-intro-contacts {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    padding-left: 28px;
    border-left: 1px solid #DFE2D8;
    box-sizing: border-box;
    width: 100%;
}

.store-contacts-heading {
    font-size: 17px;
    font-weight: 700;
    color: #79272A;
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1.2;
    display: block !important;
    float: none !important;
    width: 100% !important;
}

.store-contact-subblock {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.store-contact-label {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    color: #79272A;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.store-contact-val {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    font-size: 14px;
    line-height: 1.45;
    color: #444444;
    margin: 0;
}

.store-contact-val a {
    color: #79272A;
    font-weight: 600;
    text-decoration: none;
}

.store-contact-val a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   СЕКЦИЯ 2: ДВУХКОЛОНОЧНЫЙ КАТАЛОГ (Начинаются строго на одном уровне)
   -------------------------------------------------------------------------- */
.store-catalog-row {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}

/* Левая колонка: Аутентичная навигация от o-klube */
#sidebar_content_page .store-catalog-row .navContainer,
#sidebar_content_page .store-catalog-row .navСontainer {
    float: none;
    width: 170px;
    flex: 0 0 170px;
    position: sticky;
    top: 90px;
    margin: 0;
    padding-top: 4px;
    box-sizing: border-box;
}

#sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar,
#sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar {
    width: 100%;
}

/* Правая колонка: Поток товаров */
#sidebar_content_page .store-catalog-row .container_post {
    float: none;
    width: calc(100% - 210px);
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#sidebar_content_page .store-catalog-row .container_post .content {
    margin: 0;
    padding: 0;
}

/* Разделы товаров */
.store-group {
    margin-bottom: 50px;
}

.store-group .h3 {
    margin-top: 0;
    margin-bottom: 8px;
    padding-bottom: 6px;
    scroll-margin-top: 110px;
}

.store-group:first-child .h3 {
    margin-top: 0;
    padding-top: 0;
}

.store-group .h3 h3 {
    font-family: var(--spbfc-heading-font, 'Playfair Display', Georgia, 'Times New Roman', serif);
    font-size: 23px;
    font-weight: 700;
    color: #79272A;
    margin: 0;
    line-height: 1.25;
}

/* Вводный текст рубрики */
.store-group-lead {
    font-size: 14.5px;
    line-height: 1.55;
    color: #4a4a4a;
    margin: 0 0 20px 0;
    max-width: 820px;
}

/* Сетка карточек товаров: 3 в ряд */
.compact-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

/* --------------------------------------------------------------------------
   КАРТОЧКА ТОВАРА:
   - Без тени в обычном состоянии
   - Мягкая тень только на hover
   -------------------------------------------------------------------------- */
.product-card {
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    border: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   ГАЛЕРЕЯ С МУЛЬТИФОТО И ЗОНАМИ НАВЕДЕНИЯ (Без видимых контролов)
   -------------------------------------------------------------------------- */
.product-card__gallery {
    position: relative;
    height: 185px;
    background: #F1F3EA;
    overflow: hidden;
}

.product-card__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-card__slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1;
    display: block;
}

.product-card__slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Невидимые зоны наведения */
.product-card__hover-zones {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 5;
}

.product-card__zone {
    flex: 1 1 0;
    height: 100%;
    cursor: pointer;
    background: transparent;
}

/* Текстовая часть карточки */
.product-card__body {
    padding: 14px 16px 18px 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #79272A;
    margin: 0 0 4px 0;
    line-height: 1.35;
}

.product-card__meta {
    font-size: 13px;
    color: #666666;
    margin-bottom: 10px;
    font-style: italic;
    line-height: 1.35;
}

.product-card__desc {
    font-size: 13.5px;
    color: #444444;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

/* Плавный скролл */
html {
    scroll-behavior: smooth;
}

/* --------------------------------------------------------------------------
   Адаптивность (Планшеты и Мобильные)
   -------------------------------------------------------------------------- */
@media only screen and (max-width: 1100px) {
    .compact-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media only screen and (max-width: 969px) {
    .store-intro-split {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .store-intro-contacts {
        padding-left: 0;
        border-left: none;
        padding-top: 18px;
        border-top: 1px solid #DFE2D8;
    }

    .store-catalog-row {
        flex-direction: column;
        gap: 0;
    }

    /* Мобильная навигация: прилипает строго к низу окна браузера с компактной высотой */
    #sidebar_content_page .store-catalog-row .navContainer,
    #sidebar_content_page .store-catalog-row .navСontainer {
        position: fixed !important;
        top: auto !important; /* Сброс desktop top: 90px */
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
        z-index: 10000 !important;
        background: #79272A !important;
        box-shadow: 0px -4px 20px rgba(0, 0, 0, 0.25) !important;
        padding: 0 !important;
        margin: 0 !important;
        flex: none !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar {
        position: relative !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Стрелка-раскрыватель */
    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar .dropup,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar .dropup {
        cursor: pointer !important;
        position: absolute !important;
        top: 0 !important;
        right: 15px !important;
        width: 40px !important;
        height: 48px !important;
        z-index: 25 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar .dropup::before,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar .dropup::before {
        font-family: 'Material Icons' !important;
        content: "keyboard_arrow_up" !important;
        font-size: 26px !important;
        color: #FFFFFF !important;
        line-height: 48px !important;
        display: block !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar .dropup.show::before,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar .dropup.show::before {
        content: "keyboard_arrow_down" !important;
    }

    /* Список разделов на мобильном */
    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        list-style: none !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav li,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav li {
        display: none !important;
        width: 100% !important;
        height: 48px !important;
        line-height: 48px !important;
        padding: 0 50px 0 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-sizing: border-box !important;
        opacity: 1 !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav li:last-child,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav li:last-child {
        border-bottom: none !important;
    }

    /* В закрытом состоянии отображается ТОЛЬКО активный пункт */
    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav:not(.show) li.is-active,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav:not(.show) li.is-active {
        display: block !important;
        border-bottom: none !important;
    }

    /* В раскрытом состоянии (.show) отображаются ВСЕ пункты */
    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav.show li,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav.show li {
        display: block !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav li a,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav li a {
        color: #FFFFFF !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        text-decoration: none !important;
        text-align: left !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav li.is-active a,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav li.is-active a {
        font-weight: 700 !important;
    }

    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav li a::before,
    #sidebar_content_page .store-catalog-row .navContainer .theiaStickySidebar ul.page_nav li a::after,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav li a::before,
    #sidebar_content_page .store-catalog-row .navСontainer .theiaStickySidebar ul.page_nav li a::after {
        display: none !important; /* Убираем десктопный таймлайн на мобильной нижней панели */
    }

    #sidebar_content_page .store-catalog-row .navContainer .share,
    #sidebar_content_page .store-catalog-row .navСontainer .share {
        display: none !important;
    }

    #sidebar_content_page .store-catalog-row .container_post {
        width: 100% !important;
        padding-bottom: 70px; /* Отступ снизу под фиксированную плавающую панель */
    }

    #go-top {
        bottom: 70px !important; /* Кнопка наверх не перекрывается нижней панелью */
    }
}

@media only screen and (max-width: 770px) {
    .compact-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-card__gallery {
        height: 210px;
    }
}
