/*
 * "AliExpress Header" and "Amazon Header" layouts (custom, Ayat Global).
 * Loaded only when one of them is the active header (layouts/app.blade.php).
 * Colours: --hx-top/mid/bot-bg/tx come from Admin > Website Setup > Header colour settings.
 */
.hx { display: contents; }
.hx a, .hx button { text-decoration: none; }
.hx-main { box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }

/* ---------- shared: search ---------- */
.hx-search-wrap { flex: 1 1 auto; min-width: 0; }
.hx-search { display: flex; align-items: stretch; height: 44px; margin: 0; }
.hx-search-input {
    flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: 0; padding: 0 16px;
    font-size: 14px; color: #191919; background: #fff;
}
.hx-search-btn { border: 0; padding: 0 20px; font-size: 22px; line-height: 1; cursor: pointer; }
.hx-search-cat {
    width: 60px; max-width: 170px; height: 100%; border: 0; outline: 0; padding: 0 6px 0 10px;
    font-size: 12px; color: #555; background: #e6e6e6; cursor: pointer; appearance: auto;
}
.hx .typed-search-box { z-index: 1040; margin-top: 4px; }
.hx-search-ico, .hx-search-btn-text { display: none; }
/* Undo the vendor/theme rules for .front-header-search and #search (hidden on phones, extra outline) */
.hx .front-header-search {
    position: relative !important; opacity: 1 !important; transform: none !important; -webkit-transform: none !important;
    width: auto; height: auto; background: transparent !important; border-radius: 0; z-index: 2;
}
.hx .front-header-search #search.hx-search-input {
    height: 100% !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; padding-left: 16px;
}

/* ---------- shared: action items + drop-down ---------- */
.hx-mid-row { display: flex; align-items: center; gap: 18px; min-height: 76px; }
.hx-logo { flex: 0 0 auto; display: block; }
.hx-logo img { height: 40px; max-width: 180px; object-fit: contain; }
.hx-burger { border: 0; background: none; padding: 4px; font-size: 26px; color: inherit; line-height: 1; }
.hx-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.hx-act { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; color: inherit; cursor: pointer; border-radius: 8px; }
.hx-act-icon { font-size: 30px; line-height: 1; }
.hx-act-text { flex-direction: column; line-height: 1.15; white-space: nowrap; }
.hx-act-text small { font-size: 12px; opacity: .75; }
.hx-act-text strong { font-size: 13px; font-weight: 700; max-width: 140px; }
.hx-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.hx-badge {
    position: absolute; top: -6px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    color: #fff; background: #ff4747;
}
.hx-badge:empty, .hx-badge[data-zero] { display: none; }

