/* ========== CATALOG SECTION ========== */
.catalog {
    padding: 80px 0;
    background: #fff;
}

/* Слайдер каталога */
.catalog-swiper {
    overflow: hidden;
    padding-bottom: 50px; /* место для пагинации */
}

.swiper-slide {
    height: auto; /* чтобы слайды были одной высоты */
}

.catalog-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* занимает всю высоту слайда */
    cursor: pointer;
}

.catalog-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.catalog-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
}

.catalog-image img {
    width: 100%;
    height: 100%;
   object-fit: contain;
    transition: transform 0.5s ease;
}

.catalog-card:hover .catalog-image img {
    transform: scale(1.05);
}

.catalog-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.catalog-name {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #2c2c2c;
    margin-bottom: 4px;
    line-height: 1.3;
}

.catalog-size {
    font-size: 15px;
    color: #6f6f6f;
    margin-bottom: 12px;
}

.catalog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.catalog-price {
    font-family: 'Rubik', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #c83030;
}

.catalog-btn {
    background: #c83030;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
    text-decoration: none;
    display: inline-block;
}

.catalog-btn:hover {
    background: #a82828;
    color: #fff;
}

.catalog-cta {
    text-align: center;
    margin-top: 40px;
}

/* Навигация Swiper для каталога */
.catalog-swiper .swiper-button-prev,
.catalog-swiper .swiper-button-next {
    color: #c83030;
    background: rgba(255,255,255,0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.catalog-swiper .swiper-button-prev::after,
.catalog-swiper .swiper-button-next::after {
    font-size: 18px;
}

.catalog-swiper .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.catalog-swiper .swiper-pagination-bullet-active {
    background: #c83030;
}

/* ========== POPUP ========== */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.popup-overlay.active {
    display: flex;
    opacity: 1;
}

.popup-container {
    background: #fff;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-close-catalog {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.8);
    transition: background 0.2s;
}

.popup-close-catalog:hover {
    background: #fff;
}

.popup-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Слайдер (Swiper) внутри попапа */
.popup-slider {
    width: 100%;
    background: #f5f5f5;
    flex: 0 0 400px;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.popup-swiper {
    width: 100%;
    height: 100%;
}

.popup-swiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.popup-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.swiper-button-prev,
.swiper-button-next {
    color: #c83030;
    background: rgba(255,255,255,0.7);
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.swiper-button-prev::after,
.swiper-button-next::after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background: #c83030;
    opacity: 1;
}

/* Информация о товаре в попапе */
.popup-info {
    padding: 30px;
    background: #fff;
}

.popup-title {
    font-family: 'Rubik', sans-serif;
    font-size: 28px;
    color: #2c2c2c;
    margin-bottom: 10px;
}

.popup-price {
    font-size: 24px;
    font-weight: 700;
    color: #c83030;
    margin-bottom: 10px;
}

.popup-size {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

.popup-description-catalog {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
}

/* Адаптивность */
@media (min-width: 768px) {
    .popup-content {
        flex-direction: row;
    }
    .popup-slider {
        flex: 0 0 50%;
        height: auto;
        max-height: 90vh;
    }
    .popup-info {
        flex: 0 0 50%;
        overflow-y: auto;
        max-height: 90vh;
    }
}

@media (max-width: 767px) {
    .catalog {
        padding: 40px 0;
    }
    .catalog-swiper {
        padding-bottom: 40px;
    }
    .catalog-card .catalog-name {
        font-size: 16px;
    }
    .catalog-price {
        font-size: 18px;
    }
    .catalog-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    .popup-slider {
        flex: 0 0 300px;
    }
    .popup-title {
        font-size: 22px;
    }
}