/* =========================
   SEARCH BAR
========================= */
.awps-search-bar {
    width: 100%;
    background: #e6e6e6;

    padding: 0 20px;
    height: 70px;

    display: flex;
    align-items: center;

    border-bottom: 1px solid #ddd;

    /* 🔥 animation base */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;

    transition: all 0.25s ease;
}

.awps-search-bar.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;

    z-index: 999999;
}

@keyframes awpsFade {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.awps-results {
    position: absolute;
    top: 100%;              /* 🔥 stick directly under input */
    left: 0;

    width: 100%;            /* 🔥 FULL WIDTH */
    
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;

    box-shadow: 0 8px 20px rgba(0,0,0,0.08);

    z-index: 99999;

    max-height: 400px;
    overflow-y: auto;

    margin-top: 0 !important;          /* 🔥 REMOVE GAP */
}

.awps-loading {
    padding: 16px 20px;        /* 🔥 proper breathing space */
    font-size: 14px;
    color: #666;

    text-align: left;          /* align with results */
    display: flex;
    align-items: center;

    background: #fff;
}

/* =========================
   INPUT
========================= */
.awps-input-wrap {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

    .awps-input-wrap input {
    width: 100%;
    height: 48px;                 /* 🔥 consistent height */
    padding: 0 45px 0 15px;

    border: 2px solid #C9B98A;
    border-radius: 3px;

    display: flex;
    align-items: center;

    font-size: 15px;
    background: #fff;

    transition: all 0.2s ease;
}

.awps-input-wrap input:focus {
    outline: none;
    border-color: #C9B98A;
    box-shadow: 0 0 0 2px rgba(201,185,138,0.2);
}

/* =========================
   CLEAR BUTTON
========================= */
.awps-clear {
    position: absolute;
    right: 12px;

    top: 50%;
    transform: translateY(-50%);  /* 🔥 TRUE center */

    width: 34px;
    height: 34px;

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

    font-size: 20px;
}

.awps-clear:hover {
    background: rgba(0,0,0,0.08);
    color: #000;
}


/* =========================
   RESULT ITEM
========================= */
.awps-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px 14px;
    border-bottom: 1px solid #eee;

    cursor: pointer;
    transition: background 0.2s ease;
}

.awps-item:hover {
    background: #f2f2f2;
}

.awps-item img {
    width: 60px;
    height: auto;
}

/* =========================
   INFO
========================= */
.awps-info {
    flex: 1;
}

.awps-title {
    font-size: 14px;
    font-weight: 500;
    color: #111;
}

.awps-stock {
    font-size: 12px;
    color: #777;
}

.awps-highlight {
    background: #C9B98A;
    color: #000;
}

/* =========================
   ARROW
========================= */
.awps-arrow {
    font-size: 16px;
    color: #aaa;
}

.awps-view-all {
    text-align: center;
    padding: 10px;
}

/* =========================
   SCROLLBAR (premium feel)
========================= */
.awps-results::-webkit-scrollbar {
    width: 6px;
}

.awps-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* FORCE HEADER ICON VISIBILITY */
.awps-header-icon {
    display: inline-flex !important;
    align-items: center;
    margin: 0 10px;
    cursor: pointer;
    z-index: 999999;
}

.awps-header-icon svg {
    width: 20px;
    height: 20px;
    fill: #C9B98A;
}

/* FALLBACK (if injected to body) */
.awps-header-icon.awps-fixed {
    position: fixed;
    top: 20px;
    right: 80px;
}

/* MOBILE ICON */
.awps-mobile-icon {
    position: absolute;
    bottom: 30px;
    right: 25px;
    z-index: 999999;
    cursor: pointer;
}

.awps-mobile-icon svg {
    width: 22px;
    height: 22px;
    fill: #C9B98A;
}

/* SEARCH BAR */
.awps-search-bar {
    display: none;
    position: absolute;
    top: 80px;
    width: 100%;
    background: #e6e6e6;
    padding: 15px;
    z-index: 999999;
}

.awps-search-bar.active {
    display: block;
}

.awps-search-bar input {
    width: 100%;
    padding: 14px 40px;
    border: 2px solid #C9B98A;
}

/* RESULTS */
.awps-results {
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
}


.awps-item img {
    width: 60px;
    margin-right: 10px;
}

.awps-highlight {
    background: #C9B98A;
}

/* Menu search icon */
.awps-trigger {
    display: flex;
    align-items: center;
}

.awps-menu-icon {
    width: 20px;
    height: 20px;
    fill: #C9B98A;
}

.awps-trigger {
    margin-right: 8px;
}





.awps-clear {
    position: absolute;
    right: 15px;

    /* 🔥 PERFECT vertical alignment */
    top: 50%;
    transform: translateY(-50%);

    /* 🔥 Bigger + cleaner */
    width: 34px;
    height: 34px;

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

    font-size: 22px;
    font-weight: 400;

    color: #777;
    cursor: pointer;

    border-radius: 50%;
    transition: all 0.2s ease;
}

/* Hover effect (premium feel) */
.awps-clear:hover {
    background: rgba(0,0,0,0.08);
    color: #000;
}


.awps-clear {
    z-index: 999999;
    pointer-events: auto;
}

/* FORCE SHOW MODE */
.awps-search-bar.awps-force-show {
    display: block !important;
    position: relative !important;
    top: 0 !important;
}

.awps-force-show + * .awps-trigger {
    display: none;
}


.awps-search-bar.active {
    display: block;
}

.awps-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 22px;
    cursor: pointer;
}


.awps-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
}

/* Make full menu item clickable */
.awps-trigger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Ensure SVG doesn't block clicks */
.awps-trigger svg {
    pointer-events: none; /* 🔥 key fix */
}

/* Default (hidden state) */
.awps-search-bar {
    z-index: 10;
}

/* When manually opened */
.awps-search-bar.active {
    z-index: 999999;
}

/* 🔥 Auto-show mode (lower priority) */
.awps-search-bar.awps-auto {
    z-index: 5;
}

/* Hide search icon when auto search is active (mobile) */
@media (max-width: 1380px) {
    .awps-trigger {
        display: none !important;
    }
}


