/* ===== BUSCADOR MINIMALISTA SVINUM ===== */

/* Overlay del buscador */
#cover-ctn-search {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#cover-ctn-search.show {
    opacity: 1;
}

/* Contenedor principal del buscador */
#cont-bars-search {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 700px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    z-index: 1001;
    display: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

#cont-bars-search.show {
    transform: translate(-50%, -50%) scale(1);
}

/* Header minimalista */
.search-header {
    padding: 30px 40px 20px;
    background: #000000;
    color: white;
    position: relative;
    border-bottom: 1px solid #222;
}

.search-title {
    font-size: 1.3rem;
    font-weight: 300;
    margin: 0;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.search-close {
    position: absolute;
    top: 25px;
    right: 30px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.search-close:hover {
    background: white;
    color: black;
    border-color: white;
}

/* Input de búsqueda minimalista */
.search-input-container {
    position: relative;
    padding: 40px 40px 30px;
    background: white;
}

#inputSearch {
    width: 100%;
    padding: 20px 0;
    border: none;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.2rem;
    background: transparent;
    outline: none;
    transition: all 0.3s ease;
    color: #000;
}

#inputSearch:focus {
    border-bottom-color: #000000;
}

#inputSearch::placeholder {
    color: #999;
    font-weight: 300;
    font-style: italic;
}

.search-icon {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

#inputSearch:focus + .search-icon {
    color: #000;
}

/* Línea de carga minimalista */
.search-line {
    height: 1px;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.search-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, #000, transparent);
    animation: searchLine 2s ease-in-out infinite;
}

@keyframes searchLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Contenedor de resultados */
#box-search {
    max-height: 0;
    overflow: hidden;
    background: white;
    transition: max-height 0.4s ease;
}

#box-search.visible {
    max-height: 350px;
    overflow-y: auto;
}

#box-search::-webkit-scrollbar {
    width: 4px;
}

#box-search::-webkit-scrollbar-track {
    background: #f8f8f8;
}

#box-search::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

#box-search::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Lista de resultados - SIN ANIMACIONES */
#result-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: search-counter;
    opacity: 0;
    transition: opacity 0.3s ease 0.1s;
}

#result-list.visible {
    opacity: 1;
}

#result-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    transition: all 0.2s ease;
    position: relative;
}

#result-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #000;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

#result-list li:hover::before {
    transform: scaleY(1);
}

#result-list li:hover {
    background: #f9f9f9;
    transform: translateX(8px);
}

#result-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex: 1;
    position: relative;
    padding: 20px 40px;
    padding-right: 60px;
    text-decoration: none;
    color: #333;
    font-weight: 400;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f5f5f5;
}

#result-list li:last-child a {
    border-bottom: none;
}

#result-list li:hover a {
    color: #000;
    font-weight: 500;
}

#result-list li a::before {
    counter-increment: search-counter;
    content: counter(search-counter, decimal-leading-zero);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #999;
    font-weight: 300;
}

#result-list .result-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 4px;
}

/* Mensaje sin resultados */
#no-results-message {
    color: #999;
    text-align: center;
    font-style: italic;
    font-weight: 300;
    background: white;
    display: block;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 40px;
    transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

#no-results-message.visible {
    opacity: 1;
    max-height: 200px;
    padding: 60px 40px;
}

/* Sugerencias minimalistas */
.search-suggestions {
    padding: 0;
    background: #fafafa;
    border-top: 1px solid #f0f0f0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.search-suggestions.visible {
    padding: 30px 40px 40px;
    max-height: 500px;
}

.search-suggestions h6 {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.suggestion-tag {
    background: white;
    color: #666;
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 300;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
}

.suggestion-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #000;
    transition: all 0.3s ease;
    z-index: -1;
}

.suggestion-tag:hover::before {
    left: 0;
}

.suggestion-tag:hover {
    color: white;
    border-color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    #cont-bars-search {
        width: 95%;
        margin: 10px;
        margin-left: 0;
        top: 10%;
        transform: translate(-50%, 0) scale(0.95);
    }

    #cont-bars-search.show {
        transform: translate(-50%, 0) scale(1);
    }

    .search-header {
        padding: 25px 25px 15px;
    }

    .search-title {
        font-size: 1.1rem;
    }

    .search-close {
        top: 20px;
        right: 20px;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .search-input-container {
        padding: 30px 25px 25px;
    }

    #inputSearch {
        font-size: 1.1rem;
        padding: 15px 0;
    }

    .search-icon {
        right: 30px;
    }

    #box-search.visible {
        max-height: 280px;
    }

    #result-list li a {
        padding: 18px 25px;
        padding-right: 50px;
    }

    #result-list li a::before {
        right: 15px;
    }

    .search-suggestions.visible {
        padding: 25px 25px 30px;
    }

    .suggestion-tag {
        font-size: 0.8rem;
        padding: 8px 16px;
    }
}