/* Keep text and actions in separate flex tracks; legacy absolute icon rules must not overlap them. */
header form.search .bp-header-search {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 2px;
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 4px;
    border: 1px solid #d4dde7;
    border-radius: 6px;
    background: #f4f6f8;
}
header form.search .bp-header-search:focus-within { border-color: #8799af; }
header form.search .bp-header-search input[data-bp-search-input] {
    flex: 1 1 0;
    min-width: 0;
    width: 0 !important;
    height: 40px;
    margin: 0;
    padding: 0 10px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
    box-shadow: none;
    position: static;
    z-index: auto;
    font-size: 13px;
    line-height: normal;
}
header form.search .bp-header-search > button {
    position: static;
    inset: auto;
    transform: none;
    flex: 0 0 34px;
    width: 34px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #596579;
    font-size: 18px;
    line-height: 1;
    z-index: auto;
    cursor: pointer;
}
header form.search .bp-header-search > button:hover { background: #e3eaf1; color: #233247; }
header form.search .bp-header-search > button:focus-visible { outline: 2px solid #42648a; outline-offset: -2px; }
header form.search .bp-header-search > button.is-listening { background: #ffe8e8; color: #d63031; }
header form.search .bp-header-search > button i {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    float: none;
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    font-size: 18px;
    line-height: 1;
}
header form.search .bp-header-search .bp-search-autocomplete {
    position: absolute;
    inset: calc(100% + 8px) 0 auto;
    width: auto;
    max-height: min(60vh, 420px);
    overflow-y: auto;
}

/* Anchor the count to the cart icon, not the full button or the header row. */
header .bp-header-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin: 0;
}
header .bp-header-cart-icon > img { width: 25px; height: 25px; object-fit: contain; }
header .bp-header-cart-icon > i { margin: 0; font-size: 25px; line-height: 1; }
header .sepet-button { display: flex; align-items: center; justify-content: center; gap: 10px; white-space: nowrap; }
header .sepet-button .bp-header-cart-icon > .bp-header-cart-count,
header .mobil-nav-bar .top-side-menu .bp-header-cart-icon > .bp-header-cart-count {
    position: absolute;
    inset: -5px -8px auto auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    width: auto;
    max-width: 40px;
    height: 19px;
    margin: 0;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #f5a000;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 15px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: none;
}

@media (min-width: 1200px) {
    header .desktop-nav { padding: 0; }
    header .desktop-nav .mega-menu-container { width: 100%; flex-wrap: nowrap; align-items: center; }
    header .desktop-nav .mega-menu-item { flex: 0 1 auto; min-width: 0; }
    header .desktop-nav .mega-menu-item > a { margin: 0; padding: 0 12px; }
    header .desktop-nav .mega-menu-item > a span.mega-menu-hover { white-space: nowrap; font-size: 13px; line-height: 50px; }
}
@media (min-width: 1200px) and (max-width: 1439px) {
    header .desktop-nav .mega-menu-item > a { padding: 0 8px; }
    header .desktop-nav .mega-menu-item > a span.mega-menu-hover { font-size: 12px; }
}

@media (max-width: 1199px) {
    header > .top-bar, header > .center-bar, header > .desktop-nav { display: none !important; }
    header > .mobil-nav-bar { display: block; width: 100%; background: #fff; }
    header .mobil-nav-bar .top-area {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px;
    }
    header .mobil-nav-bar .top-area > .fl { float: none; min-width: 0; }
    header .mobil-nav-bar .top-area > .fl > a { display: block; }
    header .mobil-nav-bar .top-area > .fl > a > img { width: 160px; max-width: 100%; height: auto; max-height: 48px; object-fit: contain; }
    header .mobil-nav-bar .top-area > .fr { float: none; flex-shrink: 0; }
    header .mobil-nav-bar .top-side-menu { display: flex; align-items: center; gap: 8px; position: static; margin: 0; padding: 0; }
    header .mobil-nav-bar .top-side-menu > li { display: flex; align-items: center; justify-content: center; width: 32px; height: 36px; margin: 0; }
    header .mobil-nav-bar .top-side-menu > li > a { display: flex; align-items: center; justify-content: center; width: 32px; height: 36px; }
    header .mobil-nav-bar .top-side-menu > li > a > img { width: 25px; height: 25px; object-fit: contain; }
    header .mobil-nav-bar .top-side-menu .bph-bell { width: 32px; height: 36px; }
    header .mobil-nav-bar .top-area > .clearfix, header .mobil-nav-bar .footer-area > .clearfix { display: none; }
    header .mobil-nav-bar .footer-area { display: flex; align-items: center; gap: 10px; padding: 0 16px 16px; }
    header .mobil-nav-bar .footer-area > .fl { float: none; flex: 0 0 36px; }
    header .mobil-nav-bar .kategoriler-buton-wrapper { display: flex; align-items: center; justify-content: center; width: 36px; height: 48px; }
    header .mobil-nav-bar #kategorilerBtn { display: flex; align-items: center; justify-content: center; width: 36px; height: 44px; cursor: pointer; }
    header .mobil-nav-bar #kategorilerBtn > img { width: 26px; height: 26px !important; }
    header .mobil-nav-bar .footer-area > .fr { float: none; flex: 1 1 0; min-width: 0; width: auto; }
    header .mobil-nav-bar form.search { width: 100%; margin: 0; }
    header .mobil-nav-bar .bp-header-search { height: 48px; }
    header .mobil-nav-bar form.search .bp-header-search > button { flex-basis: 30px; width: 30px; }
}
@media (max-width: 359px) {
    header .mobil-nav-bar .top-area { gap: 12px; padding: 14px 12px; }
    header .mobil-nav-bar .top-area > .fl > a > img { width: 140px; }
    header .mobil-nav-bar .footer-area { gap: 8px; padding: 0 12px 14px; }
    header form.search .bp-header-search input[data-bp-search-input] { padding: 0 6px !important; font-size: 12px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    body.bp-header-stuck > header { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 1100; }
}
