.store-header {
        --header-primary: var(--primary-color, #d32f2f);
        --header-primary-dark: #b71c1c;
        --header-text: #202124;
        --header-muted: #6b7280;
        --header-border: #e5e7eb;
        --header-background: #ffffff;
        --header-soft-background: #f7f8fa;
        --header-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
        --header-radius: 12px;
        --header-max-width: 1440px;

        position: relative;
        z-index: 1000;
        width: 100%;
        direction: rtl;
        color: var(--header-text);
        background: var(--header-background);
        font-family: inherit;
    }

    .store-header *,
    .store-header *::before,
    .store-header *::after {
        box-sizing: border-box;
    }

    .store-header a {
        color: inherit;
        text-decoration: none;
    }

    .store-header button,
    .store-header input {
        font: inherit;
    }

    .store-header button {
        border: 0;
    }

    .store-header-container {
        width: min(100% - 32px, var(--header-max-width));
        margin-inline: auto;
    }

    /*
    |--------------------------------------------------------------------------
    | Shared elements
    |--------------------------------------------------------------------------
    */

    .store-logo {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
    }

    .store-logo img {
        display: block;
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

    .header-search-form {
        display: flex;
        align-items: center;
        width: 100%;
        min-width: 0;
        height: 46px;
        overflow: hidden;
        border: 1px solid var(--header-border);
        border-radius: var(--header-radius);
        background: var(--header-soft-background);
        transition:
            border-color 0.2s ease,
            box-shadow 0.2s ease,
            background 0.2s ease;
    }

    .header-search-form:focus-within {
        border-color: var(--header-primary);
        background: var(--header-background);
        box-shadow: 0 0 0 3px color-mix(
            in srgb,
            var(--header-primary) 13%,
            transparent
        );
    }

    .header-search-input {
        flex: 1;
        min-width: 0;
        height: 100%;
        padding: 0 16px;
        color: var(--header-text);
        border: 0;
        outline: 0;
        background: transparent;
    }

    .header-search-input::placeholder {
        color: #9ca3af;
    }

    .header-search-submit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 100%;
        flex: 0 0 48px;
        color: var(--header-primary);
        cursor: pointer;
        background: transparent;
    }

    .header-search-submit:hover {
        background: rgba(0, 0, 0, 0.035);
    }

    .header-action {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        border: 1px solid var(--header-border);
        border-radius: 11px;
        background: var(--header-background);
        transition:
            border-color 0.2s ease,
            color 0.2s ease,
            background 0.2s ease;
    }

    .header-action:hover {
        color: var(--header-primary);
        border-color: var(--header-primary);
        background: #fff;
    }

    .header-action svg {
        max-width: 22px;
        max-height: 22px;
    }

    .header-cart-badge {
        position: absolute;
        top: -7px;
        left: -7px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
        border: 2px solid #fff;
        border-radius: 999px;
        background: var(--header-primary);
    }

    /*
    |--------------------------------------------------------------------------
    | Desktop header
    |--------------------------------------------------------------------------
    */

    .store-header-desktop {
        display: block;
        background: var(--header-background);
        border-bottom: 1px solid var(--header-border);
    }

    .desktop-header-top {
        display: grid;
        grid-template-columns: 190px minmax(300px, 1fr) auto;
        align-items: center;
        gap: 30px;
        min-height: 86px;
    }

    .desktop-store-logo {
        width: 180px;
        height: 60px;
    }

    .desktop-header-search {
        width: 100%;
        max-width: 720px;
        justify-self: center;
    }

    .desktop-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

    .header-phone {
        display: flex;
        align-items: center;
        gap: 10px;
        height: 42px;
        padding: 0 12px;
        color: var(--header-text);
        white-space: nowrap;
        border-radius: 10px;
    }

    .header-phone:hover {
        color: var(--header-primary);
        background: var(--header-soft-background);
    }

    .header-phone svg {
        color: var(--header-primary);
    }

    .desktop-header-bottom {
        border-top: 1px solid var(--header-border);
    }

    .desktop-header-bottom-inner {
        display: flex;
        align-items: center;
        gap: 30px;
        min-height: 54px;
    }

    .desktop-category-dropdown {
        position: relative;
        align-self: stretch;
        display: flex;
        align-items: center;
    }

    .desktop-category-button {
        display: flex;
        align-items: center;
        gap: 9px;
        height: 100%;
        padding: 0 15px;
        color: var(--header-text);
        font-weight: 700;
        cursor: pointer;
        background: transparent;
    }

    .desktop-category-button:hover,
    .desktop-category-dropdown.is-open .desktop-category-button {
        color: var(--header-primary);
    }

    .desktop-category-chevron {
        transition: transform 0.2s ease;
    }

    .desktop-category-dropdown.is-open
    .desktop-category-chevron {
        transform: rotate(180deg);
    }

    .desktop-category-panel {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        width: 290px;
        padding: 8px;
        visibility: hidden;
        opacity: 0;
        transform: translateY(8px);
        border: 1px solid var(--header-border);
        border-radius: 0 0 14px 14px;
        background: var(--header-background);
        box-shadow: var(--header-shadow);
        transition:
            opacity 0.18s ease,
            transform 0.18s ease,
            visibility 0.18s ease;
    }

    .desktop-category-dropdown:hover
    > .desktop-category-panel,
    .desktop-category-dropdown:focus-within
    > .desktop-category-panel,
    .desktop-category-dropdown.is-open
    > .desktop-category-panel {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .header-category-level {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .header-category-item {
        position: relative;
    }

    .header-category-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 42px;
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 9px;
    }

    .header-category-link:hover,
    .header-category-item:focus-within
    > .header-category-link {
        color: var(--header-primary);
        background: var(--header-soft-background);
    }

    .header-category-arrow {
        flex: 0 0 auto;
    }

    .header-category-submenu {
        position: absolute;
        z-index: 5;
        top: -8px;
        right: calc(100% - 2px);
        width: 270px;
        padding: 8px;
        visibility: hidden;
        opacity: 0;
        transform: translateX(-6px);
        border: 1px solid var(--header-border);
        border-radius: 12px;
        background: var(--header-background);
        box-shadow: var(--header-shadow);
        transition:
            opacity 0.18s ease,
            transform 0.18s ease,
            visibility 0.18s ease;
    }

    .header-category-item:hover
    > .header-category-submenu,
    .header-category-item:focus-within
    > .header-category-submenu {
        visibility: visible;
        opacity: 1;
        transform: translateX(0);
    }

    .desktop-nav-links {
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .desktop-nav-links a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
        padding: 0 13px;
        color: #4b5563;
        font-size: 14px;
        border-radius: 9px;
    }

    .desktop-nav-links a:hover {
        color: var(--header-primary);
        background: var(--header-soft-background);
    }

    /*
    |--------------------------------------------------------------------------
    | Mobile header
    |--------------------------------------------------------------------------
    */

    .store-header-mobile {
        display: none;
        background: var(--header-background);
        border-bottom: 1px solid var(--header-border);
    }

    .mobile-header-top {
        display: grid;
        grid-template-columns: 44px minmax(80px, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-height: 66px;
    }

    .mobile-menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        color: var(--header-text);
        cursor: pointer;
        border: 1px solid var(--header-border);
        border-radius: 11px;
        background: var(--header-background);
    }

    .mobile-menu-button:hover {
        color: var(--header-primary);
        border-color: var(--header-primary);
    }

    .mobile-store-logo {
        justify-self: start;
        width: 125px;
        height: 46px;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
    }

    .mobile-header-actions .header-action {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .mobile-header-search {
        padding-bottom: 12px;
    }

    .mobile-header-search .header-search-form {
        height: 44px;
    }

    /*
    |--------------------------------------------------------------------------
    | Mobile drawer
    |--------------------------------------------------------------------------
    */

    .mobile-drawer-overlay {
        position: fixed;
        z-index: 1100;
        inset: 0;
        visibility: hidden;
        opacity: 0;
        cursor: pointer;
        background: rgba(15, 23, 42, 0.52);
        backdrop-filter: blur(2px);
        transition:
            opacity 0.25s ease,
            visibility 0.25s ease;
    }

    .mobile-drawer-overlay.is-visible {
        visibility: visible;
        opacity: 1;
    }

    .mobile-drawer {
        position: fixed;
        z-index: 1110;
        top: 0;
        right: 0;
        width: min(88vw, 390px);
        height: 100dvh;
        display: flex;
        flex-direction: column;
        visibility: hidden;
        transform: translateX(105%);
        background: var(--header-background);
        box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
        transition:
            transform 0.28s ease,
            visibility 0.28s ease;
    }

    .mobile-drawer.is-open {
        visibility: visible;
        transform: translateX(0);
    }

    .mobile-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 66px;
        padding: 0 18px;
        border-bottom: 1px solid var(--header-border);
    }

    .mobile-drawer-title {
        margin: 0;
        font-size: 17px;
        font-weight: 800;
    }

    .mobile-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        color: var(--header-text);
        cursor: pointer;
        border-radius: 10px;
        background: var(--header-soft-background);
    }

    .mobile-drawer-close:hover {
        color: var(--header-primary);
    }

    .mobile-drawer-tabs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 12px 14px;
        border-bottom: 1px solid var(--header-border);
    }

    .mobile-drawer-tab {
        min-height: 42px;
        color: var(--header-muted);
        font-weight: 700;
        cursor: pointer;
        border-radius: 10px;
        background: var(--header-soft-background);
    }

    .mobile-drawer-tab.is-active {
        color: #fff;
        background: var(--header-primary);
    }

    .mobile-drawer-body {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 12px 14px 24px;
    }

    .mobile-drawer-pane {
        display: none;
    }

    .mobile-drawer-pane.is-active {
        display: block;
    }

    .mobile-category-back {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 44px;
        margin-bottom: 8px;
        padding: 8px 12px;
        color: var(--header-primary);
        font-weight: 700;
        text-align: right;
        cursor: pointer;
        border-radius: 10px;
        background: color-mix(
            in srgb,
            var(--header-primary) 8%,
            white
        );
    }

    .mobile-category-item {
        display: flex;
        align-items: stretch;
        min-height: 48px;
        margin-bottom: 4px;
        overflow: hidden;
        border: 1px solid var(--header-border);
        border-radius: 10px;
        background: #fff;
    }

    .mobile-category-link {
        display: flex;
        align-items: center;
        flex: 1;
        min-width: 0;
        padding: 10px 13px;
        font-size: 14px;
        font-weight: 600;
    }

    .mobile-category-link:hover {
        color: var(--header-primary);
        background: var(--header-soft-background);
    }

    .mobile-category-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        flex: 0 0 48px;
        color: var(--header-muted);
        cursor: pointer;
        border-right: 1px solid var(--header-border) !important;
        background: #fff;
    }

    .mobile-category-open:hover {
        color: var(--header-primary);
        background: var(--header-soft-background);
    }

    .mobile-drawer-link {
        display: flex;
        align-items: center;
        min-height: 48px;
        margin-bottom: 6px;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 600;
        border: 1px solid var(--header-border);
        border-radius: 10px;
        background: #fff;
    }

    .mobile-drawer-link:hover {
        color: var(--header-primary);
        border-color: var(--header-primary);
    }

    .mobile-drawer-phone {
        color: var(--header-primary) !important;
    }

    .mobile-empty-categories {
        padding: 24px 16px;
        color: var(--header-muted);
        text-align: center;
        border: 1px dashed var(--header-border);
        border-radius: 12px;
    }

    /*
    |--------------------------------------------------------------------------
    | Sticky state
    |--------------------------------------------------------------------------
    */

    .store-header.is-sticky {
        position: sticky;
        top: 0;
        box-shadow: var(--header-shadow);
    }

    /*
    |--------------------------------------------------------------------------
    | Responsive
    |--------------------------------------------------------------------------
    */

    @media (max-width: 991px) {
        .store-header-desktop {
            display: none;
        }

        .store-header-mobile {
            display: block;
        }

        .store-header-container {
            width: min(100% - 20px, var(--header-max-width));
        }
    }

    @media (min-width: 992px) {
        .mobile-drawer,
        .mobile-drawer-overlay {
            display: none;
        }
    }

    @media (max-width: 420px) {
        .mobile-header-top {
            grid-template-columns: 40px minmax(68px, 1fr) auto;
            gap: 5px;
        }

        .mobile-store-logo {
            width: 105px;
        }

        .mobile-header-actions {
            gap: 4px;
        }

        .mobile-header-actions .header-action {
            width: 35px;
            height: 35px;
            flex-basis: 35px;
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .store-header *,
        .store-header *::before,
        .store-header *::after {
            scroll-behavior: auto !important;
            transition-duration: 0.01ms !important;
            animation-duration: 0.01ms !important;
            animation-iteration-count: 1 !important;
        }
    }