.wafs {
    --wafs-shell-border: #343434;
    --wafs-accent: #12925a;
    --wafs-text: #11151c;
    --wafs-muted: #4f5f6f;
    --wafs-surface: #ffffff;
    position: relative;
    width: 100%;
    max-width: 980px;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.wafs__form {
    margin: 0;
}

.wafs__field {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    min-height: 58px;
    border: 2px solid var(--wafs-shell-border);
    border-radius: 28px;
    padding: 0 10px;
    background: var(--wafs-surface);
    gap: 0 !important;
}

.wafs .wafs__field .wafs__input {
    flex: 1;
    flex-basis: auto !important;
    display: block !important;
    min-width: 0;
    min-height: 54px;
    width: auto !important;
    max-width: none !important;
    border: 0 !important;
    background: transparent !important;
    padding: 0 10px;
    color: var(--wafs-text);
    font-size: 18px;
    line-height: 1.3;
    margin: 0 !important;
    box-shadow: none !important;
    float: none !important;
}

.wafs__input:focus {
    outline: 0;
}

.wafs__input::-webkit-search-cancel-button {
    display: none;
}

.wafs__clear,
.wafs__submit {
    flex: 0 0 34px !important;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border: 0 !important;
    border-radius: 50%;
    background: transparent !important;
    color: var(--wafs-text);
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    float: none !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    bottom: auto !important;
    transform: none !important;
}

.wafs__clear {
    font-size: 22px;
    line-height: 1;
    margin-right: 2px !important;
}

.wafs__clear[hidden] {
    display: none !important;
}

.wafs__submit svg {
    display: block;
}

.wafs__submit:hover,
.wafs__clear:hover {
    background: rgba(0, 0, 0, 0.06);
}

.wafs__submit:focus,
.wafs__clear:focus {
    outline: 2px solid rgba(18, 146, 90, 0.35);
    outline-offset: 2px;
}

.wafs.is-loading .wafs__submit {
    position: relative;
    pointer-events: none;
}

.wafs.is-loading .wafs__submit svg {
    opacity: 0;
}

.wafs.is-loading .wafs__submit::after {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(17, 21, 28, 0.25);
    border-top-color: #11151c;
    animation: wafs-spin 0.6s linear infinite;
    position: absolute;
}

.wafs__results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    border: 1px solid var(--wafs-accent);
    background: var(--wafs-surface);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
    border-radius: 4px;
    z-index: 9999;
    overflow: hidden;
}

.wafs__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 500px;
}

.wafs__left {
    border-right: 1px solid var(--wafs-accent);
    display: flex;
    flex-direction: column;
}

.wafs__list {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    max-height: 420px;
    overflow: auto;
    flex: 1;
}

.wafs__item {
    margin: 0;
    padding: 0;
}

.wafs__item-link {
    display: block;
    text-decoration: none;
    color: var(--wafs-text);
    font-size: 15px;
    line-height: 1.34;
    padding: 10px 18px;
}

.wafs__item-link:hover,
.wafs__item-link.is-active {
    background: #f4f8f5;
}

.wafs__item-link mark {
    background: transparent;
    color: var(--wafs-accent);
    font-weight: 700;
}

.wafs__all {
    border-top: 1px solid #d4ddd4;
    text-align: center;
    text-decoration: none;
    color: var(--wafs-text);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 16px 10px;
}

.wafs__all:hover {
    background: #f5f8f5;
}

.wafs__right {
    padding: 14px 26px 20px;
}

.wafs__preview-card {
    text-decoration: none;
    color: var(--wafs-text);
    display: block;
}

.wafs__preview-media {
    background: #f7f7f7;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.wafs__preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.wafs__preview-placeholder {
    width: 75%;
    height: 75%;
    border: 2px dashed #cdd5cd;
}

.wafs__preview-title {
    margin: 0;
    font-size: 38px;
    line-height: 1.22;
    font-weight: 500;
}

.wafs__preview-sku {
    margin-top: 6px;
    color: var(--wafs-muted);
    font-size: 13px;
    text-transform: uppercase;
}

.wafs__preview-price {
    margin-top: 10px;
    font-size: 33px;
    font-weight: 700;
    color: #11151c;
}

.wafs__preview-excerpt {
    margin: 14px 0 0;
    padding: 14px 0;
    border-top: 1px solid #dde5dd;
    border-bottom: 1px solid #dde5dd;
    color: #1f2a34;
    font-size: 15px;
    line-height: 1.52;
}

.wafs__hint,
.wafs__empty,
.wafs__error {
    margin: 0;
    padding: 14px 16px;
    font-size: 14px;
    color: var(--wafs-muted);
    background: var(--wafs-surface);
}

.wafs__error {
    color: #b52222;
}

.wafs--disabled .wafs__submit,
.wafs--disabled .wafs__clear {
    pointer-events: none;
    opacity: 0.45;
}

@media (max-width: 1024px) {
    .wafs__item-link {
        font-size: 14px;
    }

    .wafs__all {
        font-size: 16px;
    }

    .wafs__preview-title {
        font-size: 28px;
    }

    .wafs__preview-sku,
    .wafs__preview-price,
    .wafs__preview-excerpt,
    .wafs__hint,
    .wafs__empty,
    .wafs__error {
        font-size: 16px;
    }
}

@media (max-width: 860px) {
    .wafs__panel {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .wafs__left {
        border-right: 0;
        border-bottom: 1px solid var(--wafs-accent);
    }
}

@media (max-width: 767px) {
    .wafs__results {
        position: static;
        margin-top: 8px;
    }

    .wafs__input {
        font-size: 16px;
    }

    .wafs__preview-media {
        height: 220px;
    }
}

@keyframes wafs-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
