/* ========================================
   TopSaver Club - Estilos Página de Empresas
   ======================================== */

/* ========================================
   HEADER BANNER
   ======================================== */

.header-banner {
    background: var(--primary-gradient);
    color: white;
    padding: 3.5rem 0 6rem 0;
    position: relative;
    text-align: center;
}

.header-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100"><path d="M0,0v100h1000V0c-200,20-400,40-600,30C300,20,100,10,0,0z" fill="rgba(255,255,255,0.03)"/></svg>') repeat-x;
    background-size: 1000px 100px;
    animation: wave 30s linear infinite;
    opacity: 0.6;
}

.header-banner h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.header-banner p {
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

/* ========================================
   SECCIÓN DE FILTROS
   ======================================== */

.filter-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-top: -3.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 10;
}

.search-input {
    background-color: #f8f9fa;
    border: none;
    border-radius: var(--border-radius-sm);
    padding: 0.875rem 1.25rem;
    transition: all var(--transition-normal);
    font-size: 0.95rem;
}

.search-input:focus {
    background-color: white;
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.1);
    transform: translateY(-1px);
}

.input-group-text {
    border-radius: var(--border-radius-sm) 0 0 var(--border-radius-sm);
    color: #6c757d;
}

/* Pills de categorías */
.category-pill {
    border-radius: 30px;
    border: 1px solid #dee2e6;
    padding: 0.5rem 1.25rem;
    font-size: 0.85rem;
    color: #495057;
    background: white;
    transition: all var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
    white-space: nowrap;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(98, 0, 234, 0.3);
    text-decoration: none;
}

/* ========================================
   TARJETAS DE EMPRESA
   ======================================== */

.company-card {
    border: none;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.company-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Banner de empresa con efecto zoom */
.company-banner-wrapper {
    position: relative;
    overflow: hidden;
    height: 140px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
}

.company-banner-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Efecto zoom elegante al hacer hover */
.company-card:hover .company-banner-wrapper img {
    transform: scale(1.15) rotate(1deg);
}

/* Logo superpuesto */
.company-logo-overlay {
    position: absolute;
    bottom: 10px;
    /* Ajustado para mejor visibilidad */
    left: 20px;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 3;
    border: 2px solid white;
    transition: all var(--transition-normal);
}

.company-card:hover .company-logo-overlay {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.company-logo-overlay img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* Contenido de la tarjeta */
.company-content {
    padding: 2.25rem 1.25rem 1.25rem 1.25rem;
}

.company-content h5 {
    font-size: 1.1rem;
    color: #2d3748;
    line-height: 1.3;
}

.company-content p {
    color: #718096;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* Badge de conteo de promociones */
.promo-count {
    font-size: 0.75rem;
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(98, 0, 234, 0.1);
}

/* Rating con estrellas */
.text-warning {
    color: #f59e0b !important;
}

.text-warning i {
    margin-right: 0.25rem;
}

/* Botón Ver Perfil */
.btn-visit {
    border: 1.5px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all var(--transition-normal);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: transparent;
    text-decoration: none;
}

.btn-visit:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(98, 0, 234, 0.3);
}

.btn-visit:focus {
    box-shadow: 0 0 0 3px rgba(98, 0, 234, 0.2);
}

/* ========================================
   SEPARADORES Y LÍNEAS
   ======================================== */

.company-content hr {
    margin: 1rem 0;
    border-color: rgba(45, 55, 72, 0.1);
}

/* ========================================
   PAGINACIÓN
   ======================================== */

.pagination {
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.page-link {
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.page-link:hover {
    background: var(--primary-gradient);
    color: white;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(98, 0, 234, 0.3);
}

/* ========================================
   ESTADÍSTICAS
   ======================================== */

.text-primary strong {
    font-size: 1.5rem;
    font-weight: 700;
}

.text-primary strong+small {
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

/* ===== CONTENEDOR DE ESTADÍSTICAS FINAL ===== */
.stats-end-container {
    gap: 2rem;
    /* gap-5 equivalente a 2rem en Bootstrap */
}

@media (max-width: 576px) {
    .stats-end-container {
        gap: 1rem;
        /* gap-3 equivalente a 1rem en Bootstrap */
    }
}

/* ========================================
   MODAL DE FILTROS (MÓVIL)
   ======================================== */

.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #f8f9fa, white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-body .form-label {
    font-weight: 600;
    color: #4a5568;
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.company-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Animación de ondas para el header */
@keyframes wave {
    0% {
        background-position-x: 0;
    }

    100% {
        background-position-x: 1000px;
    }
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .header-banner {
        padding: 2.5rem 0 4rem 0;
    }

    .header-banner h1 {
        font-size: 1.75rem;
    }

    .filter-section {
        padding: 1.5rem;
        margin-top: -2.5rem;
    }

    .company-banner-wrapper {
        height: 120px;
    }

    .company-logo-overlay {
        width: 50px;
        height: 50px;
        /* bottom: -20px; */
        left: 15px;
    }

    .company-content {
        padding: 1.75rem 1rem 1rem 1rem;
    }

    .category-pill {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }

    /* Scroll horizontal para pills */
    .overflow-auto {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .overflow-auto::-webkit-scrollbar {
        display: none;
    }

    /* Ajuste para filtros rápidos en móvil */
    .quick-filters-row {
        display: block !important;
        width: 90% !important;
        max-width: 90% !important;
        margin: 10px !important;
    }

    .quick-filters-row .col-md-8,
    .quick-filters-row .col-md-4 {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;
        display: block !important;
    }
}

@media (max-width: 576px) {
    .header-banner h1 {
        font-size: 1.5rem;
    }

    .filter-section {
        padding: 1rem;
    }

    .company-content h5 {
        font-size: 1rem;
    }

    .company-content p {
        font-size: 0.85rem;
    }

    /* Stack en móvil */
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start !important;
    }

    .btn-visit {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
}

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

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, transparent 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #718096;
}

.empty-state i {
    /*font-size: 4rem;*/
    margin-bottom: 1rem;
    opacity: 0.3;
}