/* ========== هدر full-width با پس‌زمینه تیره ========== */
.site-header {
    background: #051927;
    width: 100% !important;
    max-width: 100% !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(117, 219, 134, 0.2);
    padding-top: 0px !important;
    padding-bottom: 0px !important;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 13px 0;
    gap: 1rem;
    box-sizing: border-box;
    width: 1400px;
    margin: auto;
}

/* ===== سمت راست: همبرگر + لوگو ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.close-mob {
    position: absolute;
    left: 10px;
    top: 30px;
    color: #75db86;
    font-size: 25px;
    cursor: pointer;
}

.menu-toggle {
    font-size: 30px;
    color: #75db86;
    cursor: pointer;
}

/* لوگو */
.header-logo img {
    max-height: 65px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 1.4rem;
    font-weight: bold;
    text-decoration: none;
    color: #fff;
}

/* ===== سمت چپ: شماره تلفن با رنگ #75db86 ===== */
.header-left .phone-btn {
    display: flex;
    align-items: center;
    gap: 40px;
    color: #75db86;
    /* رنگ متن شماره */
    transition: all 0.2s;
}

.header-left {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 20px;
}
.fa-user {
  color: #75db86;
  font-size: 20px;
  margin-top: 5px;
}

.cart-icon{
    color: #75db86;
font-size: 20px;
margin-top: 8px;
}

.header-left svg {
    width: 25px;
    height: 25px;
    stroke: #75db86;
    /* رنگ آیکون */
}

/* ===== منوی کشویی (سایدبار راست) ===== */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: #051927;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 1001;
    padding-top: 80px;
    overflow-y: auto;
    border-left: 1px solid rgba(117, 219, 134, 0.3);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-inner {
    padding: 1rem;
}

.mobile-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    border-bottom: 1px solid rgba(117, 219, 134, 0.2);
}

.mobile-menu a {
    display: block;
    padding: 1rem;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: background 0.2s;
}

.mobile-menu a:hover {
    background: rgba(117, 219, 134, 0.1);
    color: #75db86;
}

/* زیرمنو */
.mobile-menu .sub-menu {
    list-style: none;
    padding-right: 1rem;
    display: none;
}

.mobile-menu li.menu-item-has-children>a::after {
    content: "▼";
    float: left;
    font-size: 0.7rem;
    color: #75db86;
}

.mobile-menu li:hover>.sub-menu {
    display: block;
}

/* ===== Div زیر هدر ===== */
.header-notice {
    background: rgba(5, 25, 39, 0.9);
    color: #75db86;
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 400;
    border-top: 1px solid rgba(117, 219, 134, 0.2);
    border-bottom: 1px solid rgba(117, 219, 134, 0.2);
}

.header-notice p {
    margin: 0;
}

@media (max-width: 1400px) {


    .header-container {
        padding-left: 20px;
        padding-right: 20px;
    }


    .phone-btn {
        margin-left: 0px;
    }

}

/* ===== واکنش‌گرایی (موبایل) ===== */
@media (max-width: 768px) {
    .header-container {
        padding: 0.6rem 1rem;
    }

    .header-left .phone-btn span {
        display: none;
    }

    .header-left .phone-btn {
        padding: 0.5rem;
        border-radius: 50%;
        background: transparent;
    }

    .header-left svg {
        margin: 0;
    }

    .header-notice {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }

    .site-title {
        font-size: 1.2rem;
    }
}

/* قفل بدنه هنگام باز بودن منو */
body.menu-open {
    overflow: hidden;
}

/* ========== منوی کاربری (آیکون کاربر) - رفع اورفلو ========== */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.user-icon {
    font-size: 22px;
    color: #75db86;
    transition: color 0.2s;
}

.user-menu-wrapper:hover .user-icon {
    color: #a5e6b3;
}

.user-dropdown {
    position: absolute;
    top: 125%;
    /* برای RTL: منو به سمت راست آیکون (چپ صفحه) ظاهر شود */
    right: auto;
    left: 0;
    background: #051927;
    border: 1px solid rgba(117, 219, 134, 0.3);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 140px;
    max-width: 90vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
    z-index: 1020;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    white-space: nowrap;
    text-align: center;
}

/* اگر در سمت راست صفحه فضای کافی نبود، به چپ منتقل شود */
@media (max-width: 350px) {
    .user-dropdown {
        left: auto;
        right: 0;
        min-width: 110px;
    }
}

.user-menu-wrapper:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
}

.user-dropdown a,
.user-dropdown .user-greeting {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
    text-align: center;
    white-space: nowrap;
}

.user-greeting {
    border-bottom: 1px solid rgba(117, 219, 134, 0.2);
    margin-bottom: 4px;
    color: #75db86 !important;
    cursor: default;
    font-weight: 600;
}

.user-dropdown a:hover {
    background: rgba(117, 219, 134, 0.15);
    color: #75db86;
}

/* برای موبایل: متن می‌تواند دو خط شود */
@media (max-width: 480px) {
    .user-dropdown a,
    .user-dropdown .user-greeting {
        padding: 8px 12px;
        font-size: 13px;
        white-space: normal;
        word-break: keep-all;
    }
}

/* ظاهر آیتم سبد خرید */
.cart-icon-wrapper {
    position: relative; /* برای قرارگیری دقیق بج در کنار آیکون */
    display: inline-block;
}

/* استایل بج تعداد */
.cart-items-count, .cart-count {
    position: absolute;
    top: -3px;
    right: -10px;
    background-color: #ccbc9a;
    color: #051927;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}