.mrx-asrch-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.mrx-asrch-inner {
    position: relative;
    width: 100%;
    max-width: 620px;
}

.mrx-asrch-form {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 50px;
    background-color: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 50px;
    padding: 4px 6px 4px 18px;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mrx-asrch-form:focus-within {
    border-color: #133b25;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.mrx-asrch-left-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    margin-right: 10px;
    flex-shrink: 0;
}

.mrx-asrch-field-box {
    position: relative;
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.mrx-asrch-input {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 8px 0 0 !important;
    margin: 0 !important;
    font-size: 14.5px !important;
    font-weight: 500;
    color: #0F172A;
    z-index: 2;
}

.mrx-asrch-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
}

/* Clear Button */
.mrx-asrch-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none !important;
    border-radius: 50%;
    background: #F1F5F9 !important;
    color: #475569 !important;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    margin-right: 6px;
    padding: 0 !important;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.mrx-asrch-wrap.is-typing .mrx-asrch-clear {
    display: inline-flex;
}

.mrx-asrch-clear:hover {
    background: #E2E8F0 !important;
}

/* Animated Placeholder Overlay */
.mrx-asrch-overlay {
    position: absolute;
    left: 0;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    font-size: 14.5px;
    line-height: 1.3;
    z-index: 1;
    transition: opacity 0.18s ease;
}

.mrx-asrch-wrap.is-typing .mrx-asrch-overlay,
.mrx-asrch-wrap.is-focused .mrx-asrch-overlay {
    opacity: 0;
}

.mrx-asrch-prefix {
    color: #64748B;
    font-weight: 400;
    flex-shrink: 0;
}

.mrx-asrch-dynamic-wrap {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
}

.mrx-asrch-dynamic {
    color: #0F172A;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}

/* Typewriter Blinking Cursor */
.mrx-asrch-cursor {
    display: inline-block;
    width: 1.5px;
    height: 16px;
    background-color: #0F172A;
    margin-left: 2px;
    animation: mrxCursorBlink 0.85s infinite;
}

@keyframes mrxCursorBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Slide Up & Fade States */
.mrx-asrch-dynamic.mrx-slide-out {
    transform: translateY(-110%);
    opacity: 0;
}
.mrx-asrch-dynamic.mrx-slide-in-prep {
    transform: translateY(110%);
    opacity: 0;
    transition: none !important;
}
.mrx-asrch-dynamic.mrx-fade-out {
    opacity: 0;
}

/* Submit Button */
.mrx-asrch-submit {
    height: calc(100% - 2px);
    border: none !important;
    border-radius: 50px;
    background-color: #133b25;
    color: #FFFFFF;
    padding: 0 18px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.mrx-asrch-submit:hover {
    opacity: 0.9;
}

.mrx-asrch-submit:active {
    transform: scale(0.98);
}

/* ==========================================
   LIVE SEARCH RESULTS DROPDOWN
   ========================================== */
.mrx-asrch-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    z-index: 99995;
    overflow: hidden;
    display: none;
    max-height: 430px;
    overflow-y: auto;
}

.mrx-asrch-dropdown.is-open {
    display: block;
}

.mrx-asrch-loading,
.mrx-asrch-empty {
    padding: 18px 16px;
    text-align: center;
    font-size: 13.5px;
    color: #64748B;
}

.mrx-asrch-res-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none !important;
    border-bottom: 1px solid #F1F5F9;
    transition: background-color 0.16s ease;
}

.mrx-asrch-res-item:last-of-type {
    border-bottom: none;
}

.mrx-asrch-res-item:hover {
    background-color: #F8FAFC;
}

.mrx-asrch-res-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: #F1F5F9;
    flex-shrink: 0;
}

.mrx-asrch-res-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mrx-asrch-res-title {
    font-size: 14px;
    font-weight: 600;
    color: #0F172A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mrx-asrch-res-title mark {
    background: #FEF08A;
    color: inherit;
    padding: 0 2px;
    border-radius: 3px;
}

.mrx-asrch-res-price {
    font-size: 13px;
    font-weight: 700;
    color: #133b25;
}

.mrx-asrch-res-price del {
    opacity: 0.55;
    font-weight: 400;
    margin-right: 5px;
}

.mrx-asrch-res-price ins {
    text-decoration: none;
}

.mrx-asrch-view-all {
    display: block;
    text-align: center;
    padding: 12px 16px;
    background: #F8FAFC;
    border-top: 1px solid #E2E8F0;
    font-size: 13.5px;
    font-weight: 700;
    color: #133b25;
    text-decoration: none !important;
    transition: background-color 0.16s ease;
}

.mrx-asrch-view-all:hover {
    background: #F1F5F9;
}

@media (max-width: 480px) {
    .mrx-asrch-form {
        padding-left: 14px;
    }
    .mrx-asrch-overlay,
    .mrx-asrch-input {
        font-size: 13.5px !important;
    }
    .mrx-asrch-submit {
        padding: 0 14px;
    }
}
