/* SimpleTools Product Search Popup */
html.st-search-lock,
body.st-search-lock {
    overflow: hidden !important;
}

.st-product-search-modal,
.st-product-search-modal * {
    box-sizing: border-box;
}

.st-product-search-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    font-family: 'Poppins', sans-serif;
}

.st-product-search-modal.is-open {
    display: block;
}

.st-product-search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 20, 16, .62);
    backdrop-filter: blur(4px);
}

.st-product-search-modal__dialog {
    position: relative;
    width: min(920px, calc(100% - 32px));
    max-height: min(760px, calc(100vh - 48px));
    margin: 24px auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e1e5e3;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(0,0,0,.25);
    animation: stSearchIn .18s ease-out;
}

@keyframes stSearchIn {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.st-product-search-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    width: 38px;
    height: 38px;
    padding: 0;
    display: grid;
    place-items: center;
    background: #f5f7f6 !important;
    border: 1px solid #e4e7e5 !important;
    border-radius: 50%;
    color: #222;
    cursor: pointer;
    box-shadow: none !important;
}

.st-product-search-modal__close:hover {
    background: #edf6f0 !important;
    color: #087735;
}

.st-product-search-modal__close svg {
    width: 20px;
    height: 20px;
}

.st-product-search-modal__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 26px 66px 16px 28px;
}

.st-product-search-modal__icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    color: #087735;
}

.st-product-search-modal__icon svg {
    width: 100%;
    height: 100%;
}

.st-product-search-modal__head h2 {
    margin: 0 0 3px;
    color: #171717;
    font-size: 23px;
    line-height: 1.25;
    font-weight: 700;
}

.st-product-search-modal__head p {
    margin: 0;
    color: #5a5a5a;
    font-size: 13px;
    line-height: 1.45;
}

.st-product-search-modal__form {
    padding: 0 28px 12px;
    margin: 0;
}

.st-product-search-modal__field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 58px;
    background: #f7f9f8;
    border: 1.5px solid #d7ddda;
    border-radius: 8px;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.st-product-search-modal__field:focus-within {
    border-color: #087735;
    box-shadow: 0 0 0 3px rgba(8,119,53,.08);
}

.st-product-search-modal__field-icon {
    position: absolute;
    left: 17px;
    width: 22px;
    height: 22px;
    color: #087735;
    pointer-events: none;
}

.st-product-search-modal__field input[type="search"] {
    width: 100%;
    height: 56px;
    margin: 0 !important;
    padding: 0 112px 0 52px !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    color: #1b1b1b;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
}

.st-product-search-modal__field input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.st-product-search-modal__clear,
.st-product-search-modal__submit {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    padding: 0 !important;
    box-shadow: none !important;
    cursor: pointer;
}

.st-product-search-modal__clear {
    right: 62px;
    width: 34px;
    height: 34px;
    background: transparent !important;
    border: 0 !important;
    color: #777;
}

.st-product-search-modal__clear svg {
    width: 18px;
    height: 18px;
}

.st-product-search-modal__submit {
    right: 6px;
    width: 46px;
    height: 46px;
    background: #087735 !important;
    border: 1px solid #087735 !important;
    border-radius: 6px;
    color: #fff !important;
}

.st-product-search-modal__submit:hover {
    background: #055c29 !important;
    border-color: #055c29 !important;
}

.st-product-search-modal__submit svg {
    width: 22px;
    height: 22px;
}

.st-product-search-modal__status {
    padding: 0 28px 10px;
    color: #666;
    font-size: 12.5px;
    line-height: 1.4;
}

.st-product-search-modal__results {
    min-height: 80px;
    overflow-y: auto;
    padding: 0 18px 6px;
}

.st-product-search-result {
    display: grid;
    grid-template-columns: 74px minmax(0,1fr) auto 24px;
    gap: 14px;
    align-items: center;
    min-height: 88px;
    padding: 9px 10px;
    color: #171717 !important;
    text-decoration: none !important;
    background: transparent !important;
    border-bottom: 1px solid #ecefed;
    transition: background .16s ease;
}

.st-product-search-result:hover {
    background: #f5faf6 !important;
}

.st-product-search-result__image {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e9ecea;
    border-radius: 7px;
}

.st-product-search-result__image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.st-product-search-result__info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.st-product-search-result__info strong {
    color: #191919;
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 600;
}

.st-product-search-result__sku {
    color: #777;
    font-size: 11.5px;
}

.st-product-search-result__price {
    white-space: nowrap;
    color: #087735;
    font-size: 14px;
    font-weight: 700;
}

.st-product-search-result__price del {
    color: #999;
    font-size: 11px;
    font-weight: 400;
}

.st-product-search-result__price ins {
    text-decoration: none;
}

.st-product-search-result__arrow {
    color: #087735;
    font-size: 19px;
}

.st-product-search-loading {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.st-product-search-loading span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #087735;
    animation: stSearchDot .8s infinite alternate;
}

.st-product-search-loading span:nth-child(2) { animation-delay: .15s; }
.st-product-search-loading span:nth-child(3) { animation-delay: .3s; }

@keyframes stSearchDot {
    from { opacity: .25; transform: translateY(0); }
    to   { opacity: 1; transform: translateY(-4px); }
}

.st-product-search-modal__footer {
    padding: 13px 28px 20px;
    border-top: 1px solid #ecefed;
    text-align: center;
}

.st-product-search-modal__footer a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #087735 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
}

.st-product-search-modal__footer a:hover {
    color: #055c29 !important;
}

