/* =========================================================
   TNTBook Amazon Header v2.4 - FINAL
   ========================================================= */

/* خنثی‌سازی کامل تمام استایل‌های قدیمی هدر */
#tnt-amz-header-v2 .tnt-cart-count,
#tnt-amz-header-v2 .tnt-amz-cart-count,
.tnt-amz-cart-count:not(#tnt-amz-header-v2 *) {
    display: none !important;
}

#tnt-amz-header-v2,
#tnt-amz-header-v2 * { box-sizing: border-box !important; }

#tnt-amz-header-v2 {
    background: #131921 !important;
    color: #ffffff !important;
    direction: rtl !important;
    width: 100% !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9998 !important;
    font-family: Vazirmatn, sans-serif !important;
}

#tnt-amz-header-v2 a {
    color: #ffffff !important;
    text-decoration: none !important;
}
#tnt-amz-header-v2 .tnt-hd__top    { background: #131921 !important; }
#tnt-amz-header-v2 .tnt-hd__bottom { background: #232f3e !important; }

#tnt-amz-header-v2 .tnt-hd__top-inner,
#tnt-amz-header-v2 .tnt-hd__nav-inner,
#tnt-amz-header-v2 .tnt-hd__mobile-nav-inner,
#tnt-amz-header-v2 .tnt-hd__drawer-inner {
    max-width: 1500px !important;
    margin: 0 auto !important;
    padding: 0 14px !important;
}

#tnt-amz-header-v2 .tnt-hd__hover {
    border: 1px solid transparent !important;
    border-radius: 2px !important;
    transition: border-color 0.15s ease !important;
}
#tnt-amz-header-v2 .tnt-hd__hover:hover,
#tnt-amz-header-v2 .tnt-hd__hover:focus-visible {
    border-color: #ffffff !important;
}

/* =========================  Desktop  ========================= */
#tnt-amz-header-v2 .tnt-hd__top-inner {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-height: 60px !important;
}

#tnt-amz-header-v2 .tnt-hd__burger { display: none !important; }

#tnt-amz-header-v2 .tnt-hd__logo-link {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    flex: 0 0 auto !important;
    line-height: 1 !important;
}

/* لوگو لاتین: لیمویی، بولد، بدون italic */
#tnt-amz-header-v2 .tnt-hd__logo-text {
    font-family: 'Amazon Ember', 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    font-style: normal !important;
    line-height: 1 !important;
    letter-spacing: -0.5px !important;
    color: #FF9900 !important;
}

/* لوگو فارسی: سفید، بولد */
#tnt-amz-header-v2 .tnt-hd__logo-fa {
    font-family: Vazirmatn, sans-serif !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #ffffff !important;
    margin-top: 4px !important;
    letter-spacing: 0.3px !important;
}

#tnt-amz-header-v2 .tnt-hd__deliver {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    padding: 6px 8px !important;
    flex: 0 0 auto !important;
}

#tnt-amz-header-v2 .tnt-hd__deliver:hover {
    border-color: transparent !important;
    background: transparent !important;
    cursor: default !important;
}

#tnt-amz-header-v2 .tnt-hd__deliver svg {
    width: 18px !important; height: 18px !important;
    flex: 0 0 18px !important; margin-top: 8px !important;
}
#tnt-amz-header-v2 .tnt-hd__sub {
    display: block !important;
    font-size: 12px !important;
    line-height: 1.1 !important;
    color: #cccccc !important;
    white-space: nowrap !important;
}
#tnt-amz-header-v2 .tnt-hd__strong {
    display: block !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
}

