/*=============================================
                Основной контент
===============================================*/

/* Карусель баннеров */
.banner-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 2.1;
    max-height: 530px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Кнопки навигации */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.carousel-button:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-button:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-button img {
    width: 24px;
    height: 24px;
}

/* Индикаторы */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 1);
}

.carousel-indicator.active {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
}

/* Адаптивность */
@media (max-width: 768px) {
    .banner-carousel {
        margin-top: 15px;
        border-radius: 16px;
    }
    
    .carousel-button {
        width: 40px;
        height: 40px;
    }
    
    .carousel-button img {
        width: 20px;
        height: 20px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .carousel-indicators {
        bottom: 15px;
    }
    
    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-button {
        width: 36px;
        height: 36px;
    }
    
    .carousel-button img {
        width: 18px;
        height: 18px;
    }
    
    .carousel-prev {
        left: 8px;
    }
    
    .carousel-next {
        right: 8px;
    }
}

/* Текстовый блок */
.text-block {
    width: 100%;
    background-color: #CBD9D9;
    padding: 30px;
    margin-top: 25px;
    border-radius: 24px;
    font-family: 'Onest', sans-serif;
    font-weight: 400;
    font-size: 16px;
    font-style: normal;
    color: #333;
    line-height: 1.6;
    text-align: center;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .text-block {
        display: none;
    }
}

/*=============================================
           Блок с карточками товаров
===============================================*/

.category-header h2 {
    text-align: center;
    margin-top: 60px;
}

.category-title {
    font-size: clamp(24px, 2vw, 36px);
    font-weight: 600;
    color: inherit;
    text-decoration: none;
}

@media (min-width: 1280px) {

    .product-grid-block.main:nth-child(n + 6) {
        display: none;
    }
}

@media (min-width: 900px) and (max-width: 1280px) {

    .product-grid-block.main:nth-child(n + 5) {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 900px) {

    .product-grid-block.main:nth-child(n + 7) {
        display: none;
    }
}

/*=============================================
                Баннерный блок
===============================================*/
.hero-banner {
    margin-top: 25px;
    width: 100%;
    background-color: #CBD9D9;
    border-radius: 24px;
    box-sizing: border-box;
}

.hero-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.hero-text {
    flex: 1;
    padding: 30px;
    gap: 30px;
}

.hero-title {
    margin: 0;
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 600;
    color: #000000;
}

.hero-description {
    margin-top: 20px;
    margin-bottom: 0;
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    color: #000000;
}

.hero-image {
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: #000000;
    border-radius: 24px;
}

.hero-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

/* Адаптивность для блоков */
@media (max-width: 1045px) {

    .hero-title {
        text-align: center;
    }

    .hero-description {
        text-align: center;
    }

    .hero-image {
        display: none;
    }
}

/*=============================================
                Блок преимуществ
===============================================*/
:root {
    --advantage-card: 210px
}

.advantages-block {
    width: 100%;
    background-color: #F5F5DC;
    margin-top: 40px;
    border-radius: 24px;
    box-sizing: border-box;
}

.advantages-title {
    padding: 30px 30px 0 30px;
    font-size: 32px;
    font-weight: 600;
    color: #000000;
    text-align: center;
}

.advantages-grid {
    padding: 0 20px 20px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    justify-content: center;
    gap: 20px;
}

.advantage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.advantage-icon {
    margin: 0 20px 0 20px;
    width: clamp(100px, 2vw, 160px);
    aspect-ratio: 1/1;
    background-color: #fff;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.advantage-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.advantage-title {
    margin-top: 25px;
    margin-bottom: 0;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 600;
    color: #000000;
    height: 2.2em;
    line-height: 1.1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    text-overflow: ellipsis;
}

.advantage-description {
    margin-top: 20px;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 400;
    color: #000000;
}

@media (max-width: 768px) {

    .advantages-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .advantage-card:nth-child(n + 4) {
        display: none;
    }
}

@media (max-width: 480px) {

    .advantages-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .advantage-card:nth-child(n + 3) {
        display: none;
    }
}

/*=============================================
                Блок адресов
===============================================*/
.addresses-cards {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.address-card {
    height: 240px;
    background-color: white;
    padding: 30px;
    border-radius: 24px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
    color: inherit;
}

.address-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.address-card.one {
    background-color: #CBD9D9;
}

.address-card.two {
    background-color: #819594;
}

.address-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: #000000;
}

.address-working-hours {
    font-size: 20px;
    font-weight: 400;
    color: #000000;
}

.address-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.2s ease;
}

.address-card:hover .address-button {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.address-button.icon-svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1280px) {

    .addresses-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .addresses-cards {
        display: none;
    }
}