/* Trigger: niciun fundal gri */
.st-open-product-search,
.st-open-product-search:hover,
.st-open-product-search:focus,
.st-open-product-search:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 650px) {
    .st-product-search-modal__dialog {
        width: calc(100% - 18px);
        max-height: calc(100vh - 18px);
        margin: 9px auto;
        border-radius: 10px;
    }

    .st-product-search-modal__head {
        padding: 20px 52px 13px 16px;
        gap: 10px;
    }

    .st-product-search-modal__icon {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .st-product-search-modal__head h2 {
        font-size: 18px;
    }

    .st-product-search-modal__head p {
        font-size: 12px;
    }

    .st-product-search-modal__form,
    .st-product-search-modal__status {
        padding-left: 16px;
        padding-right: 16px;
    }

    .st-product-search-modal__results {
        padding-left: 8px;
        padding-right: 8px;
    }

    .st-product-search-result {
        grid-template-columns: 62px minmax(0,1fr) 18px;
        gap: 10px;
    }

    .st-product-search-result__image {
        width: 58px;
        height: 58px;
    }

    .st-product-search-result__price {
        grid-column: 2;
        justify-self: start;
        font-size: 13px;
    }

    .st-product-search-result__arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }
}


/* ==========================================================
   v1.1.0 - FIX WOODMART OVERRIDES / ICON ALIGNMENT
========================================================== */

/* WoodMart poate aplica stiluri globale pe button. Resetam strict
   controalele popup-ului, fara sa afectam restul site-ului. */
.st-product-search-modal button {
    font-family: 'Poppins', sans-serif !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* X INCHIDERE - mereu vizibil, dreapta sus */
.st-product-search-modal .st-product-search-modal__close {
    position: absolute !important;
    top: 14px !important;
    right: 14px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 20 !important;

    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    max-width: 38px !important;
    max-height: 38px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    background: #087735 !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;

    color: #ffffff !important;
    line-height: 1 !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.12) !important;

    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    cursor: pointer !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.st-product-search-modal .st-product-search-modal__close::before,
.st-product-search-modal .st-product-search-modal__close::after {
    content: none !important;
    display: none !important;
}

.st-product-search-modal__close-mark {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    color: #ffffff !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 29px !important;
    font-weight: 300 !important;
    line-height: 35px !important;
    text-align: center !important;
    transform: translateY(-1px);
    pointer-events: none;
}

.st-product-search-modal .st-product-search-modal__close:hover,
.st-product-search-modal .st-product-search-modal__close:focus,
.st-product-search-modal .st-product-search-modal__close:active {
    background: #055c29 !important;
    color: #ffffff !important;
    outline: none !important;
    transform: none !important;
}

.st-product-search-modal .st-product-search-modal__close:focus-visible {
    box-shadow: 0 0 0 3px rgba(8,119,53,.20), 0 3px 10px rgba(0,0,0,.12) !important;
}

/* ICON MARE DIN HEADER */
.st-product-search-modal__head {
    align-items: center !important;
}

.st-product-search-modal__icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    line-height: 0 !important;
}

.st-product-search-modal__icon svg,
.st-product-search-modal__field-icon,
.st-product-search-modal__clear svg,
.st-product-search-modal__submit svg {
    display: block !important;
    margin: 0 !important;
}

/* SEARCH FIELD */
.st-product-search-modal__field {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.st-product-search-modal__field-icon {
    position: absolute !important;
    top: 50% !important;
    left: 17px !important;
    right: auto !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    transform: translateY(-50%) !important;
    z-index: 3 !important;
    color: #087735 !important;
    pointer-events: none !important;
}

.st-product-search-modal__field input[type="search"] {
    display: block !important;
    line-height: 56px !important;
    vertical-align: middle !important;
}

/* X DE STERGERE DIN INPUT */
.st-product-search-modal .st-product-search-modal__clear {
    position: absolute !important;
    top: 50% !important;
    right: 61px !important;
    left: auto !important;
    bottom: auto !important;

    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    transform: translateY(-50%) !important;
    background: transparent !important;
    background-image: none !important;
    border: 0 !important;
    border-radius: 50% !important;
    color: #555 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    z-index: 4 !important;
}

/* hidden trebuie sa castige inclusiv peste display:flex de mai sus */
.st-product-search-modal .st-product-search-modal__clear[hidden] {
    display: none !important;
}

.st-product-search-modal .st-product-search-modal__clear:hover {
    background: #edf2ef !important;
    color: #087735 !important;
}

/* BUTON LUPA DREAPTA */
.st-product-search-modal .st-product-search-modal__submit {
    position: absolute !important;
    top: 50% !important;
    right: 6px !important;
    left: auto !important;
    bottom: auto !important;

    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;

    margin: 0 !important;
    padding: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    transform: translateY(-50%) !important;

    background: #087735 !important;
    background-image: none !important;
    border: 1px solid #087735 !important;
    border-radius: 6px !important;

    color: #ffffff !important;
    line-height: 1 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    z-index: 5 !important;
}

.st-product-search-modal .st-product-search-modal__submit:hover,
.st-product-search-modal .st-product-search-modal__submit:focus,
.st-product-search-modal .st-product-search-modal__submit:active {
    background: #055c29 !important;
    border-color: #055c29 !important;
    color: #ffffff !important;
}

@media (max-width: 650px) {
    .st-product-search-modal .st-product-search-modal__close {
        top: 10px !important;
        right: 10px !important;
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
    }

    .st-product-search-modal__close-mark {
        font-size: 26px !important;
        line-height: 31px !important;
    }
}