/* جستجو */
#tnt-amz-header-v2 .tnt-hd__search-wrap {
    flex: 1 1 auto !important;
    margin: 0 6px !important;
    max-width: none !important;
}
#tnt-amz-header-v2 .tnt-hd__search-form {
    display: flex !important;
    align-items: stretch !important;
    width: 100% !important;
    height: 40px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    overflow: visible !important;
    position: relative !important;
    box-shadow: none !important;
}
#tnt-amz-header-v2 .tnt-hd__search-form:focus-within {
    box-shadow: 0 0 0 3px #ff9900 !important;
}
#tnt-amz-header-v2 .tnt-hd__search-cat {
    display: block !important;
    width: 130px !important; min-width: 130px !important; max-width: 130px !important;
    border: none !important;
    border-left: 1px solid #adb1b8 !important;
    border-radius: 8px 0 0 8px !important;
    background: #d5d9d9 !important;
    color: #0F1111 !important;
    font-size: 13px !important; font-weight: 700 !important;
    padding: 0 10px 0 26px !important;
    appearance: none !important; -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23131921' stroke-width='2.8'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: 8px center !important;
    background-size: 12px !important;
    cursor: pointer !important;
    outline: none !important;
    height: 100% !important;
}
#tnt-amz-header-v2 .tnt-hd__search-input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    border: none !important;
    background: #ffffff !important;
    color: #111111 !important;
    font-size: 14px !important;
    padding: 0 12px !important;
    outline: none !important;
    height: 100% !important;
}
#tnt-amz-header-v2 .tnt-hd__search-input::placeholder { color: #777777 !important; }
#tnt-amz-header-v2 .tnt-hd__search-btn {
    width: 55px !important; min-width: 55px !important;
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    background: #febd69 !important;
    color: #131921 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    height: 100% !important;
}
#tnt-amz-header-v2 .tnt-hd__search-btn:hover { background: #f3a847 !important; }
#tnt-amz-header-v2 .tnt-hd__search-btn svg {
    width: 24px !important; height: 24px !important;
    stroke: #131921 !important;
}

/* حساب کاربری دسکتاپ: آدمک بالا + متن زیر */
#tnt-amz-header-v2 .tnt-hd__account {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 4px 10px !important;
    flex: 0 0 auto !important;
    line-height: 1 !important;
}
#tnt-amz-header-v2 .tnt-hd__account-icon {
    display: inline-flex !important;
    color: #ffffff !important;
}
#tnt-amz-header-v2 .tnt-hd__account-icon svg {
    width: 24px !important; height: 24px !important;
    stroke: #ffffff !important;
    stroke-width: 2.5 !important;
}
#tnt-amz-header-v2 .tnt-hd__account-text {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-top: 3px !important;
    white-space: nowrap !important;
    line-height: 1 !important;
}

#tnt-amz-header-v2 .tnt-hd__orders {
    display: inline-flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    padding: 6px 8px !important;
    flex: 0 0 auto !important;
}
#tnt-amz-header-v2 .tnt-hd__signin { display: none !important; }

/* ═════════════════════════════════════════
   ✅ سبد آمازونی - طولی، خط سفید، عدد لیمویی
   ═════════════════════════════════════════ */
#tnt-amz-header-v2 .tnt-hd__cart {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 6px 10px !important;
    flex: 0 0 auto !important;
    background: transparent !important;
}
#tnt-amz-header-v2 .tnt-hd__cart-wrap {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 44px !important;
    background: transparent !important;
    overflow: visible !important;
}
#tnt-amz-header-v2 .tnt-hd__cart-wrap svg {
    width: 50px !important;
    height: 44px !important;
    display: block !important;
}
/* عدد روی بدنه سبد */
#tnt-amz-header-v2 .tnt-hd__cart-wrap .tnt-hd__cart-count,
#tnt-amz-header-v2 span.tnt-hd__cart-count {
    position: absolute !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    width: 100% !important;
    height: auto !important;
    min-width: auto !important;
    max-width: none !important;
    text-align: center !important;
    color: #FFD814 !important;
    font-family: Vazirmatn, sans-serif !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    pointer-events: none !important;
    z-index: 5 !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
#tnt-amz-header-v2 .tnt-hd__cart-label {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1.1 !important;
    gap: 1px !important;
}
#tnt-amz-header-v2 .tnt-hd__cart-label-1,
#tnt-amz-header-v2 .tnt-hd__cart-label-2 {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}
#tnt-amz-header-v2 .tnt-hd__cart-label-2 { font-size: 12px !important; }

