/* ========================================
   Shohaz Header — طراحی جدید و ریسپانسیو
   ======================================== */

/* ── Base Header Styles ── */
.site-header {
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.3s var(--ease);
}

/* صفحات داخلی: Sticky با پس‌زمینه سفید */
.site-header-internal {
    position: sticky;
    background: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
    transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}

/* حالت شناور — glass morphism */
.site-header-internal.is-scrolled {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.05);
}

/* صفحه اصلی: شفاف روی Hero */
.site-header-home {
    position: absolute;
    background: transparent;
    box-shadow: none;
}

/* ── Top Bar (اطلاعیه) ── */
.top-bar {
    display: none;
    padding: 10px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8rem;
    text-align: center;
}

.top-bar.is-active {
    display: block;
}

/* در صفحه اصلی topbar شفاف */
.site-header-home .top-bar.is-active {
    background: transparent !important;
    border-bottom-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9) !important;
}

.site-header-home .top-bar.is-active .top-bar-btn {
    color: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 1300px;
    margin: 0 auto;
}

.top-bar-text {
    font-size: 0.75rem;
    font-weight: 700;
}

.top-bar-btn {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 14px;
    border: 1.5px solid currentColor;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.top-bar-btn:hover {
    opacity: 0.75;
}

.top-bar-row-1 {
    display: flex;
    align-items: center;
    gap: 6px;
}

.top-bar-row-1 svg {
    color: #dc2626;
    min-width: 14px;
}

.top-bar-row-1 span {
    font-size: 0.73rem;
    font-weight: 700;
}

.top-bar-row-2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar-price-old {
    font-size: 0.72rem;
    text-decoration: line-through;
    opacity: 0.5;
}

.top-bar-price-new {
    font-size: 0.78rem;
    font-weight: 900;
    color: #166534;
}

.top-bar-discount {
    font-size: 0.65rem;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 2px 8px;
    border-radius: 100px;
}

/* ── Navigation ── */
.shohaz-nav {
    padding: 16px 0;
    transition: all 0.3s var(--ease);
}

.shohaz-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

/* ── Logo ── */
.shohaz-nav-logo {
    flex-shrink: 0;
}

.shohaz-nav-logo .logo {
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    text-decoration: none;
    color: #000000;
    transition: color 0.2s;
}

.shohaz-nav-logo .logo span {
    font-weight: 400;
    color: var(--accent);
    margin-right: 2px;
}

/* صفحه اصلی: لوگو سفید */
.shohaz-nav-home .shohaz-nav-logo .logo {
    color: #ffffff;
}

.shohaz-nav-home .shohaz-nav-logo .logo span {
    color: #86efac;
}

/* ── Center Navigation (Desktop) ── */
.shohaz-nav-center {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

.shohaz-nav-center .nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    text-decoration: none;
    color: #000000;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 10px;
    transition: all 0.2s var(--ease);
    position: relative;
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--accent);
}

.nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

/* صفحه اصلی: لینک‌های سفید */
.shohaz-nav-home .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.shohaz-nav-home .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.shohaz-nav-home .nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* ── Actions (Desktop) ── */
.shohaz-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 24px;
    text-decoration: none;
    color: #000000;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1.5px solid var(--gray-200);
    border-radius: 100px;
    transition: all 0.3s var(--ease);
    white-space: nowrap;
}

.nav-cta:hover {
    background: var(--black);
    color: var(--white) !important;
    border-color: var(--black);
    transform: translateY(-1px);
}

/* آیکون دکمه حساب کاربری */
.nav-cta-account {
    gap: 7px;
}

.nav-cta-account svg {
    flex-shrink: 0;
    transition: stroke 0.3s var(--ease);
}

.nav-cta-account:hover svg {
    stroke: var(--white);
}

.nav-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #000000;
    border-radius: 10px;
    transition: all 0.2s;
}

.nav-cart-btn:hover {
    background: var(--gray-100);
    color: var(--accent);
}

/* صفحه اصلی: دکمه‌های سفید */
.shohaz-nav-home .nav-cta {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.shohaz-nav-home .nav-cta:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff !important;
}

.shohaz-nav-home .nav-cart-btn {
    color: rgba(255, 255, 255, 0.85);
}

.shohaz-nav-home .nav-cart-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* شمارنده سبد خرید */
.shohaz-cart-count {
    position: absolute;
    top: -4px;
    left: -4px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 900;
    border-radius: 100px;
    padding: 0 5px;
    border: 2px solid white;
}

/* ── Mobile Toggle ── */
.shohaz-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
    border-radius: 8px;
    transition: background 0.2s;
}

.shohaz-nav-toggle:hover {
    background: var(--gray-100);
}

.shohaz-nav-home .shohaz-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.shohaz-hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.shohaz-hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #000000;
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

/* صفحه اصلی: همبرگر سفید */
.shohaz-nav-home .shohaz-hamburger span {
    background: #ffffff;
}

/* انیمیشن همبرگر به X */
.shohaz-nav-toggle[aria-expanded="true"] .shohaz-hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.shohaz-nav-toggle[aria-expanded="true"] .shohaz-hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.shohaz-nav-toggle[aria-expanded="true"] .shohaz-hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ========================================
   Mobile Menu — ریسپانسیو و مدرن
   ======================================== */

