/* =========================================================
   🧩 BRANDS SECTION
   ========================================================= */

/* Aplica a fonte Roboto como base para a seção */
.brands-section {
    width: 100%;
    text-align: center;
    background: white;
    padding: 60px 0;
    overflow: hidden;
    font-family: 'Roboto', sans-serif;
}

.brands-title {
    font-size: 1.8rem;
    color: #000;
    margin-bottom: 20px; /* Reduzido */
    font-weight: 700; /* Bold */
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1200px; /* Limita largura desktop */
    margin: 0 auto; /* Centraliza o wrapper */
    overflow: hidden;
}

.brands-carousel {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.5s ease-in-out;
    width: max-content;
}

.brand-card {
    /* Desktop: 6 cards = 1200px / 6 = 200px */
    width: 200px;
    flex-shrink: 0; /* Impede que o card encolha */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    box-sizing: border-box;
}

.brand-card img {
    width: 100%;
    max-width: 240px;
    height: 160px;
    object-fit: contain;
    border-radius: 12px;
    transition: transform 0.3s ease;
    margin: 0 auto;
}

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

.brand-card p {
    font-size: 0.9rem; color: #333; margin-top: 8px; line-height: 1.4; font-weight: 400;
}

.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.2rem;
    color: #ed3056; border: none; background: rgba(255, 255, 255, 0.7);
    border-radius: 50%; width: 45px; height: 45px; cursor: pointer; z-index: 10;
    transition: transform 0.2s ease, color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    display: flex; align-items: center; justify-content: center; padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.carousel-btn:hover {
    color: #d43350; background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

/* =========================================================
   RESPONSIVIDADE BRANDS
   ========================================================= */

@media (max-width: 1024px) { /* Tablet */
    .brands-section { padding: 50px 0; }
    .carousel-wrapper { 
        max-width: 100%; /* Ocupa 100% da largura */
    }
    .brand-card {
        /* 3 cards visíveis */
        width: 33.33vw; /* 1/3 da largura da tela */
        flex-basis: 33.33vw;
    }
    .brand-card img { 
        width: 65%; 
        height: 200px;
        max-width: 260px;
    }
    .carousel-btn { width: 40px; height: 40px; font-size: 2rem; }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }
}

@media (max-width: 768px) { /* Mobile */
    .brands-section { padding: 40px 0; }
    .brands-title { margin-bottom: 30px; }
    
    .carousel-wrapper { 
        /* Centraliza o card de 80vw */
        max-width: 80vw;
        margin: 0 auto;
    }
    .brands-carousel {
        /* JS cuida do movimento */
    }
    .brand-card {
        width: 80vw; /* Card ocupa 100% do wrapper (que é 80vw) */
        flex-basis: 80vw;
        margin: 0;
        padding: 15px 10px;
    }

    .brand-card img { 
        width: 60%; 
        height: 160px;
        max-width: none; 
    }
    .brand-card p { font-size: 0.85rem; }
    .carousel-btn {
        /* Botões visíveis no mobile */
        display: flex;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
        /* Posição ajustada para dentro das bordas do wrapper de 80vw */
        left: 10px; 
    }
    .carousel-btn.next {
        right: 10px;
        left: auto; /* Garante que 'left' não interfira */
    }
}

@media (max-width: 480px) { /* Small Mobile */
    .carousel-wrapper {
        max-width: 90vw; /* Visualizador tem 90% da largura */
    }
    .brand-card { 
        width: 90vw; /* Card ocupa 100% do wrapper (que é 90vw) */
        flex-basis: 90vw;
        margin: 0;
    }
    .brand-card img { 
        width: 70%; 
        height: 180px; 
    }
    .brand-card p { font-size: 0.8rem; }
    /* Estilos dos botões herdados da regra de 768px */
}