/* Buscador con sugerencias (popup del header + pagina buscar.php).
   Mismo esquema que css/wowco-search.css de WOWCO. */

.sugart-search-form {
    position: relative;
}

.tpsearchbar__form input.sugart-search-input {
    padding-right: 60px;
}

.tpsearchbar__search-btn {
    background: transparent;
    border: 0;
}

.sugart-search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--tp-border-1, #E6EBF0);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    z-index: 10;
    overflow: hidden;
    text-align: left;
}

.sugart-search-category-hit {
    display: block;
    padding: 12px 18px;
    background: #f6f7f9;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: #111111;
}

.sugart-search-category-hit small {
    display: block;
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #7a7a7a;
}

.sugart-search-category-hit strong {
    display: block;
    font-size: 14px;
    color: #111111;
}

.sugart-search-category-hit:hover {
    background: #eef0f4;
}

.sugart-search-list {
    max-height: 320px;
    overflow-y: auto;
}

.sugart-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: #111111;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background .18s ease;
}

.sugart-search-item:last-child {
    border-bottom: 0;
}

.sugart-search-item:hover {
    background: #f7f8fb;
}

.sugart-search-item-thumb {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sugart-search-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sugart-search-item-title {
    display: block;
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #171717;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sugart-search-view-all {
    display: block;
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--tp-heading-secondary, #B40617);
    background: #fafbfc;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.sugart-search-view-all:hover {
    background: #f2f3f6;
    color: var(--tp-heading-secondary, #B40617);
}

.sugart-search-loading,
.sugart-search-empty {
    padding: 16px 18px;
    font-size: 14px;
    color: #7a7a7a;
}

/* El popup del template mide 320px: el dropdown sobresale hacia abajo,
   sobre el overlay oscuro, sin cortarse. */
.tpsearchbar .col-6 {
    position: relative;
}

@media (max-width: 767px) {
    .tpsearchbar .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .tpsearchbar__close {
        top: 20px;
        right: 20px;
    }
}

/* ---- pagina buscar.php ---- */
.sugart-search-page {
    padding: 50px 0 40px;
}

.sugart-search-page h1 {
    font-size: 32px;
    margin-bottom: 25px;
    text-align: center;
}

.sugart-search-page .tpsearchbar__form {
    max-width: 640px;
    margin: 0 auto;
}

.sugart-search-page-result-text {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #555555;
}

.sugart-search-page-result-text strong {
    color: #111111;
}

.sugart-search-page-result-text a {
    color: var(--tp-heading-secondary, #B40617);
    font-weight: 600;
    text-decoration: underline;
}

.sugart-search-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #555555;
}

.sugart-search-empty-state h4 {
    margin-bottom: 8px;
}

/* Lupa del header: hover con circulo rojo y lupa blanca */
.header__info-search .tp-search-toggle i {
    transition: background-color .2s ease, color .2s ease;
}

.header__info-search .tp-search-toggle:hover i,
.header__info-search .tp-search-toggle:focus-visible i {
    background-color: var(--tp-heading-secondary, #B40617);
    color: var(--tp-common-white, #ffffff);
}
