   /* --- استایل هدر --- */
.main-header {
    background-color: #fff;
/*
    position: sticky;
    top: 0;
    z-index: 1000;
 */
    width: 100%; /* هدر کل عرض صفحه را می‌پوشاند */
}

.header-container {
    max-width: 1280px; /* محدود کردن عرض محتوا */
    margin: 0 auto;    /* وسط‌چین کردن */
    padding: 15px 20px; /* فاصله داخلی */
    display: flex;
    justify-content: space-between;
    align-items: center;
}


.wp-logo { font-size: 24px; font-weight: bold; color: #ff4b2b; }
.wp-logo a{
	font-size:27px;
	color:#257CE7;
}

.wp-nav-menu ul {
    display: flex;
    list-style: none;
    gap: 20px;
}
.wp-nav-menu li a{
   color:#696969;
}

/* برای موبایل */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
}


.wp-nav-menu ul { display: flex; list-style: none; gap: 20px; }
.wp-nav-menu ul li a:hover { color: #ff4b2b; }

/* ظرف کلی جستجو */
.search-wrapper {
    
    display: flex;
    justify-content: center;
    margin: 0 30px;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f0f2f5;
    border-radius: 5px;
    padding: 5px 15px;
    margin: 0 15px;
}

.search-box input {
    border: none;
    background: transparent;
    outline: none;
    padding: 5px;
    font-family: Vazir, Tahoma, "DejaVu Sans", helvetica, arial, freesans, sans-serif;
    font-size: 13px;
    width: 150px;
    transition: width 0.3s;
}

.search-box input:focus {
    width: 160px; /* وقتی کاربر روی سرچ کلیک میکنه بزرگتر میشه */
}

.search-box button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}



.header-left {
    display: flex;
    align-items: center;
    gap: 20px; /* فاصله بین سبد خرید و دکمه‌های ورود */
}

.cart-wrapper {
    position: relative;
}

.cart-btn {
    font-size: 24px;
    display: flex;
    align-items: center;
    color: #333;
    transition: 0.3s;
}

.cart-btn:hover {
    color: #ff4b2b;
}

/* دایره قرمز تعداد محصولات */
.cart-count {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: #ff4b2b;
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff; /* ایجاد لایه محافظ دور دایره برای زیبایی */
}

/* هماهنگی دکمه‌های ورود با ساختار جدید */
.auth-buttons {
    display: flex;
    gap: 10px;
}



/* استایل مشترک دکمه‌ها */
.auth-buttons a {
    padding: 8px 20px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* دکمه ورود (Border-only) */
.btn-login {
    color: #ff4b2b;
    border: 2px solid #ff4b2b;
}

.btn-login:hover {
    background-color: #ff4b2b;
    color: #fff;
}

/* دکمه ثبت‌نام (Filled) */
.btn-register {
    background-color: #fdeed8;
    color: #f78f01;
    border: 0px solid #ff4b2b;
}

.btn-register:hover {
    background-color: #ff4b2b;
color: #fff;
    border-color: #e03e1f;
}


/* اصلاح برای موبایل */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .auth-buttons {
        margin-top: 10px;
    }
}









         :root {
    --auth-primary: #2563eb;
    --auth-bg: #f8fafc;
    --auth-text: #334155;
    --auth-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.header-auth {
    display: flex;
    align-items: center;
    direction: rtl; /* تنظیم راست‌چین */
}

/* دکمه ورود */
.login-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #fdeed8;
    color: #f78f01;
    border: 0px solid #ff4b2b;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
   
}

.login-btn:hover {
    transform: translateY(-2px);
   
}

/* کانتینر پروفایل */
.user-profile-wrapper {
    position: relative;
    display: inline-block;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 8px;
    background: #f0f9ff;
    border: 1px solid #e0f2fe;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-trigger:hover {
     background: #dcecf7; 

}

.user-name {
    font-size: 13.5px;
    font-weight: 600;
    color:#64748b;
}

.user-avatar-icon {
    width: 32px;
    height: 32px;
    background: #e0f2fe;
    color: #0ea5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

.icon-chevron {
    transition: transform 0.3s ease;
    color: #94a3b8;
}

/* منوی کشویی */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: var(--auth-shadow);
    list-style: none;
    margin: 0;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    border: 1px solid #f1f5f9;
}

.user-profile-wrapper.is-active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-profile-wrapper.is-active .icon-chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--auth-text);
    text-decoration: none;
    font-size: 13px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.user-dropdown-menu li a:hover {
    background: #f1f5f9;
    color: var(--auth-primary);
}

.user-dropdown-menu li.divider {
    height: 1px;
    background: #f1f5f9;
    margin: 6px 8px;
}

.logout-link {
    color: #ef4444 !important;
}

.logout-link:hover {
    background: #fef2f2 !important;
}

/* ریسپانسیو */
@media (max-width: 640px) {
    .login-btn span, .user-name {
        
    }
    .login-btn {
        padding: 10px;
    }
    .user-profile-trigger {
        padding: 4px;
    }
    .user-dropdown-menu {
        right: auto;
        left: -10px;
    }
}