/* === Hub Cards Slider Component Styles === */

/* Базовые стили эффекта для Swiper */
.hub-cards-slider.swiper-creative,
.hub-cards-slider.swiper-cards {
    overflow: visible;
}

.hub-cards-slider.swiper-creative .swiper-slide,
.hub-cards-slider.swiper-cards .swiper-slide {
    transform-origin: center center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
    transition-property: transform, opacity;
}

/* Строго 3 карточки в стопке: активная по центру и 2 сзади по бокам. Любые другие скрыты */
.hub-cards-slider .swiper-slide:not(.swiper-slide-active):not(.swiper-slide-prev):not(.swiper-slide-next) {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.hub-cards-slider .swiper-slide-shadow,
.hub-cards-slider .swiper-slide-shadow-left,
.hub-cards-slider .swiper-slide-shadow-right,
.hub-cards-slider .swiper-slide-shadow-top,
.hub-cards-slider .swiper-slide-shadow-bottom {
    border-radius: 25px;
    background: rgba(0, 0, 0, 0.12);
}

/* Контейнер секции */
.hub-cards-section {
    margin-top: 40px;
    margin-bottom: 64px;
    position: relative;
    overflow: visible;
}

/* Серый бэкграунд строго по Figma: W: 1145.68px, H: 583px, R: 32px, Fill: #F6F6F6 */
.hub-cards-container {
    background: #F6F6F6;
    border-radius: 32px;
    width: 100%;
    margin: 0 auto;
    padding: 0 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: visible;
    box-sizing: border-box;
}

/* Зеркальное отображение (для блока шкафов) */
.hub-cards-section--reversed .hub-cards-container {
    flex-direction: row-reverse;
    padding: 0 56px 0 0;
}

/* Текстовая колонка */
.hub-cards-content {
    flex: 0 1 480px;
    max-width: 480px;
    z-index: 2;
    padding: 35px 0 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hub-cards-title {
    font-size: 32px;
    font-weight: 600;
    line-height: 125%;
    color: #333333;
    margin-bottom: 35px;
}

.hub-cards-desc {
    font-size: 18px;
    line-height: 150%;
    color: #333333;
    margin-bottom: 60px;
    font-weight: 300;
}

.hub-cards-desc p {
    margin: 0 0 16px 0;
}

.hub-cards-desc p:last-child {
    margin-bottom: 0;
}

.hub-cards-action {
    display: flex;
    align-items: center;
}

.hub-cards-action button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 38px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    background-color: var(--bg-cta-main, #AFCB08);
    color: #ffffff;
    border: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hub-cards-action button:hover {
    background-color: var(--link-hover-alt-2, #9eb900);
}

/* Колонка со слайдером карточек: высота 583px вровень с серым бэкграундом */
.hub-cards-slider-col {
    flex: 0 0 auto;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 583px;
    margin-right: 50px;
}

.hub-cards-section--reversed .hub-cards-slider-col {
    margin-right: 0;
    margin-left: 50px;
}

.hub-cards-slider-wrap {
    position: relative;
    width: 447px;
    height: 583px;
}

/* Размер карточки строго по Figma: 447 x 583 */
.hub-cards-slider {
    width: 447px;
    height: 583px;
    position: relative;
    overflow: visible;
}

.hub-cards-slide {
    width: 447px;
    height: 583px;
    border-radius: 25px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.hub-cards-slider .swiper-slide-active {
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.14), 0 6px 16px rgba(0, 0, 0, 0.05);
    z-index: 5 !important;
}

/* Сама карточка */
.hub-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    position: relative;
    user-select: none;
}

/* Изображение карточки (без ссылки для исключения мисклика при свайпе) */
.hub-card__image-box {
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    position: relative;
    background-color: #f0f0f2;
}

.hub-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Информационная нижняя плашка карточки */
.hub-card__info {
    flex: 0 0 auto;
    background: #ffffff;
    padding: 14px 22px 15px;
    border-radius: 0 0 25px 25px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* Ссылка на товар исключительно на названии */
.hub-card__title {
    font-size: 18px;
    color: #001425;
    line-height: 30.8px;
    transition: color 0.2s ease;
}

.hub-card__title:hover {
    color: var(--bg-cta-main, #AFCB08);
}

.hub-card__specs {
    font-size: 15px;
    line-height: 19.6px;
    color: #555555;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-weight: 300;
}

.hub-card__spec-item {
    display: inline-block;
    position: relative;
}

.hub-card__price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 9px;
}

.hub-card__price {
    font-size: 18px;
    line-height: 30.8px;
    color: #001425;
}

.hub-card__old-price {
    font-size: 15px;
    line-height: 19.6px;
    color: #555555;
    text-decoration: line-through;
    white-space: nowrap;
}

/* Бейдж скидки: точная стрелка-бирка по макету Figma */
.hub-card__discount-tag {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    padding: 0 7px 0 12px;
    box-sizing: border-box;
    vertical-align: middle;
}

.hub-card__discount-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hub-card__discount-text {
    position: relative;
    z-index: 1;
    font-size: 15px;
    font-weight: 600;
    line-height: 19.6px;
    color: var(--bg-cta-main, #AFCB08);
    white-space: nowrap;
}

/* Стрелки навигации на карточке */
.hub-cards-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    background: none;
    padding: 0;
}

.hub-cards-arrow-prev {
    left: 30px;
}

.hub-cards-arrow-next {
    right: 30px;
}

.hub-cards-arrow.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

/* Пагинация прямо под активным слайдом */
.hub-cards-pagination {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 10;
}

.hub-cards-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    opacity: 1;
    border-radius: 50%;
    margin: 0 !important;
    transition: all 0.3s ease;
    cursor: pointer;
}

.hub-cards-pagination .swiper-pagination-bullet-active {
    width: 22px;
    height: 6px;
    background: var(--bg-cta-main, #AFCB08);
    border-radius: 3px;
}

/* === Адаптивные правила === */

@media (max-width: 1240px) {
    .hub-cards-container {
        padding: 0 0 0 40px;
    }

    .hub-cards-section--reversed .hub-cards-container {
        padding: 0 40px 0 0;
    }

    .hub-cards-title {
        font-size: 32px;
    }

    .hub-cards-slider-col {
        margin-right: 30px;
    }

    .hub-cards-section--reversed .hub-cards-slider-col {
        margin-left: 30px;
    }
}

@media (max-width: 1100px) {
    .hub-cards-container {
        height: auto;
        padding: 0 40px;
        gap: 32px;
    }

    .hub-cards-section--reversed .hub-cards-container {
        padding: 40px;
    }

    .hub-cards-slider-col {
        height: auto;
        margin-right: 0;
    }

    .hub-cards-section--reversed .hub-cards-slider-col {
        margin-left: 0;
    }

    .hub-cards-slider-wrap,
    .hub-cards-slider,
    .hub-cards-slide {
        width: 380px;
        height: 495px;
    }

    .hub-card__title {
        font-size: 20px;
    }

    .hub-cards-pagination {
        bottom: -28px;
    }
}

@media (max-width: 992px) {
    .hub-cards-section {
        margin-top: 24px;
        margin-bottom: 40px;
    }

    .hub-cards-container {
        flex-direction: column !important;
        align-items: stretch;
        height: auto;
        padding: 36px 28px 80px;
        gap: 50px;
    }

    .hub-cards-content {
        max-width: 100%;
        padding: 0;
        flex: 0 1 auto;
    }

    .hub-cards-title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    .hub-cards-desc {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hub-cards-slider-col {
        width: 100%;
        height: auto;
        margin: 0;
    }

    .hub-cards-slider-wrap,
    .hub-cards-slider,
    .hub-cards-slide {
        width: 340px;
        height: 444px;
    }

    .hub-cards-pagination {
        bottom: -28px;
    }
}

@media (max-width: 576px) {
    .hub-cards-section.wrap {
        padding: 0 16px;
        margin-top: 16px;
        margin-bottom: 32px;
    }

    .hub-cards-container {
        border-radius: 20px;
        padding: 28px 18px 80px;
    }

    .hub-cards-title {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    .hub-cards-desc {
        font-size: 14px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .hub-cards-action {
        width: 100%;
    }

    .hub-cards-action button {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
        font-size: 15px;
    }

    .hub-cards-slider-wrap,
    .hub-cards-slider,
    .hub-cards-slide {
        width: 290px;
        height: 380px;
    }

    .hub-card__info {
        padding: 14px 16px;
        gap: 6px;
    }

    .hub-card__title {
        font-size: 18px;
    }

    .hub-card__specs {
        font-size: 13px;
        gap: 4px 8px;
    }

    .hub-card__price {
        font-size: 16px;
    }

    .hub-card__old-price {
        font-size: 13px;
    }

    .hub-cards-arrow {
        width: 32px;
        height: 32px;
    }

    .hub-cards-arrow-prev {
        left: 10px;
    }

    .hub-cards-arrow-next {
        right: 10px;
    }

    .hub-cards-pagination {
        bottom: -24px;
    }
}

@media (max-width: 360px) {
    .hub-cards-slider-wrap,
    .hub-cards-slider,
    .hub-cards-slide {
        width: 260px;
        height: 340px;
    }
}
