/*
 * Header readability and brand mark refinement.
 * Loaded after the core bundle so it remains a small, safe deployment override.
 */
.store-header__main {
    min-height: 94px;
}

.store-brand {
    gap: 13px;
}

.store-brand__mark {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    border: 2px solid rgba(185, 30, 57, .72);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(147, 23, 46, .16);
}

.store-brand__mark i {
    color: #b91e39;
    font-size: 32px;
}

.store-brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
}

/* در هر خانه فقط یک رقم قابل مشاهده باشد؛ رقم فارسی روی ورودی خام نمایش داده می‌شود. */
.otp-cell .otp-digit {
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    caret-color: transparent !important;
}

.store-brand__copy {
    gap: 4px;
}

.store-brand__copy strong {
    font-size: 30px;
    line-height: 1.35;
    letter-spacing: -.25px;
}

.store-brand__copy small {
    font-size: 11px;
    line-height: 1.5;
}

.store-header__actions {
    gap: 11px;
}

.store-login,
.store-cart,
.store-account__trigger {
    min-height: 46px;
    padding-inline: 14px;
    gap: 9px;
    font-size: 13px;
}

.store-login > i,
.store-cart > i,
.store-account__trigger > i {
    font-size: 20px;
}

.store-account__trigger > i:last-child {
    font-size: 14px;
}

.store-nav__inner {
    min-height: 55px;
    gap: 20px;
}

.store-nav .dk-category-btn {
    min-height: 40px;
    padding-inline: 16px;
    font-size: 14px;
}

.store-nav__links {
    gap: 5px;
}

.store-nav__links a {
    padding: 9px 13px;
    font-size: 14px;
    line-height: 1.5;
}

/* Main navigation structure, active state, keyboard focus, and disclosures. */
.store-nav__links,
.store-nav .dk-mega-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.store-nav__links li {
    display: flex;
    flex: 0 0 auto;
}

.store-nav__links a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    box-sizing: border-box;
}

.store-nav__links a.is-active {
    font-weight: 700;
    box-shadow: inset 0 -2px 0 #bf2540;
}

.store-nav .dk-category-btn.is-active {
    background: #c12640;
    box-shadow: inset 0 -2px 0 rgba(255, 255, 255, .72);
}

.store-nav .dk-mega-menu {
    display: block;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.store-nav .dk-mega-menu[hidden],
.store-account__menu[hidden] {
    display: none !important;
}

.store-nav .dk-cat-wrapper.is-open .dk-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
}

.store-nav .dk-mega-list a {
    display: flex;
    align-items: center;
    min-height: 40px;
    text-decoration: none;
}

.store-nav .dk-mega-list a.is-active {
    color: #a51934;
    font-weight: 700;
    background: #fff0f2;
}

.store-nav .dk-mega-list__child a {
    position: relative;
    padding-right: 31px;
    color: #715c64;
}

