/* ÉP FONT CHỮ TOÀN BỘ CÁC THÀNH PHẦN SEARCH */
.popup-search, 
.popup-search *, 
#ui-widget-search, 
#ui-widget-search *, 
.as_magento_product_name, 
.as_magento_product_price, 
.isp_section_header, 
.acp_footer_css {
    /* Ép dùng font hệ thống đẹp nhất và kế thừa font của theme */
    font-family: "Quicksand", "Roboto", "Helvetica Neue", Arial, sans-serif !important;
}

/* ===== 1. BOX NHẬP SEARCH GÓC PHẢI ===== */
.popup-search {
    position: fixed !important;
    top: 85px !important;
    right: 20px !important;
    left: auto !important;
    width: 350px !important;
    z-index: 100000 !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2) !important;
    padding: 30px 15px 15px 15px !important;
    box-sizing: border-box !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    display: block !important;
}
.popup-search.active-search { opacity: 1 !important; visibility: visible !important; transform: translateY(0) !important; }

/* NÚT X ĐÓNG CỦA BOX NHẬP */
.popup-search .close-search {
    position: absolute !important;
    top: 8px !important; right: 8px !important;
    width: 26px !important; height: 26px !important;
    background: #f1f5f9 !important; border-radius: 50% !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    cursor: pointer !important; z-index: 100002 !important; border: none !important;
}
.popup-search .close-search::after { 
    content: "✕" !important; color: #64748b !important; font-size: 14px !important; 
    font-weight: 900 !important; font-family: sans-serif !important; 
}
.popup-search .close-search svg { display: none !important; }

/* ===== 2. KẾT QUẢ SEARCH (GIỮA TRANG) ===== */
#ui-widget-search {
    position: fixed !important;
    z-index: 99999 !important;
    width: 700px !important;
    max-width: calc(100% - 40px) !important;
    top: 20% !important; 
    left: 50% !important;
    transform: translateX(-50%) !important;
}

#ui-widget-search .ui-autocomplete {
    background: #ffffff !important;
    border: 1px solid #e2f4f9 !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(11, 164, 212, 0.12) !important;
    max-height: 450px !important;
    overflow-y: auto !important;
    padding: 8px 0 !important;
    list-style: none !important;
    display: block !important;
}

/* FIX ICON LOADING QUAY ĐỀU */
#ui-widget-search #icon_loading .fa, 
#ui-widget-search .fa-spinner {
    font: normal normal normal 14px/1 FontAwesome !important;
    display: inline-block !important;
}
#ui-widget-search #icon_loading.hidden { display: none !important; }

/* TIÊU ĐỀ SECTION */
#ui-widget-search .isp_section_header {
    color: #0ba4d4 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    padding: 16px 20px 10px !important;
    background: linear-gradient(90deg, #f0f9fc 0%, transparent 100%) !important;
}

/* ITEM SẢN PHẨM */
#ui-widget-search .ui-menu-item a.ui-corner-all {
    display: block !important;
    margin: 2px 8px !important;
    border-radius: 12px !important;
    transition: all 0.25s ease !important;
}
#ui-widget-search .ui-menu-item a.ui-corner-all:hover {
    background: #d8f0f8 !important;
    transform: translateX(4px) !important;
}

/* GRID LAYOUT */
#ui-widget-search .as_magento_suggest.as_icon {
    display: grid !important;
    grid-template-columns: 56px 1fr !important;
    gap: 12px !important;
    padding: 10px 16px !important;
}

/* FOOTER */
#ui-widget-search #acp_footer_acp {
    margin-top: 8px !important;
    padding: 14px 20px !important;
    border-top: 2px solid #e2f4f9 !important;
    background: linear-gradient(180deg, transparent 0%, #f0f9fc 100%) !important;
    text-align: center !important;
}
#ui-widget-search #acp_footer_acp a { color: #0ba4d4 !important; font-weight: 600 !important; text-decoration: none !important; }

/* NÚT X MỚI CHO KHUNG KẾT QUẢ (THEO JS MỚI) */
.close-suggest-results {
    position: absolute !important;
    top: -15px !important;
    right: -15px !important;
    width: 36px !important;
    height: 36px !important;
    background: #1e293b !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    cursor: pointer !important;
    z-index: 1000000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}