.wsqs-wrapper {
    /*display: inline-block;*/
    position: relative;
    float:right;
    margin-top: 10px;
}

.wsqs-details > summary {
    list-style: none;
    cursor: pointer;
}
.wsqs-details > summary::-webkit-details-marker {
    display: none;
}

.wsqs-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #222;
    transition: background-color .15s ease;
}
.wsqs-icon-btn:hover {
    background-color: rgba(0, 0, 0, .05);
}

.wsqs-icon-close {
    display: none;
}
.wsqs-details[open] .wsqs-icon-search {
    display: none;
}
.wsqs-details[open] .wsqs-icon-close {
    display: inline-flex;
}

/* Modal: amagat per defecte, es mostra quan <details open> */
.wsqs-modal {
    display: none;
}
.wsqs-details[open] .wsqs-modal {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10000;
}

.wsqs-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, .55);
}

.wsqs-panel {
    position: relative;
    max-width: 640px;
    margin: 10vh auto 0;
    background: #fff;
    border-radius: 8px;
    padding: 28px 24px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
    max-height: 76vh;
    overflow-y: auto;
}

.wsqs-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: #444;
    padding: 6px;
    line-height: 0;
}

.wsqs-form {
    margin: 0 0 4px;
}

.wsqs-field {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #222;
    padding-bottom: 6px;
}

.wsqs-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    padding: 4px 8px;
    background: transparent;
}

.wsqs-submit {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #222;
    padding: 4px;
}

.wsqs-results {
    margin-top: 18px;
}
.wsqs-results[hidden] {
    display: none;
}

.wsqs-results-status {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.wsqs-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wsqs-result-item + .wsqs-result-item {
    border-top: 1px solid #eee;
}

.wsqs-result-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 4px;
    text-decoration: none;
    color: inherit;
}
.wsqs-result-link:hover {
    background-color: #fafafa;
}

.wsqs-result-image {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 4px;
    background: #f2f2f2;
    flex-shrink: 0;
}

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

.wsqs-result-name {
    font-size: 14px;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wsqs-result-price {
    font-size: 13px;
    color: #555;
}

.wsqs-view-all {
    display: block;
    text-align: center;
    margin-top: 12px;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    color: #222;
}

@media (max-width: 640px) {
    .wsqs-panel {
        margin: 0;
        max-width: 100%;
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }
}
