/* Brand Logos Section */
.brands-section {
    margin: 73px auto 0 auto;
    max-width: 1838px;
    padding: 0;
    width: calc(100% - 82px);
}

.brands-title {
    width: 751px;
    height: 56px;
    margin: 0 auto 30px; /* Updated from spacing-fix */
    text-align: center;
}

.brands-title span {
    color: var(--text-dark);
    font-size: var(--text-h2);
    letter-spacing: 1.16px;
    font-family: var(--font-alibaba-puhuiti-h);
    font-weight: var(--weight-semibold);
    text-align: center;
    white-space: nowrap;
    line-height: 56px;
}

.brands-subtitle {
    width: 751px;
    height: auto;
    margin: 0 auto 79px;
    text-align: center;
}

.brands-subtitle span {
    color: var(--text-medium);
    font-size: var(--text-md-lg);
    letter-spacing: 0.5px;
    font-family: var(--font-alibaba-puhuiti);
    font-weight: var(--weight-regular);
    text-align: center;
    line-height: 1.8;
}

/* Brand Logo Carousel */
.brands-carousel-container {
    max-width: 1435px;
    width: 100%;
    height: 74px;
    margin: 0 auto;
    padding: 0 246px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.brands-carousel-container::-webkit-scrollbar {
    display: none;
}

.brands-carousel-container:active {
    cursor: grabbing;
}

.brand-logo-carousel {
    display: flex;
    align-items: center;
    height: 100%;
    gap: 52px;
    width: max-content;
}

.brand-logo-item {
    flex-shrink: 0;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-item img {
    height: 74px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.brand-logo-item:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

/* Responsive - Large Screens */
@media (max-width: 1838px) {
    .brands-section {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Responsive - Narrow Desktop */
@media (max-width: 1440px) {
    .brands-carousel-container {
        padding: 0 100px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .brands-section {
        margin-top: 40px !important;
        padding: 0 15px;
    }

    .brands-title {
        width: 100%;
        margin: 0 auto 20px;
    }
    
    .brands-title span {
        line-height: 1.4;
        white-space: normal;
        /* font-size handled by clamp */
    }

    .brands-subtitle {
        width: 100%;
        height: auto;
        margin: 0 auto 40px;
    }
    
    .brands-subtitle span {
        white-space: normal;
        line-height: 1.6;
        display: block;
    }

    .brands-carousel-container {
        height: 60px;
        padding: 0;
        margin-bottom: 20px;
    }

    .brand-logo-carousel {
        gap: 20px;
    }

    .brand-logo-item {
        height: 60px;
    }

    .brand-logo-item img {
        height: 40px;
        max-width: 120px;
    }
}
