/* Estilos para resultados de búsqueda */
.search-results-container {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 25px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.search-results-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
    border-radius: 25px 25px 0 0;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #007bff;
    position: relative;
}

.search-results-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

.search-results-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.close-search {
    background: linear-gradient(145deg, #dc3545, #c82333);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    position: relative;
    overflow: hidden;
}

.close-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.4s;
}

.close-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(220, 53, 69, 0.4);
    background: linear-gradient(145deg, #c82333, #a71e2a);
}

.close-search:hover::before {
    left: 100%;
}

.close-search:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.search-result {
    background: linear-gradient(145deg, #ffffff, #f8f8f8);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
}

.search-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #28a745);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.search-result:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    border-color: #007bff;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
}

.search-result:hover::before {
    transform: scaleX(1);
}

.search-no-results {
    text-align: center;
    padding: 50px 20px;
    color: #666;
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-no-results h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.product__card--category {
    font-size: 0.85rem;
    color: #007bff;
    font-weight: 700;
    text-transform: uppercase;
    margin: 8px 0;
    padding: 4px 12px;
    background: linear-gradient(145deg, rgba(201, 122, 146, 0.1), rgba(201, 122, 146, 0.05));
    border-radius: 15px;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(201, 122, 146, 0.2);
    letter-spacing: 0.5px;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .search-results-container {
        margin: 15px;
        padding: 20px;
        border-radius: 20px;
    }
    
    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .search-results-header h3 {
        font-size: 1.3rem;
    }
    
    .close-search {
        align-self: flex-end;
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .search-results-container {
        margin: 10px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .search-results-header h3 {
        font-size: 1.1rem;
    }
}

/* Indicador de carga mejorado */
.loading-indicator {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para mensajes de error mejorados */
.error-message, .no-products {
    text-align: center;
    padding: 25px;
    color: #666;
    font-style: italic;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.error-message {
    color: #dc3545;
    background: linear-gradient(145deg, #f8d7da, #f1c2c7);
    border: 2px solid #f5c6cb;
    border-radius: 20px;
}

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

.search-result {
    animation: fadeInUp 0.5s ease forwards;
}

.search-result:nth-child(odd) {
    animation-delay: 0.1s;
}

.search-result:nth-child(even) {
    animation-delay: 0.2s;
}
