/* NoviSepet desktop header redesign — intentionally isolated from mobile. */
@media (min-width: 769px) {
    :root {
        --dh-blue: #087ebc;
        --dh-blue-dark: #075f96;
        --dh-orange: #ff6b00;
        --dh-ink: #171b24;
        --dh-muted: #727986;
        --dh-surface: #ffffff;
        --dh-soft: #f5f7fa;
        --dh-line: #e9edf3;
        --dh-shadow: 0 12px 34px rgba(26, 36, 54, .09);
    }

    /* The old utility row is deliberately removed on desktop. */
    .site-header-sticky > .top-bar {
        display: none !important;
    }

    .site-header-sticky {
        position: fixed;
        inset: 0 0 auto;
        z-index: 99980;
        width: 100%;
        padding: 0;
        background: #fff !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-header-sticky > .main-header,
    .site-header-sticky > .main-nav {
        width: 100%;
        padding: 0 !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    .site-header-sticky > .main-header > .container,
    .site-header-sticky > .main-nav > .container {
        width: 100%;
        max-width: 1200px;
        margin-inline: auto;
        padding-inline: 18px;
    }

    /* Main card: logo + live search + account actions. */
    .site-header-sticky .header-content {
        position: relative;
        width: 100%;
        min-height: 74px;
        display: flex !important;
        align-items: center;
        gap: 16px !important;
        padding: 10px 12px !important;
        overflow: visible;
        border: 1px solid rgba(222, 227, 235, .86);
        border-radius: 0;
        background: #fff;
        box-shadow: var(--dh-shadow);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-header-sticky .header-content::before {
        content: '';
        position: absolute;
        z-index: 2;
        top: -1px;
        left: 28px;
        width: 74px;
        height: 3px;
        border-radius: 0 0 99px 99px;
        background: linear-gradient(90deg, var(--dh-blue), #21a8d5 54%, var(--dh-orange));
    }

    .site-header-sticky .header-content > .logo {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 142px;
        min-width: 142px;
        padding: 0 7px;
    }

    .site-header-sticky .header-content > .logo a {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .site-header-sticky .header-content > .logo img {
        width: 100%;
        max-width: 134px;
        height: 52px !important;
        object-fit: contain;
    }

    /* Search becomes the visual center of the header. */
    .site-header-sticky .header-content > #msWrap {
        display: block !important;
        flex: 1 1 470px !important;
        width: auto !important;
        min-width: 230px;
        max-width: 570px !important;
        margin: 0;
    }

    .site-header-sticky #msForm {
        width: 100%;
        min-height: 54px;
        height: 54px;
        display: flex;
        align-items: center;
        overflow: visible;
        border: 1px solid #dfe5ed !important;
        border-radius: 18px !important;
        background: #f7f9fc !important;
        box-shadow: 0 5px 16px rgba(30, 41, 59, .055), inset 0 1px 0 rgba(255,255,255,.85) !important;
        transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
    }

    .site-header-sticky #msForm:focus-within {
        background: #fff !important;
        border-color: rgba(8,126,188,.40) !important;
        box-shadow: 0 0 0 3px rgba(8,126,188,.08), 0 8px 22px rgba(30, 64, 90, .09) !important;
        transform: none;
    }

    .site-header-sticky #msForm .ms-icon {
        display: flex !important;
        padding: 0 12px 0 16px;
        color: #8793a3;
    }

    .site-header-sticky #msForm .ms-icon svg {
        width: 20px;
        height: 20px;
        stroke-width: 2;
    }

    .site-header-sticky #msForm .ms-input {
        min-width: 0;
        padding: 14px 0 !important;
        color: var(--dh-ink);
        font-size: 13px !important;
        font-weight: 500;
        letter-spacing: -.01em;
    }

    .site-header-sticky #msForm .ms-input::placeholder {
        color: #929dab;
        font-weight: 400;
    }

    .site-header-sticky #msForm .ms-clear {
        width: 28px;
        height: 28px;
        margin-right: 5px;
        background: #e9edf2;
    }

    .site-header-sticky #msForm > .ms-btn {
        width: 44px !important;
        height: 44px !important;
        margin: 5px 4px 5px 0 !important;
        border: 1px solid #0878b3 !important;
        border-radius: 14px !important;
        background: #087ebc !important;
        color: #fff !important;
        box-shadow: 0 5px 13px rgba(8,126,188,.24);
    }

    .site-header-sticky #msForm > .ms-btn svg {
        width: 19px;
        height: 19px;
        stroke-width: 2.15;
    }

    .site-header-sticky #msForm > .ms-btn:hover {
        background: #075f96 !important;
        transform: translateY(-1px) !important;
        box-shadow: 0 7px 17px rgba(8,126,188,.29);
    }

    .site-header-sticky #msForm #notifWrapper {
        height: 44px;
        margin: 5px 5px 5px 0;
    }

    .site-header-sticky #msForm #notifBtn {
        width: 44px !important;
        height: 44px !important;
        margin: 0 !important;
        border: 1px solid #e1e6ed !important;
        border-radius: 14px !important;
        background: #fff !important;
        color: #657080 !important;
        box-shadow: 0 2px 7px rgba(30,41,59,.055);
    }

    .site-header-sticky #msForm #notifBtn:hover {
        border-color: #c9dde8 !important;
        background: #f5fafc !important;
        color: var(--dh-blue) !important;
    }

    .site-header-sticky #msForm #notifBtn svg {
        width: 19px;
        height: 19px;
        stroke-width: 2;
    }

    .site-header-sticky #msForm #notifBadge {
        top: -4px;
        right: -3px;
        min-width: 17px;
        height: 17px;
        background: var(--dh-orange);
        border: 2px solid #fff;
        font-size: 8px;
    }

    .site-header-sticky #msDropdown {
        top: calc(100% + 12px);
        border: 1px solid #e1e6ed;
        border-radius: 16px;
        box-shadow: 0 18px 46px rgba(28,36,52,.15);
    }

    /* Rebuilt desktop search: classic white field with a separate action rail. */
    .site-header-sticky #msForm.search-classic-v2 {
        width: 100%;
        height: 56px;
        min-height: 56px;
        display: flex;
        align-items: center;
        overflow: visible;
        border: 1.5px solid #cfd7e2 !important;
        border-radius: 12px !important;
        background: #fff !important;
        box-shadow: 0 8px 24px rgba(30,41,59,.08) !important;
        transition: border-color .2s ease, box-shadow .2s ease;
    }

    .site-header-sticky #msForm.search-classic-v2:focus-within {
        border-color: #63aace !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(8,126,188,.09), 0 10px 28px rgba(30,64,90,.10) !important;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__icon {
        width: 48px;
        height: 30px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex: 0 0 48px;
        padding: 0;
        border-right: 1px solid #e7ebf0;
        color: #536173;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__icon svg {
        width: 20px;
        height: 20px;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__input {
        min-width: 0;
        padding: 0 14px !important;
        color: #172033;
        font-size: 14px !important;
        font-weight: 500;
        letter-spacing: 0;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__input::placeholder {
        color: #8994a3;
        font-weight: 400;
    }

    .site-header-sticky #msForm.search-classic-v2 .ms-clear {
        width: 28px;
        height: 28px;
        margin: 0 6px 0 0;
        background: #eef1f5;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__actions {
        align-self: stretch;
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 0 0 auto;
        padding: 6px;
        border-left: 1px solid #e2e7ed;
        border-radius: 0 10px 10px 0;
        background: #f7f9fb;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__submit {
        width: 78px !important;
        height: 42px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        margin: 0 !important;
        padding: 0 15px;
        border: 1px solid #0878b3 !important;
        border-radius: 8px !important;
        background: #087ebc !important;
        color: #fff !important;
        box-shadow: 0 4px 11px rgba(8,126,188,.22);
        font-family: inherit;
        font-size: 12px;
        font-weight: 700;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__submit svg {
        width: 17px;
        height: 17px;
        flex: 0 0 auto;
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__submit:hover {
        background: #075f96 !important;
        transform: none !important;
        box-shadow: 0 6px 15px rgba(8,126,188,.28);
    }

    .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__divider {
        width: 1px;
        height: 27px;
        flex: 0 0 1px;
        background: #dfe4ea;
    }

    .site-header-sticky #msForm.search-classic-v2 #notifWrapper {
        height: 42px;
        margin: 0;
    }

    .site-header-sticky #msForm.search-classic-v2 #notifBtn {
        width: 42px !important;
        height: 42px !important;
        margin: 0 !important;
        border: 1px solid #dce2e9 !important;
        border-radius: 8px !important;
        background: #fff !important;
        color: #566274 !important;
        box-shadow: none;
    }

    .site-header-sticky #msForm.search-classic-v2 #notifBtn:hover {
        border-color: #9dc7dc !important;
        background: #fff !important;
        color: var(--dh-blue) !important;
    }

    @media (max-width: 1040px) {
        .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__icon {
            width: 38px;
            flex-basis: 38px;
            border-right: 0;
        }

        .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__input {
            padding-inline: 5px !important;
            font-size: 12px !important;
        }

        .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__actions {
            gap: 5px;
            padding: 6px 5px;
        }

        .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__submit {
            width: 42px !important;
            padding: 0;
        }

        .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__submit-label,
        .site-header-sticky #msForm.search-classic-v2 .search-classic-v2__divider {
            display: none;
        }
    }

    /* Action tiles */
    .site-header-sticky .header-content > .new-header-actions {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
        min-width: 0;
        margin-left: auto !important;
        gap: 7px !important;
    }

    .site-header-sticky .hdr-quick-actions {
        display: flex;
        align-items: center;
        gap: 7px;
    }

    .site-header-sticky .hdr-quick-action,
    .site-header-sticky .new-cart-button {
        position: relative;
        width: 62px !important;
        min-width: 62px !important;
        height: 52px !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 4px !important;
        border: 0;
        border-radius: 14px !important;
        background: #f7f8fa;
        color: #59616d;
        box-shadow: inset 0 0 0 1px #edf0f4;
        transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease;
    }

    .site-header-sticky .hdr-quick-action:hover {
        color: var(--dh-blue);
        background: #edf7fb;
        transform: translateY(-2px);
        box-shadow: inset 0 0 0 1px rgba(8,126,188,.16), 0 8px 17px rgba(24,67,92,.09);
    }

    .site-header-sticky .hdr-quick-action svg,
    .site-header-sticky .cart-icon-container svg {
        width: 20px;
        height: 20px;
        stroke-width: 1.8;
    }

    .site-header-sticky .hdr-quick-action span:not(.hdr-quick-badge),
    .site-header-sticky .new-cart-price .cart-label {
        display: block !important;
        max-width: 56px;
        overflow: hidden;
        color: currentColor;
        font-size: 8px !important;
        font-weight: 650 !important;
        line-height: 1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-header-sticky .hdr-quick-badge {
        top: -5px;
        right: -5px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #fff;
        border-radius: 99px;
        background: var(--dh-orange);
        color: #fff;
        font-size: 8px;
        font-weight: 800;
    }

    .site-header-sticky .cart-icon-container {
        position: static !important;
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 22px;
    }

    .site-header-sticky .new-cart-count {
        position: absolute !important;
        top: 4px !important;
        right: 5px !important;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 2px solid #fff;
        border-radius: 99px;
        background: var(--dh-orange);
        color: #fff;
        font-size: 8px;
        font-weight: 800;
        line-height: 1;
        transform: none !important;
    }

    .site-header-sticky .new-cart-count:empty {
        display: none !important;
    }

    .site-header-sticky .new-cart-wrapper {
        display: block !important;
        margin: 0;
    }

    .site-header-sticky .new-cart-button {
        background: linear-gradient(145deg, #232833, #11141b) !important;
        color: #fff !important;
        box-shadow: 0 7px 17px rgba(17,20,27,.20) !important;
    }

    .site-header-sticky .new-cart-button:hover {
        color: #fff !important;
        background: linear-gradient(145deg, var(--dh-blue), var(--dh-blue-dark)) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 10px 22px rgba(8,126,188,.24) !important;
    }

    .site-header-sticky .new-cart-price {
        display: block !important;
        line-height: 1;
    }

    .site-header-sticky .new-cart-price .cart-amount {
        display: none !important;
    }

    .site-header-sticky .new-cart-dropdown,
    .site-header-sticky #notifDropdown {
        border: 1px solid var(--dh-line);
        border-radius: 17px;
        box-shadow: 0 18px 48px rgba(28,36,52,.18);
    }

    /* Session-aware account controls replace the legacy auth group on desktop. */
    .site-header-sticky .hdr-auth-group {
        display: none !important;
    }

    .site-header-sticky #upBalance,
    .site-header-sticky #upTrigger {
        display: flex !important;
    }

    .site-header-sticky #upBalance {
        min-width: 104px;
        padding: 6px 10px 6px 7px;
    }

    .site-header-sticky #upTrigger {
        max-width: 132px;
        padding: 5px 9px 5px 5px;
    }

    .site-header-sticky #upTrigger .up-name {
        max-width: 66px;
    }

    @media (max-width: 1080px) {
        .site-header-sticky #upBalance {
            min-width: auto;
            padding-right: 8px;
        }
        .site-header-sticky #upBalance .ubal-label {
            display: none;
        }
        .site-header-sticky #upTrigger {
            max-width: 104px;
        }
        .site-header-sticky #upTrigger .up-name {
            max-width: 42px;
        }
    }

    /* Category card */
    .site-header-sticky > .main-nav {
        margin-top: 0;
    }

    .site-header-sticky > .main-nav > .container {
        overflow: visible;
    }

    .site-header-sticky .nav-menu.sf-category-nav {
        width: 100%;
        min-height: 61px;
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: 5px;
        margin: 0;
        padding: 6px;
        overflow: visible;
        border: 1px solid rgba(222,227,235,.86);
        border-top: 0;
        border-radius: 0 0 16px 16px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(26,36,54,.07);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .site-header-sticky .sf-category-nav .nav-item,
    .site-header-sticky .sf-category-nav .nav-item:first-child,
    .site-header-sticky .sf-category-nav .nav-item:last-child {
        flex: 1 1 0;
        min-width: 92px;
        border: 0 !important;
    }

    .site-header-sticky .sf-category-nav .nav-link {
        position: relative;
        width: 100%;
        height: 49px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 5px 8px;
        overflow: hidden;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: #555d69;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .015em;
        line-height: 1.1;
        text-align: left;
        text-transform: uppercase;
        transition: color .18s ease, background .18s ease, transform .18s ease;
    }

    .site-header-sticky .sf-category-nav .nav-link::after {
        display: none !important;
    }

    .site-header-sticky .sf-category-nav .nav-link:hover {
        color: var(--dh-blue);
        background: #edf7fb;
        transform: translateY(-1px);
    }

    .site-header-sticky .sf-category-nav .nav-link.active {
        border-radius: 0;
        color: #fff;
        background: linear-gradient(135deg, var(--dh-blue), var(--dh-blue-dark));
        box-shadow: 0 7px 15px rgba(8,126,188,.20);
    }

    .site-header-sticky .sf-category-icon {
        width: 29px;
        height: 29px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 29px;
        border-radius: 9px;
        background: #f1f3f6;
        color: #626a76;
        transition: color .18s ease, background .18s ease;
    }

    .site-header-sticky .sf-category-nav .nav-link:hover .sf-category-icon {
        color: var(--dh-blue);
        background: #fff;
    }

    .site-header-sticky .sf-category-nav .nav-link.active .sf-category-icon {
        color: #fff;
        background: rgba(255,255,255,.16);
    }

    /* Tüm kategoriler: sade beyaz zemin ve kutusuz hamburger ikon. */
    .site-header-sticky .sf-category-nav #navCategoryTrigger,
    .site-header-sticky .sf-category-nav #navCategoryTrigger:hover {
        color: #171b24;
        background: #fff;
        box-shadow: none;
        transform: none;
    }

    .site-header-sticky .sf-category-nav #navCategoryTrigger .sf-category-icon,
    .site-header-sticky .sf-category-nav #navCategoryTrigger:hover .sf-category-icon {
        width: 34px;
        flex-basis: 34px;
        border-radius: 0;
        color: #111;
        background: transparent;
    }

    .site-header-sticky .sf-category-nav #navCategoryTrigger .sf-category-icon svg {
        width: 22px;
        height: 19px;
        stroke-width: 2.8;
    }

    .site-header-sticky .sf-category-icon svg {
        width: 17px;
        height: 17px;
        margin: 0;
        transform: none;
        stroke: currentColor;
    }

    .site-header-sticky .sf-category-label {
        max-width: 74px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Compact adaptation before the mobile breakpoint. */
    @media (max-width: 1040px) {
        .site-header-sticky .header-content > .logo {
            flex-basis: 116px;
            min-width: 116px;
        }

        .site-header-sticky .header-content > .logo img {
            max-width: 108px;
        }

        .site-header-sticky .header-content > #msWrap {
            min-width: 190px;
        }

        .site-header-sticky .hdr-quick-action,
        .site-header-sticky .new-cart-button {
            width: 52px !important;
            min-width: 52px !important;
        }

        .site-header-sticky .hdr-quick-action span:not(.hdr-quick-badge),
        .site-header-sticky .new-cart-price .cart-label {
            font-size: 7px !important;
        }

        .site-header-sticky .sf-category-nav .nav-link {
            flex-direction: column;
            gap: 2px;
            font-size: 9px;
        }

        .site-header-sticky .sf-category-icon {
            width: 23px;
            height: 23px;
            flex-basis: 23px;
            background: transparent;
        }
    }
}

/* Borderless transparent desktop action buttons. */
@media (min-width: 769px) {
    .site-header-sticky .hdr-quick-action,
    .site-header-sticky .new-cart-button {
        border: 0 !important;
        background: transparent !important;
        color: #59616d !important;
        box-shadow: none !important;
    }

    .site-header-sticky .hdr-quick-action:hover,
    .site-header-sticky .new-cart-button:hover {
        border: 0 !important;
        background: transparent !important;
        color: var(--dh-blue) !important;
        box-shadow: none !important;
        transform: translateY(-1px) !important;
    }

    .site-header-sticky .new-cart-price .cart-label {
        color: currentColor !important;
    }
}

/* Straight separator between desktop login and register actions. */
@media (min-width: 769px) {
    .site-header-sticky .hdr-quick-actions .hdr-auth-tile + .hdr-auth-tile {
        margin-left: 8px;
    }

    .site-header-sticky .hdr-quick-actions .hdr-auth-tile + .hdr-auth-tile::before {
        content: '';
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: -8px;
        width: 1px;
        border-radius: 0;
        background: #dfe3e9;
        pointer-events: none;
    }
}
