.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
    border: 0;
    background: rgba(255,255,255,.98);
    color: #171b24;
    box-shadow: 0 4px 20px rgba(20,26,36,.045);
    backdrop-filter: blur(18px);
}
.site-header .store-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.header-main { border-bottom: 1px solid #edf0f3; }
.header-main-row {
    display: grid;
    grid-template-columns: minmax(160px, 235px) minmax(340px, 615px) minmax(160px, 235px);
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 82px;
}
.site-header .site-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    min-width: 0;
    padding: 5px 0;
    color: #ed1c24 !important;
}
.site-header .site-brand img { display: block; width: auto; max-width: 125px; height: 52px; max-height: 52px; object-fit: contain; }
.header-wordmark { display: grid; justify-items: start; font-family: Arial,sans-serif; font-weight: 900; line-height: .84; letter-spacing: -.06em; }
.header-wordmark b { color: #ed1c24; font-size: 30px; }
.header-wordmark small { justify-self: end; padding: 3px 5px; background: #999; color: #fff; font-size: 14px; letter-spacing: 0; }
.header-search {
    position: relative;
    direction: rtl;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    align-items: stretch;
    width: 100%;
    height: 45px;
    overflow: visible;
    border: 1px solid #dfe3e8;
    border-radius: 7px;
    background: #fff;
}
.header-search::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: #fff;
    pointer-events: none;
}
.site-header .header-search input {
    position: relative;
    z-index: 1;
    min-width: 0;
    height: 43px;
    padding: 8px 15px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #2b313b;
    box-shadow: none;
    font-size: 14px;
}
.site-header .header-search input:focus { box-shadow: inset 0 0 0 1px rgba(238,0,0,.18); }
.site-header .header-search input::placeholder { color: #555e6c; }
.site-header .header-search button {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1;
    width: 48px;
    height: 43px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #ee0000;
    color: #fff;
    box-shadow: none;
}
.site-header .header-search button:hover { background: #c90000; filter: none; transform: none; box-shadow: none; }
.site-header .header-search .store-icon { width: 23px; height: 23px; }
.header-search-panel {
    position: absolute;
    z-index: 150;
    top: calc(100% + 9px);
    right: 0;
    left: 0;
    max-height: min(520px, calc(100vh - 120px));
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(20, 26, 36, .17);
}
.header-search-panel[hidden] { display: none !important; }
.header-search-state { padding: 11px 10px; color: #707784; font-size: 14px; line-height: 1.8; }
.header-search-state:empty { display: none; }
.header-search-state-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #252b35; font-size: 14px; font-weight: 800; }
.site-header .header-search-clear-history {
    width: auto;
    height: auto;
    padding: 3px 7px;
    background: transparent;
    color: #ee0000;
    font-size: 14px;
}
.site-header .header-search-clear-history:hover { background: #fff1f1; }
.header-search-history { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 10px; }
.site-header .header-search-history button {
    width: auto;
    height: 31px;
    padding: 0 11px;
    border: 1px solid #eceef1;
    border-radius: 999px;
    background: #f8f9fb;
    color: #4f5764;
    font-size: 14px;
}
.site-header .header-search-history button:hover { border-color: #ffd1d1; background: #fff4f4; color: #d70000; }
.header-search-results { display: grid; }
.header-search-result {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 11px;
    padding: 9px;
    border-radius: 10px;
    color: #252b35 !important;
}
.header-search-result:hover, .header-search-result:focus { background: #fff5f5; color: #c90000 !important; }
.header-search-result img { width: 58px; height: 58px; border: 1px solid #eef0f3; border-radius: 9px; background: #f8f9fb; object-fit: contain; }
.header-search-result-info { display: grid; min-width: 0; gap: 3px; }
.header-search-result-category { overflow: hidden; color: #8a909a; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.header-search-result-name { overflow: hidden; font-size: 14px; font-weight: 800; line-height: 1.7; text-overflow: ellipsis; white-space: nowrap; }
.header-search-result-price { color: #ee0000; font-size: 14px; font-weight: 800; }
.header-search-result-arrow { direction: ltr; color: #a2a8b1; font-size: 18px; }
.header-search-all { display: flex; align-items: center; justify-content: center; margin-top: 7px; padding: 10px; border-top: 1px solid #eef0f3; color: #ee0000 !important; font-size: 14px; font-weight: 800; }
.header-search-all[hidden] { display: none !important; }
.header-actions { direction: rtl; display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.site-header .header-action-link {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    color: #111 !important;
    background: transparent;
}
.site-header .header-action-link:hover { background: #fff1f1; color: #ee0000 !important; }
.site-header .header-action-link .store-icon { width: 27px; height: 27px; stroke-width: 1.7; }
.site-header .header-action-link > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.header-cart-link b { position: absolute; top: -1px; left: -1px; display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border: 2px solid #fff; border-radius: 99px; background: #ee0000; color: #fff; font-size: 14px; line-height: 1; }
.site-header .mobile-nav-toggle { display: none; width: 42px; height: 42px; padding: 0; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; color: #222; box-shadow: none; }

.site-header-nav { border-bottom: 1px solid #eceff2; background: #fff; }
.header-nav-row { position: relative; display: flex; align-items: stretch; min-height: 51px; }
.header-category { position: static; display: flex; align-items: stretch; }
.site-header .header-category-trigger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 185px;
    padding: 0 8px 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ee0000;
    box-shadow: none;
    font-size: 14px;
    font-weight: 800;
}
.site-header .header-category-trigger:hover,
.header-category.is-open .header-category-trigger { background: #fff5f5; color: #c90000; filter: none; transform: none; box-shadow: inset 0 -2px 0 #ee0000; }
.header-category-trigger .store-icon { width: 17px; height: 17px; }
.header-category-chevron { width: 13px !important; height: 13px !important; margin-right: auto; transition: transform .2s; }
.header-category.is-open .header-category-chevron { transform: rotate(180deg); }
.header-nav-links { display: flex; min-width: 0; flex: 1; align-items: stretch; justify-content: flex-start; gap: 2px; }
.site-header .header-nav-links > a,
.site-header .header-websites > button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: max-content;
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #242933;
    box-shadow: none;
    font-size: 14px;
    font-weight: 600;
}
.site-header .header-nav-links > a:hover,
.site-header .header-websites > button:hover { background: #f8f9fb; color: #ee0000; filter: none; transform: none; box-shadow: inset 0 -2px 0 #ee0000; }
.header-nav-links > a .store-icon,
.header-websites > button .store-icon { width: 15px; height: 15px; color: #ee0000; }
.header-websites { position: relative; display: flex; }
.header-websites > button .store-icon:last-child { width: 11px; margin-right: 2px; color: #7c8491; }
.header-websites > div { position: absolute; top: calc(100% - 2px); right: 0; display: grid; width: 230px; padding: 8px; border: 1px solid #e4e7ec; border-radius: 12px; background: #fff; box-shadow: 0 18px 45px rgba(18,24,35,.15); opacity: 0; visibility: hidden; transform: translateY(7px); transition: .18s; }
.header-websites:hover > div,
.header-websites:focus-within > div { opacity: 1; visibility: visible; transform: none; }
.header-websites > div a { padding: 8px 10px; border-radius: 7px; color: #535d6c; font-size: 14px; }
.header-websites > div a:hover { background: #fff2f2; color: #ee0000; }
.header-custom-menu { display: flex; min-width: 0; align-items: stretch; }
.site-header .header-custom-menu > .site-menu { display: flex; align-items: stretch; gap: 1px; }
.site-header .header-custom-menu > .site-menu > li { display: flex; align-items: stretch; }
.site-header .header-custom-menu > .site-menu > li > a { display: flex; align-items: center; padding: 0 13px; color: #242933; font-size: 14px; font-weight: 600; }
.site-header .header-custom-menu > .site-menu > li > a:hover { background: #f8f9fb; color: #ee0000; }
.site-header .header-custom-menu .site-menu ul { top: 100%; }

.header-mega-menu {
    position: absolute;
    z-index: 110;
    top: 100%;
    right: 0;
    left: auto;
    width: min(1170px, 100%);
    padding: 0 0 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.header-category:hover .header-mega-menu,
.header-category:focus-within .header-mega-menu,
.header-category.is-open .header-mega-menu { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.header-mega-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(520px, calc(100vh - 155px));
    overflow: auto;
    padding: 24px 20px 28px;
    border: 1px solid #e5e8ed;
    border-top: 1px solid #e5e8ed;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 24px 55px rgba(17,24,39,.16);
}
.header-mega-column { min-width: 0; padding: 0 26px; border-left: 1px solid #e6e8ec; }
.header-mega-column:first-child { padding-right: 6px; }
.header-mega-column:last-child { border-left: 0; }
.header-mega-title { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid #e5e7eb; color: #30343b !important; font-size: 16px; font-weight: 800; }
.header-mega-title > span { display: grid; place-items: center; width: 25px; height: 25px; color: #ee0000; }
.header-mega-title .store-icon { width: 20px; height: 20px; }
.header-mega-links { display: grid; align-content: start; gap: 1px; }
.header-mega-links a { overflow: hidden; padding: 5px 4px; border-radius: 4px; color: #686f7a; font-size: 14px; line-height: 1.65; text-overflow: ellipsis; white-space: nowrap; }
.header-mega-links a:hover { padding-right: 9px; background: #fff5f5; color: #ee0000; }

@media (max-width: 1020px) {
    .header-main-row { grid-template-columns: 150px minmax(280px, 1fr) 120px; gap: 18px; }
    .site-header .header-nav-links > a,
    .site-header .header-websites > button { padding-inline: 9px; font-size: 14px; }
    .header-nav-links > a .store-icon { display: none; }
    .header-mega-columns { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 820px) {
    .site-header { position: sticky; }
    .header-main-row { grid-template-columns: 1fr auto; gap: 10px 16px; min-height: 74px; padding: 10px 0; }
    .site-header .site-brand { grid-column: 1; grid-row: 1; }
    .site-header .site-brand img { max-width: 105px; height: 42px; }
    .header-wordmark b { font-size: 25px; }
    .header-actions { grid-column: 2; grid-row: 1; }
    .site-header .header-action-link { width: 39px; height: 39px; }
    .site-header .header-action-link .store-icon { width: 24px; height: 24px; }
    .site-header .mobile-nav-toggle { display: grid; place-items: center; }
    .header-search { grid-column: 1 / -1; grid-row: 2; height: 42px; }
    .header-search-panel { position: fixed; top: 125px; right: 12px; left: 12px; max-height: calc(100vh - 145px); }
    .site-header .header-search input,
    .site-header .header-search button { height: 40px; }
    .site-header-nav { display: none; max-height: calc(100vh - 130px); overflow-y: auto; }
    .site-header-nav.is-open { display: block; }
    .header-nav-row { display: block; padding: 8px 0 15px; }
    .header-category { display: block; }
    .site-header .header-category-trigger { width: 100%; min-height: 45px; padding: 0 10px; border-radius: 9px; }
    .header-mega-menu { position: static; display: none; width: 100%; padding: 0; opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
    .header-category.is-open .header-mega-menu { display: block; }
    .header-mega-columns { grid-template-columns: 1fr; max-height: none; padding: 10px; border: 1px solid #eceef2; border-radius: 12px; box-shadow: none; }
    .header-mega-column { padding: 13px 8px; border-left: 0; border-bottom: 1px solid #eceef2; }
    .header-mega-column:first-child { padding-right: 8px; }
    .header-mega-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .header-nav-links { display: grid; }
    .site-header .header-nav-links > a,
    .site-header .header-websites > button { justify-content: flex-start; width: 100%; min-height: 43px; padding: 0 11px; border-radius: 8px; }
    .header-nav-links > a .store-icon { display: block; }
    .header-websites { display: block; }
    .header-websites > div { position: static; display: none; width: 100%; margin: 0; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
    .header-websites:focus-within > div { display: grid; }
    .header-custom-menu,
    .site-header .header-custom-menu > .site-menu { display: block; width: 100%; }
    .site-header .header-custom-menu > .site-menu > li { display: block; }
    .site-header .header-custom-menu > .site-menu > li > a { min-height: 43px; padding: 0 11px; }
    .site-header .header-custom-menu .site-menu ul { position: static; display: block; border: 0; box-shadow: none; }
}

@media (max-width: 480px) {
    .header-main-row { gap: 8px; }
    .site-header .header-action-link { width: 35px; }
    .site-header .mobile-nav-toggle { width: 37px; height: 37px; }
    .header-search { grid-template-columns: minmax(0, 1fr) 43px; }
    .site-header .header-search button { width: 43px; }
    .header-mega-links { grid-template-columns: 1fr; }
}