/* نوار دوم */
#tnt-amz-header-v2 .tnt-hd__nav-inner {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    min-height: 40px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
}
#tnt-amz-header-v2 .tnt-hd__nav-inner::-webkit-scrollbar { display: none !important; }
#tnt-amz-header-v2 .tnt-hd__nav-link {
    display: inline-flex !important;
    align-items: center !important;
    padding: 7px 9px !important;
    white-space: nowrap !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
}
#tnt-amz-header-v2 .tnt-hd__nav-link--sale { font-weight: 700 !important; }

#tnt-amz-header-v2 .tnt-hd__mobile-nav,
#tnt-amz-header-v2 .tnt-hd__drawer { display: none !important; }

/* sticky shadow */
#tnt-amz-header-v2.tnt-scrolled { box-shadow: 0 2px 8px rgba(0,0,0,.35) !important; }

/* =========================  MOBILE  ========================= */
@media (max-width: 768px) {
    #tnt-amz-header-v2 .tnt-hd__top-inner {
        display: grid !important;
        grid-template-columns: auto 1fr auto auto auto !important;
        grid-template-areas:
            "burger logo deliver signin cart"
            "search search search search search" !important;
        align-items: center !important;
        gap: 4px 6px !important;
        padding: 6px 10px !important;
        min-height: auto !important;
    }

    #tnt-amz-header-v2 .tnt-hd__burger {
        grid-area: burger !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 36px !important; height: 36px !important;
        padding: 0 !important;
        background: transparent !important;
        color: #ffffff !important;
        border: 1px solid transparent !important;
        border-radius: 2px !important;
        cursor: pointer !important;
    }
    #tnt-amz-header-v2 .tnt-hd__burger svg {
        width: 24px !important; height: 24px !important;
    }

    /* ✅ لوگو موبایل: لاتین لیمویی + فارسی سفید زیر */
    #tnt-amz-header-v2 .tnt-hd__logo-link {
        grid-area: logo !important;
        padding: 2px 4px !important;
        justify-self: start !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    #tnt-amz-header-v2 .tnt-hd__logo-text {
        font-size: 19px !important;
        color: #FF9900 !important;
        font-weight: 700 !important;
        font-style: normal !important;
    }
    #tnt-amz-header-v2 .tnt-hd__logo-fa {
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        margin-top: 2px !important;
    }

    #tnt-amz-header-v2 .tnt-hd__deliver {
        grid-area: deliver !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 3px !important;
        padding: 2px 4px !important;
        max-width: 90px !important;
        overflow: hidden !important;
    }
    #tnt-amz-header-v2 .tnt-hd__deliver svg {
        width: 12px !important; height: 12px !important;
        flex: 0 0 12px !important; margin-top: 0 !important;
    }
    #tnt-amz-header-v2 .tnt-hd__deliver .tnt-hd__sub    { font-size: 8px !important; }
    #tnt-amz-header-v2 .tnt-hd__deliver .tnt-hd__strong { font-size: 10px !important; }

    #tnt-amz-header-v2 .tnt-hd__account,
    #tnt-amz-header-v2 .tnt-hd__orders { display: none !important; }

    /* ✅ ورود موبایل: آدمک بالا + کلمه "ورود" زیر */
    #tnt-amz-header-v2 .tnt-hd__signin {
        grid-area: signin !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 2px 4px !important;
        line-height: 1 !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
    }
    #tnt-amz-header-v2 .tnt-hd__signin svg {
        width: 22px !important; height: 22px !important;
        stroke-width: 2.5 !important;
        stroke: #ffffff !important;
        margin-bottom: 2px !important;
    }
    #tnt-amz-header-v2 .tnt-hd__signin::after {
        content: 'ورود' !important;
        font-size: 10px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
    }

    /* ✅ سبد موبایل - مثل دسکتاپ، خط سفید، عدد لیمویی */
    #tnt-amz-header-v2 .tnt-hd__cart {
        grid-area: cart !important;
        justify-self: end !important;
        padding: 2px 4px !important;
        display: inline-flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    #tnt-amz-header-v2 .tnt-hd__cart-wrap {
        width: 38px !important;
        height: 36px !important;
    }
    #tnt-amz-header-v2 .tnt-hd__cart-wrap svg {
        width: 38px !important;
        height: 36px !important;
    }
    #tnt-amz-header-v2 .tnt-hd__cart-wrap .tnt-hd__cart-count,
    #tnt-amz-header-v2 span.tnt-hd__cart-count {
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 11px !important;
        color: #FFD814 !important;
    }
    #tnt-amz-header-v2 .tnt-hd__cart-label { display: none !important; }

    /* جستجو ردیف دوم */
    #tnt-amz-header-v2 .tnt-hd__search-wrap {
        grid-area: search !important;
        margin: 0 !important;
        width: 100% !important;
    }
    #tnt-amz-header-v2 .tnt-hd__search-form {
        height: 42px !important;
        border-radius: 6px !important;
    }
    #tnt-amz-header-v2 .tnt-hd__search-cat { display: none !important; }
    #tnt-amz-header-v2 .tnt-hd__search-input { font-size: 14px !important; }
    #tnt-amz-header-v2 .tnt-hd__search-btn { width: 50px !important; min-width: 50px !important; }
    #tnt-amz-header-v2 .tnt-hd__search-btn svg { width: 22px !important; height: 22px !important; }

    #tnt-amz-header-v2 .tnt-hd__nav-inner { display: none !important; }

    #tnt-amz-header-v2 .tnt-hd__mobile-nav {
        display: block !important;
        background: #232f3e !important;
    }
    #tnt-amz-header-v2 .tnt-hd__mobile-nav-inner {
        display: flex !important;
        align-items: center !important;
        gap: 14px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        scrollbar-width: none !important;
        min-height: 36px !important;
        padding: 6px 14px !important;
    }
    #tnt-amz-header-v2 .tnt-hd__mobile-nav-inner::-webkit-scrollbar { display: none !important; }
    #tnt-amz-header-v2 .tnt-hd__mobile-nav-link {
        display: inline-flex !important;
        align-items: center !important;
        white-space: nowrap !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
        color: #ffffff !important;
    }

    #tnt-amz-header-v2 .tnt-hd__drawer {
        display: none !important;
        background: #ffffff !important;
        color: #111111 !important;
        border-top: 1px solid #d5d9d9 !important;
        box-shadow: 0 6px 18px rgba(0,0,0,0.14) !important;
    }
    #tnt-amz-header-v2 .tnt-hd__drawer.is-open { display: block !important; }
    #tnt-amz-header-v2 .tnt-hd__drawer-inner { padding-top: 12px !important; padding-bottom: 14px !important; }
    #tnt-amz-header-v2 .tnt-hd__drawer-title {
        color: #111111 !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        margin: 0 0 10px !important;
    }
    #tnt-amz-header-v2 .tnt-hd__drawer-list {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #tnt-amz-header-v2 .tnt-hd__drawer-list li + li { border-top: 1px solid #eaeded !important; }
    #tnt-amz-header-v2 .tnt-hd__drawer-list a {
        display: block !important;
        color: #111111 !important;
        padding: 12px 0 !important;
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
}

