/* ============================================
   BARBERÍAS - BarberConnect
   Estilos premium para el listado
   ============================================ */

/* ============================================
   ANIMACIONES GLOBALES
   ============================================ */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 20px rgba(242, 202, 80, 0.1); }
    50% { text-shadow: 0 0 40px rgba(242, 202, 80, 0.3), 0 0 80px rgba(242, 202, 80, 0.1); }
}

@keyframes shimmerSearch {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulseStat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

/* ============================================
   HEADER CON GLOW
   ============================================ */
.barberias-header {
    padding: 2rem 0 1.5rem 0;
    margin-bottom: 2rem;
    border-bottom: 0.5px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

.barberias-header .section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.title-glow {
    animation: glowPulse 3s ease-in-out infinite;
}

.barberias-header .section-subtitle {
    font-size: 0.875rem;
    color: #888;
    font-weight: 400;
    margin: 0;
}

.stat-badge {
    background: #f5f5f5;
    color: #666;
    padding: 5px 14px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    border-radius: 100px;
    border: 0.5px solid #e8e8e8;
}

.pulse-stat {
    animation: pulseStat 2s ease-in-out infinite;
}

/* ============================================
   BÚSQUEDA PREMIUM
   ============================================ */
.search-container {
    margin-bottom: 20px;
}

.search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e8e8e8;
    border-radius: 50px;
    padding: 4px 4px 4px 20px;
    transition: all 0.4s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.search-wrapper:focus-within {
    border-color: #f2ca50;
    box-shadow: 0 0 30px rgba(242, 202, 80, 0.08), inset 0 0 30px rgba(242, 202, 80, 0.02);
    transform: translateY(-2px);
}

.search-icon {
    display: flex;
    align-items: center;
    color: #bbb;
    margin-right: 8px;
}

.search-icon .material-symbols-outlined {
    font-size: 1.3rem;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 8px;
    font-size: 0.95rem;
    outline: none;
    color: #1a1a1a;
}

.search-input::placeholder {
    color: #bbb;
    font-weight: 300;
}

.search-clear {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 8px;
    display: none;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.search-clear:hover {
    background: #f5f5f5;
    color: #666;
}

.search-btn {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    border: none;
    border-radius: 40px;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.search-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(242, 202, 80, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmerSearch 3s infinite;
}

.search-btn:hover {
    background: linear-gradient(135deg, #f2ca50, #d4a830);
    color: #1a1c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(242, 202, 80, 0.3);
}

.search-btn .material-symbols-outlined {
    font-size: 1.1rem;
}

/* ============================================
   FILTROS
   ============================================ */
.filters-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.filter-chip {
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid #e8e8e8;
    background: white;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-chip:hover:not(.active) {
    border-color: #1a1a1a;
    color: #1a1a1a;
    transform: translateY(-2px);
}

.filter-chip.active {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* ============================================
   CONTADOR DE RESULTADOS
   ============================================ */
.resultados-count {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: #f8f8f8;
    border-radius: 40px;
    display: inline-block;
    border: 0.5px solid #e8e8e8;
}

.resultados-count strong {
    color: #1a1a1a;
}

/* ============================================
   GRID DE BARBERÍAS
   ============================================ */
.barberias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ============================================
   TARJETA DE BARBERÍA
   ============================================ */
.barberia-card {
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.barberia-card:nth-child(1) { animation-delay: 0.05s; }
.barberia-card:nth-child(2) { animation-delay: 0.1s; }
.barberia-card:nth-child(3) { animation-delay: 0.15s; }
.barberia-card:nth-child(4) { animation-delay: 0.2s; }
.barberia-card:nth-child(5) { animation-delay: 0.25s; }
.barberia-card:nth-child(6) { animation-delay: 0.3s; }
.barberia-card:nth-child(7) { animation-delay: 0.35s; }
.barberia-card:nth-child(8) { animation-delay: 0.4s; }
.barberia-card:nth-child(9) { animation-delay: 0.45s; }
.barberia-card:nth-child(10) { animation-delay: 0.5s; }

.barberia-card:hover {
    transform: translateY(-6px);
    border-color: #f2ca50;
    box-shadow: 0 8px 30px rgba(242, 202, 80, 0.06);
}

/* ============================================
   CARD GOLD BORDER (efecto en hover)
   ============================================ */
.card-gold-border {
    transition: all 0.4s ease;
    border: 1px solid #e8e8e8;
    position: relative;
}

.card-gold-border:hover {
    border-color: #f2ca50;
    box-shadow: 0 0 25px rgba(242, 202, 80, 0.06);
}

/* ============================================
   IMAGEN DE LA TARJETA
   ============================================ */
.card-image {
    height: 160px;
    background: #f7f7f7;
    position: relative;
    overflow: hidden;
}

.card-image .barberia-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.image-placeholder i {
    font-size: 2rem;
    color: #ddd;
}

.image-placeholder span {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #efefef;
    border: 0.5px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    color: #999;
}

/* ============================================
   ESTADO (Abierto/Cerrado)
   ============================================ */
.card-status {
    position: absolute;
    top: 10px;
    left: 10px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 100px;
    background: white;
    border: 0.5px solid #e8e8e8;
    color: #555;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.open .status-dot  { background: #22c55e; }
.closed .status-dot { background: #ccc; }

/* ============================================
   BADGE "NUEVO"
   ============================================ */
.badge-nuevo {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f2ca50;
    color: #1a1c1c;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    animation: pulse-badge 2s ease-in-out infinite;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 10px rgba(242, 202, 80, 0.2);
}

/* ============================================
   CUERPO DE LA TARJETA
   ============================================ */
.card-body {
    padding: 1.1rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.barberia-name {
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    margin: 0 0 4px 0;
}

/* ============================================
   CALIFICACIÓN
   ============================================ */
.rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stars .fa-star {
    font-size: 0.75rem;
    color: #e0e0e0;
}

.stars .fa-star.active { color: #f2ca50; }

.rating-text {
    font-size: 0.75rem;
    color: #999;
    font-weight: 400;
}

/* ============================================
   DETALLES
   ============================================ */
.details-container {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-icon { width: 16px; flex-shrink: 0; }
.detail-icon i { color: #bbb; font-size: 0.8rem; }

.detail-text span {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.4;
}

.separator { color: #ccc; }

/* ============================================
   CONTADOR DE SERVICIOS
   ============================================ */
.services-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #888;
    font-weight: 500;
    background: #f5f5f5;
    padding: 3px 10px;
    border-radius: 100px;
    border: 0.5px solid #e8e8e8;
    width: fit-content;
    margin-top: auto;
}

.services-count i { font-size: 0.65rem; color: #333; }

/* ============================================
   FOOTER DE LA TARJETA
   ============================================ */
.card-footer {
    padding: 1rem 1.25rem;
}

.btn-ver-servicios {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 18px;
    background: #1a1a1a;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ver-servicios i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.btn-ver-servicios:hover {
    background: #f2ca50;
    color: #1a1c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(242, 202, 80, 0.2);
}

.btn-ver-servicios:hover i {
    transform: translateX(4px);
}

/* ============================================
   GLOW HOVER
   ============================================ */
.glow-hover {
    position: relative;
    overflow: hidden;
}

.glow-hover::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(242, 202, 80, 0.05) 50%, transparent 60%);
    animation: shimmerSearch 3s infinite;
    pointer-events: none;
}

/* ============================================
   ESTADO VACÍO
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    border: 0.5px dashed #ddd;
    border-radius: 16px;
    background: white;
}

.empty-state i { font-size: 2.5rem; color: #ddd; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1rem; color: #111; font-weight: 600; margin-bottom: 6px; }
.empty-state p { font-size: 0.85rem; color: #aaa; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .barberias-grid {
        grid-template-columns: 1fr;
    }
    
    .barberias-header .section-title {
        font-size: 1.3rem;
    }
    
    .barberias-header .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-wrapper {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 8px;
    }
    
    .search-input {
        width: 100%;
        padding: 10px 8px;
        order: 1;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
        order: 2;
        margin-top: 4px;
    }
    
    .search-clear {
        order: 3;
    }
    
    .filter-chip {
        font-size: 0.65rem;
        padding: 4px 12px;
    }
    
    .filters-container {
        gap: 6px;
    }
}