.empresas-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--blue-light) 100%);
    padding: 60px 0 0;
    color: white;
    position: relative;
    overflow: visible !important;
}

.empresas-hero::before {
    content: "";
    position: absolute;
    top: -50%; right: 0;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.empresas-hero::after {
    content: "";
    position: absolute;
    bottom: -30%; left: -5%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(245,166,35,0.08);
    pointer-events: none;
}

.empresas-hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.empresas-hero h1 span { color: var(--accent); }

.empresas-hero p.lead {
    color: rgba(255,255,255,0.82);
    font-size: 1rem;
    margin-bottom: 0;
}

.empresas-hero-wave {
    display: block;
    width: 100%;
    margin-bottom: -2px;
    margin-top: 40px;
}

/* Buscador */
.search-wrap {
    position: relative;
    max-width: 600px;
    margin: 28px auto 0;
    z-index: 100;
}

.search-input-hero {
    width: 100%;
    border: none;
    border-radius: 50px;
    padding: 14px 56px 14px 24px;
    font-size: 0.98rem;
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    outline: none;
    transition: box-shadow 0.25s;
}

.search-input-hero:focus {
    box-shadow: 0 8px 30px rgba(0,0,0,0.2), 0 0 0 3px rgba(245,166,35,0.4);
}

.btn-search-hero {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-search-hero:hover { background: var(--accent2); }

/* Sugerencias autocomplete */
#suggestions {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0,0,0,0.15);
    overflow: hidden;
    display: none;
    z-index: 101;
    max-height: 320px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-dark);
}

.suggestion-item:hover { background: #f4f7fc; }

.suggestion-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e8f0fe;
}

.suggestion-img-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-light);
    flex-shrink: 0;
}

.suggestion-info { flex: 1; min-width: 50%; }

.suggestion-nombre {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--primary);
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suggestion-desc { 
    font-size: 0.75rem; 
    color: var(--accent2); 
    font-weight: 600; 
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Stats búsqueda */
.search-stats {
    background: rgba(255,255,255,0.13);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.9);
    display: inline-block;
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

/* ── SECCIÓN LISTADO ── */
.empresas-section {
    background: var(--section-bg);
    padding: 48px 0 70px;
}

/* Cabecera de resultados */
.resultados-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.resultados-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.resultados-header h2 span { color: var(--accent); }

.badge-total {
    background: var(--accent);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 4px 14px;
    border-radius: 20px;
}

/* ── TARJETA DE EMPRESA ── */
.empresa-card-v2 {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 18px rgba(26,58,107,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.empresa-card-v2:hover {
    transform: translateY(-7px);
    box-shadow: 0 16px 36px rgba(26,58,107,0.16);
    border-color: rgba(46,107,196,0.2);
}

/* Imagen principal */
.empresa-img-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: #f0f4fa;
    flex-shrink: 0;
}

.empresa-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.empresa-card-v2:hover .empresa-img-wrap img {
    transform: scale(1.06);
}

.empresa-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f0fe, #d4e2fc);
    font-size: 3rem;
    color: var(--blue-light);
}

/* Badge descuento flotante */
.badge-descuento-card {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Logo de la empresa sobre imagen */
.empresa-logo-inline {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #fff;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.empresa-logo-inline img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cuerpo */
.empresa-card-body-v2 {
    padding: 28px 18px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.empresa-card-body-v2 h5 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.empresa-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.meta-chip {
    background: #f0f4fb;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.74rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.meta-chip i { color: var(--blue-light); font-size: 0.72rem; }

.empresa-desc-card {
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Footer tarjeta */
.empresa-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.btn-detalle-card {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--blue-light));
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    border-radius: 20px;
    padding: 8px 16px;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s;
    display: block;
}

.btn-detalle-card:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26,58,107,0.25);
}

.btn-wa-card {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-wa-card:hover {
    background: #25d366;
    color: #fff;
    transform: scale(1.1);
}

/* ── SIN RESULTADOS ── */
.no-results {
    text-align: center;
    padding: 70px 20px;
    color: var(--text-muted);
}

.no-results i {
    font-size: 3.5rem;
    color: #ccd3e0;
    margin-bottom: 16px;
    display: block;
}

.no-results h5 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary);
    margin-bottom: 8px;
}

.btn-limpiar {
    background: var(--blue-light);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 20px;
    padding: 9px 22px;
    text-decoration: none;
    display: inline-block;
    margin-top: 12px;
    transition: all 0.2s;
}

.btn-limpiar:hover {
    background: var(--primary);
    color: #fff;
}

/* ── PAGINACIÓN ── */
.custom-pagination-wrapper {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;

    padding: 0 14px;

    border-radius: 10px;
    border: none;

    background: #fff;
    color: var(--blue-light);

    text-decoration: none;

    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;

    box-shadow: 0 2px 8px rgba(0,0,0,0.06);

    transition: all 0.2s ease;
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    color: #fff;

    box-shadow: 0 4px 12px rgba(26,58,107,0.2);
}

.pagination .page-item .page-link:hover {
    background: var(--yellow-light);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}


.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    padding: 0 16px;
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    /* Solo hacer que las sugerencias sean más táctiles */
    .suggestion-item {
        padding: 14px 16px;
        min-height: 68px;
    }
    
    .suggestion-img,
    .suggestion-img-placeholder {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }
    
    .suggestion-nombre {
        font-size: 0.95rem;
        white-space: normal;
    }
    
    /* Asegurar que el hero no tenga overflow hidden */
    .empresas-hero {
        overflow: visible !important;
    }
    
    /* Evitar zoom en iOS */
    .search-input-hero {
        font-size: 16px;
    }
}

/* Scroll bonito */
#suggestions::-webkit-scrollbar {
    width: 4px;
}

#suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#suggestions::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}