/* =========================================================
   FIX 1: Skip to content - مخفی ولی برای screen reader فعال
   ========================================================= */
.skip-link,
a.skip-link,
.screen-reader-text {
    position: absolute !important;
    right: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* فقط با Tab key قابل دیدن (استاندارد دسترسی‌پذیری) */
.skip-link:focus,
a.skip-link:focus,
.screen-reader-text:focus {
    position: fixed !important;
    left: 50% !important;
    top: 10px !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    background: #FFD814 !important;
    color: #131921 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    z-index: 999999 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* =========================================================
   FIX 2: ذره‌بین دکمه جستجو - تضمین نمایش
   ========================================================= */
#tnt-amz-header-v2 .tnt-hd__search-btn {
    position: relative !important;
}

#tnt-amz-header-v2 .tnt-hd__search-btn svg {
    width: 24px !important;
    height: 24px !important;
    display: block !important;
    stroke: #131921 !important;
    fill: none !important;
    stroke-width: 2.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#tnt-amz-header-v2 .tnt-hd__search-btn svg * {
    stroke: #131921 !important;
}

#tnt-amz-header-v2 .tnt-hd__search-btn svg circle,
#tnt-amz-header-v2 .tnt-hd__search-btn svg line {
    stroke: #131921 !important;
    fill: none !important;
}

