/*
 * Brands Manager Styles
 * Version: 1.0.0
 */

/* ===========================
   ESTILOS GENERALES
   =========================== */

.brands-list,
.brands-grid {
    margin: 2rem 0;
    padding: 0;
    list-style: none;
}

.brand-item {
    transition: all 0.3s ease;
}

.brand-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.brand-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.brand-logo {
    flex-shrink: 0;
    margin-right: 1.5rem;
    max-width: 150px;
}

.brand-logo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.brand-info {
    flex-grow: 1;
}

.brand-name {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.brand-description {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
    line-height: 1.5;
}

.brands-no-results {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* ===========================
   LAYOUT LISTA
   =========================== */

.brands-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-item-list .brand-content {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e5e5;
}

.brand-item-list:hover .brand-content {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* ===========================
   LAYOUT GRID
   =========================== */

.brands-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.brands-grid-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.brands-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.brands-grid-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.brands-grid-5 {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.brands-grid-6 {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.brand-item-grid .brand-content {
    flex-direction: column;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    height: 100%;
    padding: 1.5rem;
}

.brand-item-grid .brand-logo {
    margin: 0 0 1rem 0;
    max-width: 100%;
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-item-grid .brand-logo img {
    max-height: 100%;
    width: auto;
}

.brand-item-grid:hover .brand-content {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.brand-item-grid .brand-name {
    font-size: 1.1rem;
}

/* ===========================
   RESPONSIVE - TABLETS
   =========================== */

@media (max-width: 1024px) {
    .brands-grid-2,
    .brands-grid-3,
    .brands-grid-4 {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .brands-grid-5,
    .brands-grid-6 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .brand-logo {
        max-width: 120px;
    }
}

/* ===========================
   RESPONSIVE - MÓVILES
   =========================== */

@media (max-width: 768px) {
    .brands-list,
    .brands-grid {
        margin: 1rem 0;
    }
    
    /* Lista en móvil */
    .brand-item-list .brand-content {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .brand-item-list .brand-logo {
        margin: 0 0 1rem 0;
        max-width: 100px;
    }
    
    /* Grid en móvil - 2 columnas */
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .brand-item-grid .brand-content {
        padding: 1rem;
    }
    
    .brand-item-grid .brand-logo {
        height: 80px;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    .brand-description {
        font-size: 0.9rem;
    }
}

/* ===========================
   RESPONSIVE - MÓVILES PEQUEÑOS
   =========================== */

@media (max-width: 480px) {
    /* Grid 1 columna en móviles muy pequeños */
    .brands-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .brand-item-grid .brand-logo {
        height: 60px;
    }
    
    .brand-name {
        font-size: 0.95rem;
    }
}

/* ===========================
   ANIMACIONES Y EFECTOS
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.brand-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.brand-item:nth-child(1) { animation-delay: 0.1s; }
.brand-item:nth-child(2) { animation-delay: 0.2s; }
.brand-item:nth-child(3) { animation-delay: 0.3s; }
.brand-item:nth-child(4) { animation-delay: 0.4s; }
.brand-item:nth-child(5) { animation-delay: 0.5s; }
.brand-item:nth-child(6) { animation-delay: 0.6s; }
.brand-item:nth-child(n+7) { animation-delay: 0.7s; }

/* ===========================
   ESTADOS HOVER Y FOCUS
   =========================== */

.brand-link:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.brand-link:focus .brand-content {
    box-shadow: 0 4px 20px rgba(0, 115, 170, 0.2);
}

/* ===========================
   VARIANTES DE COLOR (OPCIONAL)
   =========================== */

.brand-item.featured .brand-content {
    border: 2px solid #0073aa;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.brand-item.featured .brand-name {
    color: #0073aa;
}

/* ===========================
   MODO OSCURO (OPCIONAL)
   =========================== */

@media (prefers-color-scheme: dark) {
    .brand-content {
        background: #1e1e1e;
        border-color: #333;
    }
    
    .brand-name {
        color: #e5e5e5;
    }
    
    .brand-description {
        color: #b3b3b3;
    }
    
    .brand-item-list:hover .brand-content,
    .brand-item-grid:hover .brand-content {
        box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
    }
}

/* ===========================
   UTILIDADES
   =========================== */

.brands-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.brands-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 700;
    color: #333;
}

.brands-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #666;
}
