/* products.css - обновленная версия с 4 колонками брендов и фиксированной высотой карточек */

.products-section {
    width: 100%;
    background: #FFFFFF;
    padding: 140px 0 40px 0;
    margin-top: -140px;
}

.products-container {
    max-width: min(1600px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(15px, 3vw, 30px);
    display: block;
}

.products-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.2;
    text-transform: uppercase;
    color: #0D256F;
    text-align: center;
    margin-bottom: clamp(30px, 6vw, 60px);
    width: 100%;
    align-self: center;
}

.categories-wrapper {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
}

.categories-grid1 {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 10px;
    justify-content: start;
}

.categories-grid2 {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 10px;
    justify-content: start;
    margin-top: 40px;
}

.category-card {
    background: #F6F6F6;
    border-radius: 7px;
    text-align: left;
    min-height: clamp(100px, 13.3vw, 133px);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
    padding: 20px 15px;
    box-sizing: border-box;
    width: max-content;
    min-width: 100%;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 33px rgba(13, 37, 111, 0.15);
}

.category-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 20px;
    line-height: 1.3;
    color: #202020;
    margin-bottom: 10px;
    text-transform: uppercase;
    align-self: flex-start;
    white-space: nowrap;
}

.category-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #1E1E1E;
    line-height: 1.5;
    color: #666;
    white-space: nowrap;
}

/* ОБНОВЛЕННАЯ СЕКЦИЯ БРЕНДОВ С 4 КОЛОНКАМИ */
.products-brands-wrapper {
    isolation: isolate;
    width: 100%;
    background: #FFFFFF;
    padding: 40px 0 60px 0;
}

.products-brands-wrapper .brands-container {
    max-width: min(1600px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(15px, 3vw, 30px);
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 3vw, 30px);
    align-items: center;
}

.products-brands-wrapper .brands-section-subtitle {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1.3;
    color: #1E1E1E;
    margin-bottom: clamp(15px, 4vw, 30px);
    text-transform: uppercase;
    text-align: center;
}

.products-brands-wrapper .section-intro {
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 15px;
    color: #666;
    margin: 0 auto 40px auto;
    max-width: 700px;
    line-height: 1.6;
}

.products-brands-wrapper .brands-flex {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(15px, 2vw, 25px);
    align-items: stretch; /* Все карточки одной высоты */
    width: 100%;
}

.products-brands-wrapper .brand-area {
    min-width: auto;
    background: #f6f6f6;
    padding: clamp(20px, 3vw, 30px);
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.products-brands-wrapper .brand-area:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(13, 37, 111, 0.2);
}

.products-brands-wrapper .brand-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    width: 100%;
}

.products-brands-wrapper .brand-image {
    width: clamp(90px, 8vw, 110px);
    height: clamp(90px, 8vw, 110px);
    margin: 0 auto 15px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    flex-shrink: 0;
}

.products-brands-wrapper .brand-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.products-brands-wrapper .brand-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 22px;
    line-height: 1.2;
    color: #202020;
    margin-bottom: 12px;
    text-transform: uppercase;
    text-align: center;
    min-height: 52px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-brands-wrapper .brand-description {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.5;
    color: #1E1E1E;
    text-align: center;
    width: 100%;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-image-placeholder {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: clamp(12px, 1.3vw, 14px);
    color: #666;
    text-align: center;
    padding: 8px;
}

/* Адаптация для планшетов */
@media (max-width: 1200px) {
    .categories-grid1 {
        grid-template-columns: repeat(3, auto);
    }
    .categories-grid2 {
        grid-template-columns: repeat(3, auto);
    }

    .products-brands-wrapper .brands-flex {
        grid-template-columns: repeat(3, 1fr);
    }

    .products-brands-wrapper .brand-name {
        min-height: 48px;
    }

    .products-brands-wrapper .brand-description {
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 1024px) {
    .categories-grid1 {
        grid-template-columns: repeat(2, auto);
    }
    .categories-grid2 {
        grid-template-columns: repeat(2, auto);
    }

    .products-section {
        padding-top: 120px;
    }

    .products-brands-wrapper .brands-flex {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-brands-wrapper .brand-area {
        min-height: 240px;
        padding: 25px 20px;
    }

    .products-brands-wrapper .brand-name {
        min-height: 44px;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding: 60px 0;
        padding-top: 100px;
    }

    .products-title {
        font-size: clamp(20px, 5vw, 24px);
        margin-bottom: 40px;
    }

    .categories-grid1,
    .categories-grid2 {
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
        max-width: 400px;
    }

    .category-card {
        width: auto;
        min-width: 0;
    }

    .category-name,
    .category-description {
        white-space: normal;
    }

    .products-brands-wrapper {
        padding: 30px 0 50px 0;
    }

    .products-brands-wrapper .brands-flex {
        grid-template-columns: 1fr;
    }

    .products-brands-wrapper .brand-area {
        min-height: auto;
        padding: 25px 20px;
    }

    .products-brands-wrapper .brand-name {
        min-height: auto;
        -webkit-line-clamp: 2;
    }

    .products-brands-wrapper .brand-description {
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 650px) {
    .category-card {
        min-height: clamp(120px, 25vw, 150px);
        padding: 25px 15px;
    }
}

@media (max-width: 480px) {
    .products-section {
        padding: 40px 0;
        padding-top: 80px;
    }

    .products-title {
        font-size: clamp(18px, 6vw, 20px);
        margin-bottom: 30px;
    }

    .category-name {
        font-size: clamp(16px, 4vw, 18px);
        white-space: normal;
    }

    .category-description {
        font-size: clamp(12px, 3vw, 14px);
        white-space: normal;
    }

    .products-brands-wrapper {
        padding: 40px 0;
    }

    .products-brands-wrapper .brands-section-subtitle {
        font-size: clamp(24px, 4vw, 42px);
        margin-bottom: 25px;
    }

    .products-brands-wrapper .section-intro {
        margin-bottom: 30px;
        font-size: 14px;
        line-height: 1.5;
    }

    .products-brands-wrapper .brand-area {
        padding: 25px 20px;
        min-height: auto;
    }

    .products-brands-wrapper .brand-image {
        width: clamp(80px, 15vw, 100px);
        height: clamp(80px, 15vw, 100px);
        margin-bottom: 15px;
    }

    .products-brands-wrapper .brand-name {
        font-size: clamp(16px, 4vw, 18px);
        min-height: 40px;
    }

    .products-brands-wrapper .brand-description {
        font-size: clamp(12px, 3vw, 14px);
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 360px) {
    .products-container,
    .products-brands-wrapper .brands-container {
        padding: 0 10px;
    }

    .category-card {
        padding: 20px 10px;
        min-height: 100px;
    }

    .products-brands-wrapper .brand-area {
        padding: 20px 15px;
        min-height: auto;
    }

    .products-brands-wrapper .brand-name {
        font-size: 16px;
    }

    .products-brands-wrapper .brand-description {
        font-size: 12px;
    }
}