@media (max-width: 768px) {
    #tnt-amz-header-v2 .tnt-hd__search-btn svg {
        width: 22px !important;
        height: 22px !important;
    }
}

/* =========================================================
   FIX 3 (FORCE): Skip to content - مخفی با selector دقیق
   ========================================================= */
body .skip-link,
body a.skip-link,
body .skip-link.screen-reader-text,
body a.skip-link.screen-reader-text,
.site .skip-link,
#page .skip-link {
    position: absolute !important;
    right: -10000px !important;
    top: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    padding: 0 !important;
    margin: -1px !important;
}

/* فقط با Tab key نمایش (دسترسی‌پذیری) */
body .skip-link:focus,
body a.skip-link:focus,
.site .skip-link:focus {
    position: fixed !important;
    left: 50% !important;
    top: 10px !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    background: #FFD814 !important;
    color: #131921 !important;
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    z-index: 999999 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    margin: 0 !important;
}

/* =========================================================
   FIX 4 (FORCE): ذره‌بین جستجو - با priority حداکثر
   ========================================================= */
body #tnt-amz-header-v2 .tnt-hd__search-btn svg,
html body #tnt-amz-header-v2 .tnt-hd__search-btn svg,
#tnt-amz-header-v2 button.tnt-hd__search-btn svg {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    stroke: #131921 !important;
    fill: none !important;
}

body #tnt-amz-header-v2 .tnt-hd__search-btn svg circle,
body #tnt-amz-header-v2 .tnt-hd__search-btn svg line {
    stroke: #131921 !important;
    fill: none !important;
    stroke-width: 2.8 !important;
}

@media (max-width: 768px) {
    body #tnt-amz-header-v2 .tnt-hd__search-btn svg {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
    }
}

/* =========================================================
   تنظیم دقیق عدد سبد: روی خط بالای فرضی و وسط خط پایینی
   ========================================================= */
#tnt-amz-header-v2 .tnt-hd__cart-wrap .tnt-hd__cart-count,
#tnt-amz-header-v2 span.tnt-hd__cart-count {
    width: auto !important;
    right: auto !important;
    left: 56.6% !important; /* مرکز خط پایین سبد بر اساس مختصات SVG */
    top: 32% !important; /* ارتفاع دقیق خط بالای فرضی */
    transform: translate(-50%, -50%) !important; /* مرکز کردن خود عدد روی این نقطه */
    padding: 0 !important;
    margin: 0 !important;
    color: #FF9900 !important; /* رنگ اختصاصی شما */
    font-size: 16px !important;
}

/* 📱 تنظیمات متناسب برای موبایل */
@media (max-width: 768px) {
    #tnt-amz-header-v2 .tnt-hd__cart-wrap .tnt-hd__cart-count,
    #tnt-amz-header-v2 span.tnt-hd__cart-count {
        font-size: 14px !important;
    }
}

/* =========================================================
   اصلاح رنگ دکمه جستجو به نارنجی برند
   ========================================================= */
#tnt-amz-header-v2 .tnt-hd__search-btn {
    background: #FF9900 !important;
}
#tnt-amz-header-v2 .tnt-hd__search-btn:hover {
    background: #e68a00 !important; /* کمی تیره‌تر برای زمانی که موس روی آن می‌رود */
}

/* =========================================================
   منوی کشویی حساب کاربری (Hover Menu)
   ========================================================= */
#tnt-amz-header-v2 .tnt-hd__account-wrap {
    position: relative !important;
    display: inline-flex !important;
}

#tnt-amz-header-v2 .tnt-hd__account-dropdown {
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #ffffff !important;
    min-width: 170px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15) !important;
    padding: 8px 0 !important;
    display: none !important; /* مخفی در حالت عادی */
    z-index: 99999 !important;
    border: 1px solid #d5d9d9 !important;
    margin-top: 4px !important;
}

