/* === EMS Live Search === */
.ems-live-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    z-index: 9999;
    margin-top: 6px;
    overflow: hidden;
    display: none;
}

.ems-live-results.active {
    display: block;
}

.ems-live-inner {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.ems-section {
    padding: 8px 20px;
    border-bottom: 1px solid #eee;
}

.ems-cats a {
    display: block;
    color: #2b3eff;
    font-weight: 500;
    padding: 6px 0;
    text-decoration: none;
}

.ems-cats a:hover {
    text-decoration: underline;
}

.ems-products-label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    text-transform: uppercase;
    color: #888;
}

.ems-product-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-decoration: none;
    padding: 10px 0;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.15s ease;
}

.ems-product-item:last-child {
    border-bottom: none;
}

.ems-product-item:hover {
    background: #f8f9ff;
}

.ems-prod-img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ems-prod-info {
    flex: 1;
    min-width: 0;
}

.ems-prod-title {
    font-weight: 600;
    color: #222;
    margin-bottom: 2px;
    font-size: 14px;
}

.ems-prod-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ems-prod-price {
    font-size: 13px;
    color: #111;
    font-weight: 600;
    margin-top: 3px;
}

.ems-see-all {
    border-top: 1px solid #eee;
    background: #2b3eff;
    text-align: center;
}

.ems-btn-see-all {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 0;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: background 0.2s;
}

.ems-btn-see-all:hover {
    background: #1d2bff;
}

.ems-loader,
.ems-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* === DESKTOP === */
.ems-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ems-search-icon {
    display: none; /* показва се само на мобилно */
    cursor: pointer;
}

.ems-search-box {
    position: relative;
    width: 100%;
    /* display: flex;
    align-items: center;
    width: 100%;
    border: 1px solid #e2e2e2;
    border-radius: 4px;
    background: #fff;
    padding: 8px 12px;
    transition: box-shadow 0.3s ease; */
}
.ems-search-box .path {
    stroke: #2f38bf !important;
}
input.ems-live-search {
    padding-left: 30px !important;
    height: 41px;
    width: 100% !important;
        margin: 0 !important;
}
input.ems-live-search::placeholder {
    color: #e4e4e4;
    font-family: 'Montserrat';
}
.ems-search-box svg.icon_search {
    position: absolute;
    top: 7px;
    left: 5px;
    width: 26px;
    height: 26px;
}
.ems-search-box svg {
    flex-shrink: 0;
    margin-right: 8px;
}

.ems-live-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #222;
    background: transparent;
}

.ems-live-search::placeholder {
    color: #888;
}

.ems-search-clear {
    display: none;
    font-size: 20px;
    color: #aaa;
    cursor: pointer;
    margin-left: 6px;
}

/* .ems-live-search:not(:placeholder-shown) ~ .ems-search-clear {
    display: block;
} */

/* === MOBILE === */
@media (max-width: 768px) {
    .ems-live-results{
        position: unset;
    }
    .ems-search-box.active svg{
    position: unset !important;
}
input.ems-live-search {
    padding-left: 5px !important;
}
    .ems-search-wrapper {
        position: relative;
    }

    .ems-search-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .ems-search-box {
        display: none;
        /* position: absolute;
        top: 110%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        background: #fff;
        border-radius: 50px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        padding: 8px 16px;
        align-items: center;
        justify-content: space-between;
        animation: emsFadeIn 0.25s ease; */
    }
    .ems-search-box {
    /* background-color: #fff; */
    /* box-shadow: 0 10px 46px 0 rgba(1, 7, 39, .1); */
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 50%;
    transform: translate(-50%, -50%);
    top: 50%;
    z-index: 205;
    width: 100%;
    box-sizing: border-box;
    width: 600px;
    max-width: 80%;
    /* overflow: hidden; */
    padding: 10px 10px;
}
input.ems-live-search {
    margin: 0 !important;
    border: 0 !important;
    background-color: #fff !important;
}
.ems-search-icon svg {
    width: 40px;
    height: 40px;
}
.ems-search-icon svg .path {
    stroke: #2a27e9;
}

.ems-search-input-wrapper {
    background-color: #fff;
    box-shadow: 0 10px 46px 0 rgba(1, 7, 39, .1);
    border-radius: 4px;
    padding: 5px 15px 5px 10px;
}

    .ems-search-box.active {
        display: flex;
                flex-direction: column;
        width: 100%;
    }
    .ems-search-results-wrapper {
    width: 100%;
}

    .ems-search-input-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
}

    .ems-search-box svg {
        margin-right: 8px;
    }

    .ems-search-clear {
        display: block;
        font-size: 40px;
        color: #888;
    }

    @keyframes emsFadeIn {
        from { opacity: 0; transform: translate(-50%, -10px); }
        to { opacity: 1; transform: translate(-50%, 0); }
    }
}