/* ── Backdrop ── */
.shohaz-mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease);
}

.shohaz-mobile-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

/* ── Menu Panel ── */
.shohaz-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.12);
    transition: right 0.4s var(--ease);
}

.shohaz-mobile-menu.active {
    right: 0;
}

/* ── Header ── */
.shohaz-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.shohaz-mobile-brand {
    display: flex;
    flex-direction: column;
}

.shohaz-mobile-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--black);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.shohaz-mobile-subtitle {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 400;
    margin-top: 2px;
}

.shohaz-mobile-close {
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: all 0.2s;
    flex-shrink: 0;
}

.shohaz-mobile-close:hover {
    background: var(--gray-200);
    color: var(--black);
    transform: rotate(90deg);
}

/* ── Body ── */
.shohaz-mobile-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 16px 0 24px;
}

/* ── Navigation Links ── */
.shohaz-mobile-nav {
    flex: 1;
    padding: 8px 16px;
}

.shohaz-mobile-nav .nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.shohaz-mobile-nav .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: var(--gray-800);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    transition: all 0.2s var(--ease);
    background: transparent;
}

.shohaz-mobile-nav .nav-link::after {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-left: 2px solid var(--gray-300);
    border-bottom: 2px solid var(--gray-300);
    transform: rotate(-45deg);
    transition: all 0.2s var(--ease);
    flex-shrink: 0;
}

.shohaz-mobile-nav .nav-link:hover {
    background: var(--gray-100);
    color: var(--accent);
}

.shohaz-mobile-nav .nav-link:hover::after {
    border-color: var(--accent);
    transform: rotate(-45deg) translateX(-2px);
}

.shohaz-mobile-nav .nav-link.active {
    background: var(--accent-light);
    color: var(--accent);
}

.shohaz-mobile-nav .nav-link.active::after {
    border-color: var(--accent);
}

/* ── Divider ── */
.shohaz-mobile-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 16px 16px;
}

/* ── Actions ── */
.shohaz-mobile-actions {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shohaz-mobile-actions .nav-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: var(--black);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s var(--ease);
}

.shohaz-mobile-actions .nav-cta:hover {
    background: var(--gray-800);
    transform: translateY(-1px);
}

.shohaz-mobile-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-100);
    border-radius: 12px;
    text-decoration: none;
    color: var(--gray-800);
    font-size: 0.88rem;
    font-weight: 700;
    direction: ltr;
    transition: all 0.2s;
}

.shohaz-mobile-phone:hover {
    background: var(--gray-200);
}

.shohaz-mobile-phone svg {
    color: var(--accent);
    flex-shrink: 0;
}

/* ========================================
   Responsive Breakpoints
   ======================================== */

@media (max-width: 992px) {
    .shohaz-nav-toggle {
        display: block;
    }

    .shohaz-nav-center,
    .shohaz-nav-actions {
        display: none !important;
    }

    .shohaz-nav {
        padding: 12px 0;
    }
}

@media (max-width: 480px) {
    .shohaz-mobile-menu {
        width: 100%;
        max-width: 100vw;
    }

    .top-bar {
        padding: 8px 16px;
    }

    .top-bar-inner {
        flex-wrap: wrap;
        font-size: 0.7rem;
    }

    .shohaz-nav-logo .logo {
        font-size: 1.15rem;
    }
}


/* ── بهبودهای ریسپانسیو اضافی ── */

/* tablet — فاصله‌گذاری nav کمتر */
@media (max-width: 1100px) and (min-width: 993px) {
    .shohaz-nav-center .nav-links {
        gap: 0;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 0.84rem;
    }

    .nav-cta {
        padding: 10px 16px;
        font-size: 0.84rem;
    }
}

/* موبایل — بهبود top-bar */
@media (max-width: 640px) {
    .top-bar {
        padding: 8px 12px;
    }

    .top-bar-inner {
        flex-direction: column;
        gap: 4px;
        font-size: 0.7rem;
    }

    .top-bar-row-2 {
        gap: 6px;
    }

    .top-bar-price-new {
        font-size: 0.75rem;
    }
}

/* موبایل — header padding */
@media (max-width: 480px) {
    .shohaz-nav {
        padding: 10px 0;
    }

    .container {
        padding: 0 16px;
    }
}

/* اطمینان از اینکه mobile menu روی همه چیز باشه */
@media (max-width: 992px) {
    .shohaz-mobile-menu {
        width: min(320px, 88vw);
        /* top از طریق JS برای admin bar تنظیم می‌شه */
        top: 0;
    }

    .shohaz-mobile-backdrop {
        top: 0;
    }

    .shohaz-nav-inner {
        gap: 16px;
    }
}

/* admin-bar در موبایل — وردپرس خودش admin bar رو fixed می‌کنه */
.admin-bar .shohaz-mobile-menu {
    top: 46px;
    /* ارتفاع پیش‌فرض admin bar در موبایل */
    height: calc(100vh - 46px);
}

.admin-bar .shohaz-mobile-backdrop {
    top: 46px;
}

@media (min-width: 783px) {
    .admin-bar .shohaz-mobile-menu {
        top: 32px;
        /* ارتفاع admin bar در دسکتاپ */
        height: calc(100vh - 32px);
    }

    .admin-bar .shohaz-mobile-backdrop {
        top: 32px;
    }
}