
.wsp-search {
    --wsp-primary: #006793;
    --wsp-border: #d7dce0;
    --wsp-radius: 8px;
    --wsp-background: #fff;
    --wsp-text: #222;

    position: relative;
    width: 100%;
    max-width: 650px;
    font-family: inherit;
    z-index: 50;
}

.wsp-search *,
.wsp-search *::before,
.wsp-search *::after {
    box-sizing: border-box;
}

.wsp-form {
    position: relative;
    margin: 0;
}

.wsp-field {
    display: flex;
    align-items: center;
    width: 100%;
    background: var(--wsp-background);
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius);
    overflow: hidden;
}

.wsp-input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 15px;
    border: 0 !important;
    outline: none;
    box-shadow: none !important;
    background: transparent;
    color: var(--wsp-text);
    font: inherit;
}

.wsp-input:focus-visible {
    outline: 2px solid var(--wsp-primary);
    outline-offset: -2px;
}

.wsp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 46px;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: var(--wsp-primary);
    background: transparent;
}

/* Resultados */

.wsp-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 9999;
    max-height: 430px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,.13);
}

.wsp-results[hidden] {
    display: none !important;
}

.wsp-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none !important;
    color: #222;
    border-bottom: 1px solid #eee;
}

.wsp-result-item:last-child {
    border-bottom: 0;
}

.wsp-result-item:hover,
.wsp-result-item.is-active {
    background: #f0f7fa;
}

.wsp-result-item img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 5px;
}

.wsp-result-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wsp-result-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.wsp-result-price {
    font-size: 13px;
    color: var(--wsp-primary);
    font-weight: 600;
}

.wsp-message {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: #666;
}

/* Diseño clásico */

.wsp-classic {
    --wsp-radius: 3px;
}

.wsp-classic .wsp-button {
    background: var(--wsp-primary);
    color: white;
}

/* Diseño moderno */

.wsp-modern {
    --wsp-radius: 30px;
}

.wsp-modern .wsp-field {
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

/* Diseño minimalista */

.wsp-minimal {
    --wsp-radius: 0;
}

.wsp-minimal .wsp-field {
    border: 0;
    border-bottom: 2px solid var(--wsp-primary);
}

/* Diseño expandible: versión inicial */

.wsp-expandable {
    --wsp-radius: 30px;
}

.wsp-expandable .wsp-field {
    transition: box-shadow .2s ease;
}

.wsp-expandable:focus-within .wsp-field {
    box-shadow: 0 0 0 2px var(--wsp-primary);
}

/* Móvil */

@media (max-width: 600px) {
    .wsp-search {
        max-width: 100%;
    }

    .wsp-results {
        max-height: 65vh;
    }

    .wsp-result-item {
        padding: 9px 10px;
    }

    .wsp-result-item img {
        width: 44px;
        height: 44px;
    }
}
