/* Estilos para la página de resultados de búsqueda de productos */

.search-results-page {
    background: #f5f6f9;
    min-height: 100vh;
}

.search-hero {
    background: #f5f6f9;
    padding: 32px 0 28px;
    color: #000000;
}

.search-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: #000000;
}

.search-breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.search-breadcrumbs a:hover {
    text-decoration: underline;
}

.search-header {
    padding: 15px 0 16px;
    color: #000000;
}

.search-header .search-count {
    margin: 4px 0 12px;
    color: #444b66;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    padding-bottom: 12px;
}

.search-header .brands-label {
    font-weight: 600;
    color: #000000;
    margin: 0;
}

.search-title {
    font-size: clamp(1.2rem, 2.5vw, 1.4rem);
    font-weight: 700;
    margin-bottom: 4px;
    color: #000000;
}

.search-title #searchTitleTerm {
    color: #0f4dcc;
}

.search-subtitle {
    font-size: 1rem;
    max-width: 720px;
    margin-bottom: 0;
    color: #000000;
}

.search-hero-form {
    display: none;
}

.search-hero-input {
    flex: 1 1 320px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-radius: 10px;
    padding: 0 14px;
}

.search-hero-input i {
    color: #7a7a7a;
    font-size: 1.1rem;
}

.search-hero-input input {
    flex: 1;
    border: none;
    padding: 12px 0;
    font-size: 1rem;
    background: transparent;
    outline: none;
}

.btn-search-hero {
    flex: 0 0 auto;
    background: #ffffff;
    color: #192969;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-search-hero:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.search-body {
    padding: 16px 0 60px;
}

.search-body::before {
    display: none;
}

.search-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
}

.search-filters {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 12px 32px rgba(12, 50, 126, 0.08);
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: none;
    overflow: visible;
}

.search-filters::-webkit-scrollbar {
    width: 6px;
}

.search-filters::-webkit-scrollbar-thumb {
    background: rgba(25, 41, 105, 0.2);
    border-radius: 4px;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    padding-bottom: 12px;
}

.filters-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.filters-toggle {
    display: none;
}

.filter-group + .filter-group {
    margin-top: 24px;
}

.filter-title {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.filter-search input {
    width: 100%;
    border: 1px solid #d9deef;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #4b4e63;
}

.filter-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.filter-price-range {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-range-values {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 0.85rem;
}

.price-range-values span {
    color: #4b4e63;
    font-weight: 600;
}

.price-range-values input {
    width: 120px;
    max-width: 100%;
    border: 1px solid #d9deef;
    border-radius: 8px;
    padding: 6px 8px;
}

.price-range-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-range-slider input[type="range"] {
    width: 100%;
}

.filter-actions {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.search-results {
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: #000000;
}

.brands-carousel {
    position: relative;
    background: #f5f6f9;
    border-radius: 16px;
    padding: 0 24px;
    box-shadow: none;
    overflow: hidden;
    margin: 0;
    height: 80px;
    display: flex;
    align-items: center;
}

.brands-divider {
    width: 280px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    margin: 8px 0 16px 0;
}

.carousel-track {
    display: flex;
    gap: 16px;
    align-items: center;
    height: 100%;
}

.brand-slide {
    flex: 0 0 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.brand-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 8px 18px rgba(12, 50, 126, 0.12);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.brand-card img {
    max-width: 80%;
    max-height: 48px;
    object-fit: contain;
    filter: grayscale(0);
}

.brand-slide img:hover {
    transform: scale(1.05);
    filter: none;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 16px rgba(12, 50, 126, 0.15);
    color: #192969;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.carousel-control:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 22px rgba(12, 50, 126, 0.2);
}

.carousel-control.prev {
    left: 12px;
}

.carousel-control.next {
    right: 12px;
}

.results-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(12, 50, 126, 0.08);
}

.results-summary {
    font-weight: 600;
    color: #192969;
}

.results-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.results-controls select {
    border: 1px solid #d9deef;
    border-radius: 10px;
    padding: 8px 12px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    gap: 20px;
    align-items: stretch;
    justify-content: center;
}

.search-results-grid .product-card {
    width: 100%;
    max-width: 260px;
    margin: 0 auto;
    height: auto !important;
    min-height: 0 !important;
}

.search-results-grid .product-card .product-info {
    padding-bottom: 24px;
}

.search-product-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
}

.search-product-price .price-compare {
    font-size: 0.9rem;
    color: #64748b;
    text-decoration: line-through;
}

.search-product-actions {
    margin-top: 12px;
}

.search-product-actions .add-to-cart-btn {
    width: 100%;
}

.view-details-btn {
    width: 100%;
    border: 1px solid #0f4dcc;
    background: transparent;
    color: #0f4dcc;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.view-details-btn:hover {
    background: #0f4dcc;
    color: #ffffff;
    border-color: #0f4dcc;
}

.search-loading,
.search-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
}

.search-empty-state i {
    font-size: 3rem;
    color: #c6c9dd;
    display: block;
    margin-bottom: 16px;
}

.search-pagination {
    display: flex;
    justify-content: center;
}

.search-product-card .product-name .highlighted-term {
    color: #0f4dcc;
}

.highlighted-term {
    color: #0f4dcc;
    font-weight: 700;
}

@media (max-width: 992px) {
    .search-header {
        padding: 24px 0 12px;
    }

    .search-layout {
        grid-template-columns: 1fr;
    }

    .search-filters {
        position: static;
        max-height: none;
    }

    .carousel-control {
        display: none;
    }

    .brands-carousel {
        padding: 0 16px;
        height: 80px;
    }
}

@media (max-width: 576px) {
    .search-hero-form {
        flex-direction: column;
    }

    .search-results-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 16px;
    }

    .search-results-grid .product-card {
        max-width: none;
        border-radius: 14px;
    }

    .search-product-card .product-image {
        padding: 18px;
    }
}