.store-nav .dk-mega-list__child a::before {
    position: absolute;
    right: 16px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.store-header a:focus-visible,
.store-header button:focus-visible {
    outline: 3px solid #155eef;
    outline-offset: 3px;
}

.store-nav__links i {
    font-size: 16px;
}

.store-nav__support {
    font-size: 12px;
}

.store-nav__support i {
    font-size: 16px;
}

/* Checkout completion notice and the live cart quantity. */
.store-account__notice {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    gap: 7px;
    max-width: 235px;
    padding: 0 11px;
    border: 1px solid #f1c48c;
    border-radius: 10px;
    background: #fff9ed;
    color: #9a4d00 !important;
    font-size: 11px;
    line-height: 1.65;
    text-decoration: none !important;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.store-account__notice:hover {
    border-color: #df8a25;
    background: #fff2d9;
    color: #713700 !important;
    transform: translateY(-1px);
}

.store-account__notice i {
    flex: 0 0 auto;
    color: #d77a12;
    font-size: 17px;
}

.store-cart {
    position: relative;
}

.store-cart__count {
    position: absolute;
    inset-block-start: -9px;
    inset-inline-start: -8px;
    display: grid;
    place-items: center;
    min-width: 21px;
    height: 21px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #fff1e7;
    color: #a51e37;
    box-shadow: 0 4px 10px rgba(88, 22, 35, .18);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

@media (max-width: 900px) {
    .store-brand__copy strong {
        font-size: 17px;
    }

    .store-brand__mark {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .store-nav__links a {
        font-size: 13px;
    }

    .store-account__notice {
        max-width: 180px;
        padding-inline: 9px;
        font-size: 10px;
    }
}

@media (max-width: 680px) {
    .store-header__main {
        min-height: auto;
    }

    .store-brand__mark {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        border-radius: 13px;
    }

    .store-brand__mark i {
        font-size: 23px;
    }

    .store-brand__copy strong {
        font-size: 15px;
    }

    .store-brand__copy small {
        font-size: 10px;
    }

    .store-nav__links a {
        font-size: 12px;
        padding-inline: 10px;
    }

    .store-nav .dk-category-btn {
        font-size: 12px;
        padding-inline: 12px;
    }

    .store-nav__inner {
        align-items: stretch;
        gap: 8px;
    }

    .store-account__notice {
        width: 39px;
        min-height: 39px;
        justify-content: center;
        padding: 0;
        border-radius: 9px;
    }

    .store-account__notice span {
        display: none;
    }

    .store-account__notice i {
        margin: 0;
    }

    .store-nav .dk-cat-wrapper {
        flex: 0 0 auto;
    }

    .store-nav__links {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
    }

    .store-nav__links a {
        min-height: 40px;
        white-space: nowrap;
    }

    .store-nav .dk-mega-menu {
        width: min(300px, calc(100vw - 24px));
        max-height: calc(100vh - 24px);
        overflow-y: auto;
    }
}

/* Dropdowns must escape the header rows. Keep horizontal scrolling on the
   navigation links, not on ancestors that would clip account/category panels. */
.store-header {
    isolation: isolate;
    overflow: visible;
}
.store-header .store-header__main {
    position: relative;
    z-index: 3;
    overflow: visible;
}
.store-header .store-nav {
    position: relative;
    z-index: 2;
    overflow: visible;
}
.store-header .store-nav__inner { overflow: visible; }
.store-header__actions { position: relative; min-width: 0; }
.store-account { z-index: 5; min-width: 0; }
.store-account__trigger-name {
    max-width: 160px;
    overflow: hidden;
    font-size: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.store-account__notice span { min-width: 0; font-size: inherit; }
.store-account__trigger .fa-angle-down { transition: transform .18s ease; }
.store-account.is-open .store-account__trigger {
    border-color: #c5667c;
    background: #fff2f5;
    box-shadow: 0 0 0 3px rgba(165, 36, 70, .08);
}
.store-account.is-open .store-account__trigger .fa-angle-down { transform: rotate(180deg); }
.store-account .store-account__menu {
    box-sizing: border-box;
    top: calc(100% + 10px);
    right: auto;
    left: 0;
    z-index: 20;
    width: 320px;
    max-width: var(--account-menu-max-width, calc(100vw - 24px));
    max-height: var(--account-menu-max-height, calc(100vh - 150px));
    padding: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid #ead5dc;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(65, 23, 38, .2), 0 3px 10px rgba(65, 23, 38, .08);
    color: #4b2937;
    font: 500 13px/1.8 IRANSans, Tahoma, sans-serif;
    direction: rtl;
    text-align: right;
    transform: translateX(var(--account-menu-shift, 0px));
    /* Position corrections are immediate, including after rotation/resize. */
    transition: opacity .16s ease, visibility .16s ease;
    pointer-events: none;
    scrollbar-width: thin;
    scrollbar-color: #d5acb8 #fff7f8;
}
.store-account.is-open .store-account__menu {
    transform: translateX(var(--account-menu-shift, 0px));
    pointer-events: auto;
}
.store-account__menu *,
.store-account__menu *::before,
.store-account__menu *::after { box-sizing: border-box; }
.store-account__menu span { font-size: inherit; }
.store-account__summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 7px;
    padding: 14px 10px;
    border-radius: 12px;
    background: linear-gradient(120deg, #fff1ef, #fff7f8);
}
.store-account__menu .store-account__avatar {
    display: grid;
    place-items: center;
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    border: 1px solid #ebc7d1;
    border-radius: 14px;
    background: #fff;
    color: #a32546;
    font-size: 22px;
}
.store-account__identity { display: grid; flex: 1; min-width: 0; gap: 1px; }
.store-account__identity small { color: #9a6476; font-size: 11px; }
.store-account__identity strong { font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.store-account__identity bdi { justify-self: start; color: #896171; font-size: 12px; }
.store-account__close {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #96717d;
    background: transparent;
    font-size: 16px;
}
.store-account__close:hover { background: #fff; border-color: #ead5dc; color: #a32546; }
.store-account__links { display: grid; gap: 3px; }
.store-account__menu .store-account__links a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 46px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.8;
    font-weight: 600;
    white-space: normal;
}
.store-account__links a > span:not(.store-account__link-icon) { min-width: 0; overflow-wrap: anywhere; }
.store-account__menu .store-account__link-icon {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    height: 32px;
    border-radius: 10px;
    color: #a03957;
    background: #fff4f5;
    font-size: 16px;
}
.store-account__chevron { margin-inline-start: auto; color: #b99aa5; flex-shrink: 0; }
.store-account__menu .store-account__links a:hover,
.store-account__menu .store-account__links a[aria-current="page"] {
    color: #921d3e !important;
    background: #fff0f3;
}
.store-account__menu .store-account__cart-badge {
    margin-inline-start: auto;
    padding: 1px 8px;
    border-radius: 8px;
    color: #921d3e;
    background: #fce4ea;
    font-size: 11px;
}
.store-account__menu a.store-account__completion {
    gap: 8px;
    margin-bottom: 7px;
    padding: 10px;
    border: 1px solid #f1dbb6;
    border-radius: 11px;
    background: #fff9ef;
    color: #92581f !important;
    font-size: 12px;
    line-height: 1.8;
}
.store-account__completion span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.store-account__logout-form { margin-top: 8px; padding-top: 7px; border-top: 1px solid #f0e3e7; }
.store-account__logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #b12e49;
    font: 600 13px/1.8 IRANSans, Tahoma, sans-serif;
    text-align: right;
}
.store-account__logout i { width: 32px; font-size: 18px; text-align: center; }
.store-account__logout:hover { background: #fff1f4; }
.store-account__menu a:focus-visible,
.store-account__menu button:focus-visible { outline-offset: -3px; }
@media (max-width: 680px) {
    .store-account__trigger { width: 44px; min-width: 44px; min-height: 44px; padding: 0; }
    .store-account__trigger .fa-angle-down { display: none; }
    .store-account__trigger .fa-user-circle-o { font-size: 21px; }
    .store-account .store-account__menu { border-radius: 16px; }
    .store-account__close { flex-basis: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .store-account__trigger .fa-angle-down,
    .store-account .store-account__menu { transition: none; }
}