.hx-drop {
    position: absolute; top: 100%; right: 0; z-index: 1045; width: 260px; padding: 8px 0;
    color: #191919; background: #fff; border-radius: 10px; box-shadow: 0 8px 30px rgba(0, 0, 0, .16);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease; cursor: default; text-align: left;
}
.hx-has-drop:hover > .hx-drop, .hx-has-drop:focus-within > .hx-drop { opacity: 1; visibility: visible; transform: none; }
.hx-drop::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.hx-drop-head { display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.hx-drop-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: 0 0 40px; }
.hx-drop-guest { padding: 10px 16px 14px; text-align: center; border-bottom: 1px solid #f0f0f0; margin-bottom: 4px; }
.hx-drop-link { display: flex; align-items: center; gap: 10px; padding: 9px 16px; font-size: 14px; color: #191919 !important; }
.hx-drop-link i { font-size: 18px; width: 20px; text-align: center; opacity: .7; }
.hx-drop-link:hover { background: #f5f7fa; }
.hx-drop-count { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; font-size: 11px; line-height: 20px; text-align: center; color: #fff; background: #ff4747; }
.hx-drop-logout { color: #e62e04 !important; border-top: 1px solid #f0f0f0; margin-top: 4px; }
.hx-btn { display: block; width: 100%; height: 40px; line-height: 40px; border-radius: 20px; font-weight: 700; font-size: 14px; text-align: center; }
.hx-btn-primary { color: #fff !important; background: var(--primary, #1868e0); }
.hx-btn-primary:hover { filter: brightness(.95); }
.hx-link { color: var(--primary, #1868e0) !important; font-weight: 600; }

/* language / currency */
.hx-switch { list-style: none; position: relative; }
.hx-switch-link { display: inline-flex; align-items: center; color: inherit !important; font-size: 12px; padding: 4px 0; }
.hx-switch .dropdown-menu { min-width: 170px; }
.hx-lang-code { display: none; }
.hx-az .hx-lang-name { display: none; }
.hx-az .hx-lang-code { display: inline; }

/* ---------- AliExpress header ---------- */
.hx-ae .hx-top { background: var(--hx-top-bg); color: var(--hx-top-tx); border-bottom: 1px solid #f0f0f0; font-size: 12px; }
.hx-top-list { display: flex; align-items: center; gap: 22px; margin: 0; padding: 0; list-style: none; }
.hx-top-list > li { list-style: none; }
.hx-top-list a { color: inherit !important; display: inline-flex; align-items: center; gap: 4px; padding: 7px 0; }
.hx-top-list a:hover { opacity: .75; }
.hx-ae .hx-main { background: var(--hx-mid-bg); }
.hx-ae .hx-mid { background: var(--hx-mid-bg); color: var(--hx-mid-tx); }
/* App-style search box: 8px corners, icon on the left, joined "Search" button */
.hx-ae .hx-search {
    border: 1.5px solid var(--primary, #1868e0); border-radius: 8px; overflow: hidden; background: #fff;
    transition: box-shadow .15s;
}
.hx-ae .hx-search:focus-within { box-shadow: 0 0 0 3px var(--soft-primary, rgba(24, 104, 224, .15)); }
.hx-ae .hx-search-ico { display: flex; align-items: center; flex: none; padding: 0 0 0 12px; font-size: 20px; color: #9ca3af; }
.hx-ae .front-header-search #search.hx-search-input { padding-left: 8px; padding-right: 8px; }
.hx-ae .hx-search-btn {
    display: flex; align-items: center; flex: none; margin: 0; border-radius: 0; padding: 0 24px;
    font-size: 14px; font-weight: 700; color: #fff; background: var(--primary, #1868e0);
}
.hx-ae .hx-search-btn i { display: none; }
.hx-ae .hx-search-btn-text { display: inline; }
.hx-ae .hx-search-btn:hover { filter: brightness(.93); }
.hx-ae .typed-search-box { border-radius: 8px !important; overflow: hidden; }
.hx-ae .hx-act:hover { background: rgba(0, 0, 0, .04); }
.hx-ae .hx-cart .hx-act-icon { font-size: 32px; }
.hx-wish #wishlist a { display: flex !important; }
.hx-wish #wishlist svg { width: 26px; height: 24px; }
.hx-wish #wishlist svg path { fill: none; stroke: currentColor; stroke-width: 1.2px; }
.hx-wish #wishlist .badge { top: -8px; right: -12px; background: #ff4747; }
.hx-wish #wishlist a { color: inherit !important; }
.hx-wish .hx-act-text { display: flex; }
.hx-ae .hx-bot { background: var(--hx-bot-bg); color: var(--hx-bot-tx); border-top: 1px solid #f0f0f0; }
/* Download App button at the end of the category bar */
.hx-ae .hx-app-btn {
    position: relative; overflow: hidden; flex: none; display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
    padding: 4px 16px 4px 4px; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap;
    color: #fff; background: linear-gradient(135deg, #1f2937, #111827);
    box-shadow: 0 6px 16px -8px rgba(17, 24, 39, .7); transition: transform .2s, box-shadow .2s;
}
.hx-ae .hx-app-btn::after { /* light sweep */
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
    transform: skewX(-20deg); animation: hx-app-shine 4.5s ease-in-out infinite;
}
.hx-ae .hx-app-btn-icon {
    width: 32px; height: 32px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; background: var(--primary, #1868e0); font-size: 19px;
    animation: hx-app-wiggle 4.5s ease-in-out infinite;
}
.hx-ae .hx-app-btn-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.hx-ae .hx-app-btn-text small { font-size: 10px; font-weight: 600; opacity: .7; }
.hx-ae .hx-app-btn-text strong { font-size: 13px; font-weight: 800; }
.hx-ae .hx-app-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(17, 24, 39, .8); }
.hx-ae .hx-app-btn:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--primary, #1868e0); }
@keyframes hx-app-shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes hx-app-wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-14deg); } 88% { transform: rotate(12deg); } 92% { transform: rotate(-8deg); } 96% { transform: rotate(4deg); } }
[dir="rtl"] .hx-ae .hx-app-btn { margin-left: 0; margin-right: auto; padding: 4px 4px 4px 16px; }
[dir="rtl"] .hx-ae .hx-app-btn-text { text-align: right; }

/* ---------- Phones: compact sticky header after scrolling down (menu button + search only) ---------- */
@media (max-width: 991.98px) {
    .hx-ae.hx-compact .hx-main { box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .25); }
    .hx-ae.hx-compact .hx-logo,
    .hx-ae.hx-compact .hx-actions { display: none !important; }
    .hx-ae.hx-compact .hx-mid-row { flex-wrap: nowrap; gap: 8px; min-height: 0; padding-top: 8px; padding-bottom: 8px; }
    .hx-ae.hx-compact .hx-search-wrap { order: 0; flex: 1 1 auto; animation: hx-slide-in .3s ease both; }
    .hx-ae.hx-compact .hx-burger { font-size: 26px; padding: 2px; animation: hx-spin-in .35s cubic-bezier(.34, 1.56, .64, 1) both; }
    .hx-ae:not(.hx-compact) .hx-logo,
    .hx-ae:not(.hx-compact) .hx-actions { animation: hx-fade-in .3s ease both; }
}
@keyframes hx-spin-in { from { opacity: 0; transform: rotate(-90deg) scale(.5); } to { opacity: 1; transform: none; } }
@keyframes hx-slide-in { from { opacity: .4; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes hx-fade-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .hx-ae .hx-app-btn::after, .hx-ae .hx-app-btn-icon,
    .hx-ae .hx-search-wrap, .hx-ae .hx-burger, .hx-ae .hx-logo, .hx-ae .hx-actions { animation: none !important; }
}
.hx-ae .hx-allcat {
    display: flex; align-items: center; gap: 8px; width: 250px; height: 44px; padding: 0 16px; margin-right: 12px;
    font-weight: 700; font-size: 14px; color: #fff; background: var(--primary, #1868e0); cursor: pointer; border-radius: 10px 10px 0 0;
}
.hx-ae .hx-allcat .la-angle-down { margin-left: auto; transition: transform .2s; }
.hx-ae .hx-allcat .la-angle-down.show { transform: rotate(180deg); }
.hx-links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; overflow-x: auto; white-space: nowrap; }
.hx-links > li { list-style: none; }
.hx-ae .hx-links a { display: inline-flex; align-items: center; gap: 4px; padding: 12px 12px; font-size: 14px; font-weight: 600; color: inherit !important; }
.hx-ae .hx-links a:hover, .hx-ae .hx-links a.active { color: var(--primary, #1868e0) !important; }
/* SuperDeals: animated gradient pill with a shine sweep, flickering bolt and a bouncing HOT tag */
.hx-ae .hx-links > li.hx-sd-item { padding: 0 6px 0 2px; }
.hx-ae .hx-links a.hx-superdeals {
    position: relative; overflow: hidden; isolation: isolate;
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 6px; margin: 6px 0;
    border-radius: 999px; color: #fff !important; font-weight: 800; letter-spacing: .2px;
    background: linear-gradient(90deg, #ff2d55, #ff4747 35%, #ff8a00 70%, #ff2d55);
    background-size: 220% 100%;
    box-shadow: 0 4px 14px rgba(255, 71, 71, .35);
    animation: hx-sd-flow 4s linear infinite;
    transition: transform .2s ease, box-shadow .2s ease;
}
.hx-ae .hx-links a.hx-superdeals::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
    transform: skewX(-20deg);
    animation: hx-sd-shine 2.8s ease-in-out infinite;
}
.hx-ae .hx-links a.hx-superdeals:hover {
    color: #fff !important; transform: translateY(-1px) scale(1.04);
    box-shadow: 0 8px 22px rgba(255, 71, 71, .5);
}
.hx-sd-bolt {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #ff4747;
    font-size: 16px; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
    animation: hx-sd-pulse 1.6s ease-out infinite;
}
.hx-sd-bolt i { animation: hx-sd-flicker 1.6s steps(1) infinite; }
.hx-sd-text { font-size: 14px; text-shadow: 0 1px 1px rgba(0, 0, 0, .15); }
.hx-sd-tag {
    padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 800; line-height: 1.5;
    color: #ff2d55; background: #ffe600;
    animation: hx-sd-bounce 1.6s ease-in-out infinite;
}
@keyframes hx-sd-flow { to { background-position: -220% 0; } }
@keyframes hx-sd-shine { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes hx-sd-pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .75); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 255, 255, 0); } }
@keyframes hx-sd-flicker { 0%, 100% { opacity: 1; } 8% { opacity: .35; } 12% { opacity: 1; } 16% { opacity: .5; } 20% { opacity: 1; } }
@keyframes hx-sd-bounce { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-3px) rotate(6deg); } }
@media (prefers-reduced-motion: reduce) {
    .hx-ae .hx-links a.hx-superdeals, .hx-ae .hx-links a.hx-superdeals::after,
    .hx-sd-bolt, .hx-sd-bolt i, .hx-sd-tag { animation: none; }
}
.hx-ae #click-category-menu .aiz-category-menu { border-radius: 0 0 10px 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }

/* ---------- Amazon header ---------- */
.hx-az .hx-main { background: var(--hx-mid-bg); }
.hx-az .hx-mid { background: var(--hx-mid-bg); color: var(--hx-mid-tx); }
.hx-az .hx-mid-row { gap: 4px; min-height: 60px; }
.hx-box {
    display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; color: inherit !important;
    border: 1px solid transparent; border-radius: 2px; background: none; cursor: pointer;
}
.hx-box:hover, .hx-box:focus-within { border-color: currentColor; }
.hx-az .hx-logo img { height: 36px; }
.hx-az .hx-logo-chip { background: #fff; border-radius: 6px; padding: 4px 10px; }
.hx-az .hx-logo-chip:hover { border-color: transparent; box-shadow: 0 0 0 2px #fff; }
.hx-az .hx-search-wrap { min-width: 280px; }
.hx-az .hx-two small, .hx-az .hx-two strong { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1399.98px) {
    .hx-az .hx-switches #currency-change { display: none; }
}
.hx-two { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.hx-two small { font-size: 12px; opacity: .8; }
.hx-two strong { font-size: 14px; font-weight: 700; }
.hx-deliver i { font-size: 20px; align-self: flex-end; }
.hx-az .hx-search-wrap { margin: 0 8px; }
.hx-az .hx-search { height: 40px; border-radius: 4px; overflow: hidden; }
.hx-az .hx-search:focus-within { box-shadow: 0 0 0 3px #f90; }
.hx-az .hx-search-cat { border-right: 1px solid #cdcdcd; }
.hx-az .hx-search-cat:hover { background: #d4d4d4; color: #111; }
.hx-az .hx-search-btn { padding: 0 14px; color: #333; background: #febd69; }
.hx-az .hx-search-btn:hover { background: #f3a847; }
.hx-az .hx-actions { gap: 2px; }
.hx-az .hx-switches { margin: 0; padding-left: 8px; gap: 10px; list-style: none; }
.hx-az .hx-switch-link { font-size: 13px; font-weight: 700; }
.hx-az .hx-act-icon { font-size: 26px; }
.hx-az .hx-drop { right: -40px; }
.hx-cart { align-items: flex-end !important; }
.hx-cart-icon { position: relative; display: inline-block; }
.hx-cart-icon i { font-size: 36px; line-height: 1; }
.hx-az .hx-cart .hx-badge { top: -4px; left: 50%; right: auto; transform: translateX(-35%); background: none; color: #f08804; font-size: 15px; }
.hx-az .hx-cart strong { font-size: 14px; padding-bottom: 2px; }
.hx-az .hx-bot { background: var(--hx-bot-bg); color: var(--hx-bot-tx); }
.hx-az .hx-bot .hx-box { padding: 7px 8px; font-size: 14px; font-weight: 500; }
.hx-az .hx-allcat { font-weight: 700; }
.hx-az .hx-allcat i { font-size: 20px; }
.hx-az .hx-links { gap: 0; }
.hx-az .hx-help { margin-left: auto; font-weight: 700; }
.hx-loc { display: flex; align-items: center; gap: 6px; padding: 8px 14px; font-size: 13px; color: var(--hx-top-tx) !important; background: var(--hx-top-bg); }
.hx-loc i { font-size: 18px; }

/* ---------- phones and tablets ---------- */
@media (max-width: 991.98px) {
    .hx-mid-row { flex-wrap: wrap; gap: 8px 10px; min-height: 0; padding: 8px 0 10px; }
    .hx-logo img { height: 32px; max-width: 150px; }
    .hx-actions { margin-left: auto; }
    .hx-search-wrap { order: 10; flex: 1 1 100%; margin: 0 !important; }
    .hx-search { height: 42px; }
    .hx-ae .hx-search { height: 40px; }
    .hx-ae .hx-search-ico { padding-left: 10px; font-size: 19px; }
    .hx-ae .front-header-search #search.hx-search-input { font-size: 14px; }
    .hx-ae .hx-search-btn { padding: 0 14px; font-size: 13px; }
    .hx-act { padding: 4px; }
    .hx-drop { position: fixed; top: auto; right: 10px; }
    .hx-has-drop:hover > .hx-drop { opacity: 0; visibility: hidden; }
    .hx-has-drop:focus-within > .hx-drop { opacity: 1; visibility: visible; }
    .hx-az .hx-mid-row { gap: 6px 4px; }
    .hx-az .hx-search { border-radius: 8px; }
    .hx-az .hx-cart-icon i { font-size: 32px; }
    .hx-box:hover { border-color: transparent; }
}

/* ---------- right-to-left ---------- */
[dir="rtl"] .hx-badge { right: auto; left: -9px; }
[dir="rtl"] .hx-ae .hx-links a.hx-superdeals { padding: 6px 6px 6px 14px; }
[dir="rtl"] .hx-drop { right: auto; left: 0; text-align: right; }
[dir="rtl"] .hx-az .hx-drop { left: -40px; }
[dir="rtl"] .hx-drop-count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hx-ae .hx-allcat { margin-right: 0; margin-left: 12px; }
[dir="rtl"] .hx-ae .hx-allcat .la-angle-down { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hx-ae .hx-search-ico { padding: 0 12px 0 0; }
[dir="rtl"] .hx-ae .front-header-search #search.hx-search-input { padding-left: 8px; padding-right: 8px; }
[dir="rtl"] .hx-az .hx-search-cat { border-right: 0; border-left: 1px solid #cdcdcd; }
[dir="rtl"] .hx-az .hx-help { margin-left: 0; margin-right: auto; }
[dir="rtl"] .hx-wish #wishlist .badge { right: auto; left: -12px; }
@media (max-width: 991.98px) {
    [dir="rtl"] .hx-actions { margin-left: 0; margin-right: auto; }
    [dir="rtl"] .hx-drop { right: auto; left: 10px; }
}
