/**
 * ARKACENTRO - Estilos Brands (CORREGIDO)
 * Archivo: assets/css/brands.css
 */

/* ============================================
   HERO SECTION
   ============================================ */

.brands-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2d2d2d 100%);
    color: var(--white);
    padding: 50px 0;
    text-align: center;
}

.hero-content-brands {
    text-align: center;
}

.hero-title-brands {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--white);
}

.hero-subtitle-brands {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin: 0;
}

/* ============================================
   FILTROS SECTION
   ============================================ */

.filters-section {
    padding: 30px 0 20px;
    background: var(--bg-light);
    border-bottom: 1px solid #e0e0e0;
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    gap: 30px;
}

.filters-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.filters-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.brands-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 100%;
    max-width: 500px;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 192, 2, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    font-size: 1.1rem;
    pointer-events: none;
}

.filter-dropdown {
    position: relative;
}

.btn-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-filter:hover {
    background: #8a0909;
}

.btn-filter i {
    font-size: 1rem;
}

.filter-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 320px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.filter-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.filter-menu-header h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin: 0;
}

.close-filter {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
}

.close-filter:hover {
    color: var(--secondary-color);
}

.filter-menu-body {
    padding: 20px;
}

.filter-group {
    margin-bottom: 20px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.filter-select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.filter-menu-footer {
    padding: 15px 20px;
    border-top: 2px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.btn-apply-filter {
    flex: 1;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-filter:hover {
    background: #8a0909;
}

.btn-clear-filter {
    background: var(--bg-light);
    color: var(--text-color);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-clear-filter:hover {
    background: #d0d0d0;
}

.results-count {
    text-align: center;
    margin-top: 20px;
}

.results-count p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}

.results-count strong {
    color: var(--secondary-color);
    font-weight: 600;
}

/* ============================================
   BRANDS GRID
   ============================================ */

.brands-grid-section {
    padding: 50px 0;
    background: var(--bg-light);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* ⭐ BRAND CARD - CORREGIDO */
.brand-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.205);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%; /* ⭐ Respeta el ancho del grid */
}

.brand-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.329);
}

/* ⭐ LOGO CONTAINER - CORREGIDO */
.brand-logo-container {
    height: 200px;
    width: 100%; 
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-bottom: 3px solid var(--accent-color);
    overflow: hidden;
    flex-shrink: 0;
}

/* ⭐ LOGO - CORREGIDO */
.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center;
    display: block;
}

.brand-logo.contain {
    object-fit: contain;
    padding: 15px;
}

.brand-logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--text-light);
}

/* ⭐ BRAND INFO - CORREGIDO */
.brand-info {
    padding: 18px 15px 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%; 
    overflow: hidden; 
}

/* Modifica el texto largo */
.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-align: center;
    line-height: 1.3;
    width: 100%; 
    word-wrap: break-word; 
    overflow-wrap: break-word;
    hyphens: auto;
    
    /* Limita a 2 líneas máximo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* ⭐ Propiedad estándar */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.brand-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
    text-align: center;
    flex-wrap: wrap; /* ⭐ Permite wrap si es necesario */
}

.brand-location i {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

/* Horario y Estado */
.schedule-status-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.schedule-box {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 60px;
    box-sizing: border-box;
    overflow: hidden; /* Hace que no se expanda */
}

.schedule-day {
    font-size: 0.75rem;
    color: var(--text-color);
    font-weight: 700;
    margin-bottom: 4px;
}

.schedule-time {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
}

/* Status Badge */
.status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1.0rem;
    text-align: center;
    white-space: nowrap;
    display: inline-block;
}

.status-open {
    color: #28a745;
}

.status-closed {
    color: #dc3545;
}

.status-unknown {
    background: #6c757d;
    color: var(--white);
}

/* Botón de Ver Detalles */
.btn-view-details {
    background: transparent;
    color: var(--secondary-color);
    border: none;
    padding: 8px 0;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
}

.btn-view-details:hover {
    color: #8a0909;
}

.btn-view-details i {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
}

.btn-view-details:hover i {
    transform: translateX(3px);
}

/* ============================================
   NO RESULTS
   ============================================ */

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.no-results p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .filters-wrapper {
        gap: 20px;
    }
    
    .filters-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 968px) {
    .filters-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .filters-right {
        width: 100%;
    }
    
    .brands-filters {
        max-width: 100%;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .brands-hero {
        padding: 40px 0;
    }
    
    .hero-title-brands {
        font-size: 1.8rem;
    }
    
    .hero-subtitle-brands {
        font-size: 1rem;
    }
    
    .filters-title {
        font-size: 1.3rem;
    }
    
    .brands-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .btn-filter {
        width: 100%;
        justify-content: center;
    }
    
    .filter-menu {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .brand-logo-container {
        height: 180px;
    }
    
    .brand-name {
        font-size: 1.05rem;
    }
    
    .schedule-status-wrapper {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}