/* فلش کوچک بالای منو */
#tnt-amz-header-v2 .tnt-hd__account-dropdown::before {
    content: '' !important;
    position: absolute !important;
    top: -6px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(45deg) !important;
    width: 10px !important;
    height: 10px !important;
    background: #ffffff !important;
    border-top: 1px solid #d5d9d9 !important;
    border-left: 1px solid #d5d9d9 !important;
}

/* نمایش منو با رفتن موس (Hover) */
#tnt-amz-header-v2 .tnt-hd__account-wrap:hover .tnt-hd__account-dropdown {
    display: block !important;
}

#tnt-amz-header-v2 .tnt-hd__dropdown-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

#tnt-amz-header-v2 .tnt-hd__dropdown-list a {
    display: block !important;
    padding: 10px 16px !important;
    color: #111111 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
}

#tnt-amz-header-v2 .tnt-hd__dropdown-list a:hover {
    background: #f2f2f2 !important;
    color: #e47911 !important;
}

/* خط جداکننده دکمه خروج */
#tnt-amz-header-v2 .tnt-hd__dropdown-list li.tnt-logout {
    border-top: 1px solid #eeeeee !important;
    margin-top: 4px !important;
    padding-top: 4px !important;
}

/* اصلاح متن کوپن و حفظ فلش در سبد خرید بلوکی */
/* مخفی کردن متن پیش‌فرض ووکامرس */
.wc-block-components-panel__button {
    font-size: 0 !important; 
}

/* نمایش متن جایگزین به همراه یک فاصله در انتها برای جلوگیری از چسبیدن حروف */
.wc-block-components-panel__button::before {
    content: "اضافه کردن کوپن تخفیف "; 
    font-size: 15px !important;
    vertical-align: middle;
}

/* برگرداندن سایز و نمایش آیکون فلش (در صورت وجود) */
.wc-block-components-panel__button svg {
    font-size: 16px !important;
    vertical-align: middle;
    margin-left: 8px;
}

/* اصلاح جایگاه دکمه‌های مثبت و منفی در سبد خرید بلوکی */
.wc-block-components-quantity-selector {
    flex-direction: row-reverse !important;
}
.wc-block-components-quantity-selector input {
    text-align: center !important;
}

/* مخفی کردن تگ کوپن پیش‌فرض ووکامرس در بخش تخفیف‌ها */
.wc-block-components-totals-discount__coupon-list {
    display: none !important;
}

/* =========================================================
   FORCE FIX: فرم کوپن تخفیف سبد خرید (نسخه فوق‌تهاجمی)
   ========================================================= */
body .woocommerce-cart .wc-block-components-totals-coupon__content {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
}

/* دکمه اعمال کردن */
body .woocommerce-cart .wc-block-components-totals-coupon__content button[type="submit"] {
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    line-height: 42px !important;
    font-size: 13px !important;
    margin: 0 !important;
    border-radius: 6px !important;
    flex: 0 0 auto !important; /* جلوگیری از کش آمدن */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* کادر اصلی و فیک کوپن */
body .woocommerce-cart .tnt-fake-input-wrapper,
body .woocommerce-cart .wc-block-components-totals-coupon__content .wc-block-components-text-input {
    flex: 1 1 auto !important;
    margin: 0 !important;
    height: 42px !important;
}

body .woocommerce-cart .tnt-fake-input-wrapper input {
    height: 42px !important;
    min-height: 42px !important;
    line-height: 42px !important;
    padding: 0 35px 0 10px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* ضربدر قرمز */
body .woocommerce-cart .tnt-fake-input-wrapper .tnt-remove-custom-coupon {
    height: 42px !important; /* هم‌ارتفاع باکس برای تراز دقیق */
    width: 30px !important;
    top: 0 !important;
    transform: none !important; /* خنثی‌سازی استایل‌های مزاحم قبلی */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 0 !important;
    padding-bottom: 2px !important; /* تنظیم میلی‌متری مرکز */
}
