/**
 * ============================================
 * انتشارات اطمینان - تم حرفه‌ای جدید
 * پالت رنگی: #1583B8 (آبی اصلی) | #C1EDF6 (آبی روشن)
 * ============================================
 */

/* === متغیرهای رنگی === */
:root {
    --primary: #1583B8;
    --primary-dark: #0D6A94;
    --primary-darker: #0A5477;
    --primary-light: #C1EDF6;
    --primary-lighter: #E8F7FB;
    --accent: #1A9FD4;
    --text-dark: #1C2D3A;
    --text-medium: #4A5568;
    --text-light: #718096;
    --white: #FFFFFF;
    --bg-light: #F7FBFD;
    --bg-gray: #EDF2F7;
    --border-color: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(21, 131, 184, 0.08);
    --shadow-md: 0 4px 12px rgba(21, 131, 184, 0.12);
    --shadow-lg: 0 8px 30px rgba(21, 131, 184, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

/* === بادی و کلیات === */
body {
    background: var(--bg-light) !important;
    color: var(--text-dark) !important;
    font-family: ISL, Tahoma, sans-serif !important;
}

/* === هدر و نوار بالایی === */
.top-bar-z {
    background: var(--white) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.top-bar-z .logo .inr a {
    color: var(--text-dark) !important;
    font-weight: 700;
    text-shadow: none;
}

.top-bar-z .logo .inr a img {
    filter: none;
    transition: transform 0.3s ease;
}

.top-bar-z .logo .inr a:hover img {
    transform: scale(1.05);
}

/* === جستجو === */
.top-bar-z .search {
    position: relative;
}

.top-bar-z .search input[type="text"] {
    background: var(--bg-gray) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 25px !important;
    color: var(--text-dark) !important;
    padding: 8px 40px 8px 15px !important;
    font-size: 14px;
    transition: all 0.3s ease;
}

.top-bar-z .search input[type="text"]::placeholder {
    color: var(--text-light) !important;
}

.top-bar-z .search input[type="text"]:focus {
    background: var(--white) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(21, 131, 184, 0.1);
    outline: none;
}

.top-bar-z .search .fa-search {
    position: absolute;
    right: 20px;
    top: 25%;
    color: var(--text-light) !important;
    cursor: pointer;
    transition: color 0.3s;
}

.top-bar-z .search .fa-search:hover {
    color: var(--primary) !important;
}

/* === منوی اصلی === */
.hor-nav.main nav ul {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.hor-nav.main nav ul li {
    list-style: none;
}

.hor-nav.main nav ul li a {
    display: block;
    padding: 10px 18px !important;
    color: var(--primary) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    position: relative;
    letter-spacing: -0.2px;
}

.hor-nav.main nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    right: 18px;
    left: 18px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.hor-nav.main nav ul li a:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary-dark) !important;
}

.hor-nav.main nav ul li a:hover::after {
    transform: scaleX(1);
}

/* === سبد خرید === */
.cart img {
    filter: none;
    transition: transform 0.3s ease;
}

.cart img:hover {
    transform: scale(1.1);
}

/* === حساب کاربری (Dropdown) === */
.wrapper-dropdown-5 .avatar img {
    border-radius: 50% !important;
    border: 2px solid var(--primary-light) !important;
    transition: border-color 0.3s ease;
}

.wrapper-dropdown-5 .avatar img:hover {
    border-color: var(--primary) !important;
}

.wrapper-dropdown-5 .dropdown {
    background: var(--white) !important;
    border: none !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    overflow: hidden;
    margin-top: 8px;
    animation: dropdownSlide 0.25s ease;
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.wrapper-dropdown-5 .dropdown li a {
    color: var(--text-dark) !important;
    padding: 10px 16px !important;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wrapper-dropdown-5 .dropdown li a:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary) !important;
}

.wrapper-dropdown-5 .dropdown li a i {
    color: var(--primary) !important;
    width: 18px;
    text-align: center;
}

/* === دکمه‌ها === */
button, .button {
    background-color: var(--primary) !important;
    border-color: var(--primary-dark) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--white) !important;
    font-family: ISL, Tahoma, sans-serif !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(21, 131, 184, 0.25);
}

button:hover, button:focus, .button:hover, .button:focus {
    background-color: var(--primary-dark) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 15px rgba(21, 131, 184, 0.35);
    transform: translateY(-1px);
}

button.secondary, .button.secondary {
    background-color: var(--bg-gray) !important;
    border-color: var(--border-color) !important;
    color: var(--text-dark) !important;
    box-shadow: none;
}

button.secondary:hover, .button.secondary:hover {
    background-color: var(--border-color) !important;
    color: var(--text-dark) !important;
}

/* === بلوک‌ها و بخش‌ها === */
.blk {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.3s ease;
}

.blk:hover {
    box-shadow: var(--shadow-md);
}

.blk .head {
    border-bottom: 2px solid var(--primary-lighter);
    padding-bottom: 12px;
    margin-bottom: 18px;
}

.blk .head h2 {
    color: var(--primary) !important;
    font-size: 20px !important;
    font-weight: 700;
    text-align: right;
    direction: rtl;
    position: relative;
}

/* === راست‌چین تایتل‌ها === */
.blk .head h1,
.blk .head h2,
.blk .head h3,
.content-center h1,
.content-center h2,
.content-center h3,
.main h1, .main h2, .main h3 {
    text-align: right;
    direction: rtl;
}

.blk .head h2 span {
    position: relative;
    padding-right: 15px;
}

.blk .head h2 span::before {
    content: '';
    position: absolute;
    right: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 2px;
}

.blk .head .see-all {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.blk .head .see-all a {
    color: var(--primary) !important;
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.blk .head .see-all a:hover {
    background: var(--primary-lighter);
    color: var(--primary-dark) !important;
}

/* === کارت‌های کتاب === */
.blk ul.navbar li.navs > div {
    border-radius: var(--radius-md) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid var(--border-color) !important;
    overflow: hidden;
    transition: all 0.35s ease;
    background: var(--white);
}

.blk ul.navbar li.navs > div:hover {
    box-shadow: 0 8px 25px rgba(21, 131, 184, 0.18) !important;
    transform: translateY(-5px);
    border-color: var(--primary-light) !important;
}

.blk ul.navbar li.navs > div a {
    display: block;
    position: relative;
    overflow: hidden;
}

.blk ul.navbar li.navs > div .cover-b,
.blk ul.navbar li.navs > div img.cover-b {
    border-radius: 0 !important;
    transition: transform 0.4s ease;
}

.blk ul.navbar li.navs > div:hover .cover-b,
.blk ul.navbar li.navs > div:hover img.cover-b {
    transform: scale(1.03);
}

/* === ربان تخفیف === */
.ribbon {
    z-index: 10;
}

.ribbon .blue {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%) !important;
    color: var(--white) !important;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px !important;
    border-radius: 0 0 0 var(--radius-sm);
    box-shadow: -2px 2px 8px rgba(21, 131, 184, 0.4);
}

.ribbon .green {
    background: linear-gradient(135deg, #38A169, #48BB78) !important;
    color: var(--white) !important;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px !important;
    border-radius: 0 0 0 var(--radius-sm);
    box-shadow: -2px 2px 8px rgba(56, 161, 105, 0.4);
}

.ribbon .red {
    background: linear-gradient(135deg, #E53E3E, #FC8181) !important;
    color: var(--white) !important;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px !important;
    border-radius: 0 0 0 var(--radius-sm);
}

.ribbon .orange {
    background: linear-gradient(135deg, #DD6B20, #ED8936) !important;
    color: var(--white) !important;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px !important;
    border-radius: 0 0 0 var(--radius-sm);
}

/* === فوتر === */
.footer {
    background: linear-gradient(180deg, #0A5477 0%, #073B54 100%) !important;
    color: #B0C4CE !important;
    border-top: 4px solid var(--accent);
}

.footer h5, .footer h4, .footer h3, .footer h2, .footer h1 {
    color: var(--white) !important;
    font-size: 17px !important;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(193, 237, 246, 0.2);
    position: relative;
}

.footer h5::after, .footer h4::after, .footer h3::after, .footer h2::after, .footer h1::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--primary-light);
}

.footer ul li a {
    color: #B0C4CE !important;
    padding: 4px 0;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer ul li a:hover {
    color: var(--primary-light) !important;
    padding-right: 8px;
}

.footer a {
    color: #B0C4CE !important;
}

.footer a:hover {
    color: var(--primary-light) !important;
}

/* === سایدبار === */
.x-sidebar {
    background: linear-gradient(180deg, #0D5A7A 0%, #0A5477 100%) !important;
    color: #B0C4CE !important;
}

.x-sidebar a {
    color: #B0C4CE !important;
    transition: all 0.3s ease;
}

.x-sidebar a:hover {
    color: var(--primary-light) !important;
}

.side-content.row {
    background: #0F6687 !important;
}

.toolbar li a {
    color: #B0C4CE !important;
    transition: all 0.3s ease;
    border-radius: var(--radius-sm);
    padding: 8px 12px !important;
}

.toolbar li:hover a, .toolbar li.active a {
    color: var(--white) !important;
    background: rgba(193, 237, 246, 0.15) !important;
}

/* === بلوک سایدبار (book-index) === */
.book-index {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.book-index > div {
    padding: 12px 16px;
}

/* === لینک‌ها === */
a {
    color: var(--primary) !important;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--primary-dark) !important;
}

/* === فیلدهای ورودی === */
input[type="text"], input[type="password"], input[type="email"], input[type="number"], input[type="tel"], input[type="url"], textarea, select {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease;
    background: var(--white) !important;
    color: var(--text-dark) !important;
}

input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(21, 131, 184, 0.15) !important;
    outline: none;
}

/* === تایتل‌های صفحات === */
.pg-title {
    color: var(--primary) !important;
    font-weight: 700;
}

/* === تب‌ها === */
.tabs dd > a, .tabs .tab-title > a {
    background: var(--bg-gray) !important;
    color: var(--text-medium) !important;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.3s ease;
}

.tabs dd > a:hover, .tabs .tab-title > a:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary) !important;
}

.tabs dd.active a, .tabs .tab-title.active a {
    background: var(--white) !important;
    color: var(--primary) !important;
    border-bottom: 2px solid var(--primary);
}

/* === پیجینیشن === */
.pg-nav a {
    color: var(--text-medium) !important;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.pg-nav a:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary) !important;
}

.current-pg a:hover {
    color: var(--primary) !important;
}

/* === آکاردئون === */
.ac-container label {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--white) !important;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.ac-container label:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%) !important;
}

.ac-container input:checked + label,
.ac-container input:checked + label:hover {
    background: var(--primary-light) !important;
    color: var(--primary-darker) !important;
    border-bottom: none !important;
    box-shadow: 0 2px 8px rgba(21, 131, 184, 0.2) !important;
}

/* === بلوک‌کوئیت === */
blockquote {
    background: var(--primary-lighter) !important;
    border-right: 4px solid var(--primary) !important;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 15px 20px;
}

blockquote:before {
    color: var(--primary) !important;
}

/* === جعبه جستجوی پیشرفته === */
.content-center .fa-question-circle {
    color: var(--primary) !important;
}

/* === سایدبار لینک‌ها === */
.sidebar .light-links li, .sidebar .light-links li a {
    color: var(--primary) !important;
}

.sidebar .light-links li a:hover {
    color: var(--primary-dark) !important;
}

/* === نوت‌ها === */
ul.notes li {
    background: var(--primary-lighter) !important;
    border-bottom: 1px dashed var(--primary-light) !important;
    padding: 8px 12px;
}

/* === گروه تایتل === */
.grouptitle {
    background: var(--primary-lighter) !important;
    color: var(--primary-dark) !important;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

/* === اسکرول‌بار سفارشی === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-gray);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* === دیالوگ‌ها (jQuery UI) === */
.ui-dialog {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    border: none !important;
    overflow: hidden;
    z-index: 999999999 !important;
}

.ui-dialog .ui-dialog-titlebar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--white) !important;
    border: none !important;
    padding: 12px 16px;
}

.ui-dialog .ui-dialog-titlebar-close {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    color: var(--white) !important;
}

.ui-dialog .ui-dialog-content {
    padding: 20px !important;
}

.ui-dialog input[type="text"],
.ui-dialog input[type="password"],
.ui-dialog input[type="email"] {
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    padding: 8px 12px !important;
    width: 100%;
    margin-bottom: 8px;
}

.ui-dialog input[type="text"]:focus,
.ui-dialog input[type="password"]:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(21, 131, 184, 0.15) !important;
}

/* === پیام خطا === */
.error {
    background: linear-gradient(135deg, #942A25, #C53030) !important;
    border-radius: var(--radius-sm) !important;
}

.error label, .error label.error {
    color: #E53E3E !important;
}

/* === نوار موبایل پایین === */
.mobile-bottom-nav {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary-darker) 100%) !important;
    box-shadow: 0 -4px 20px rgba(21, 131, 184, 0.25) !important;
    border-top: 2px solid var(--primary-light) !important;
}

.mobile-bottom-nav ul li a {
    color: var(--white) !important;
    transition: all 0.3s ease;
    padding: 8px 0;
}

.mobile-bottom-nav ul li a:hover,
.mobile-bottom-nav ul li a:active {
    color: var(--primary-light) !important;
}

.mobile-bottom-nav .nav-icon i {
    color: var(--white) !important;
    font-size: 20px;
}

.mobile-bottom-nav ul li a:hover .nav-icon i,
.mobile-bottom-nav ul li a:active .nav-icon i {
    color: var(--primary-light) !important;
}

.mobile-bottom-nav span {
    font-size: 11px;
    color: var(--white);
}

/* === جعبه مشخصات کتاب === */
.detail-b p {
    color: var(--text-medium) !important;
    line-height: 1.8;
}

/* === پیش‌نمایش === */
.preview-b:hover {
    color: var(--primary-dark) !important;
}

/* === تایتل صفحات === */
.main .content-center h1,
.main .content-center h2,
.main .content-center h3 {
    color: var(--primary) !important;
}

/* === رنگ‌بندی لینک‌های ناوبری === */
.inp a {
    color: var(--primary) !important;
}

.inp a:hover {
    color: var(--primary-dark) !important;
}

/* === انیمیشن‌های ظریف === */
.blk, .detail-b, .sidebar, .footer, .content-center {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === بهبود ظاهر کلی === */
.content-center {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

/* === ریسپانسیو === */
@media (max-width: 768px) {
    .top-bar-z {
        border-bottom-width: 2px !important;
    }
    
    /* آیکون‌های هدر در موبایل */
    .mobile-header-actions {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 8px 0 !important;
    }
    
    .mobile-header-actions .cart,
    .mobile-header-actions .account-nav {
        padding: 0 !important;
    }
    
    .mobile-header-actions .cart {
        text-align: left !important;
    }
    
    .mobile-header-actions .account-nav {
        text-align: right !important;
    }
    
    .mobile-header-actions .cart img,
    .mobile-header-actions .account-nav img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .mobile-header-actions .hor-nav nav ul {
        display: flex;
        justify-content: center;
        margin: 0;
    }
    
    .blk {
        padding: 12px;
        border-radius: var(--radius-md);
    }
    
    .blk .head h2 {
        font-size: 17px !important;
        text-align: right !important;
        direction: rtl !important;
    }
    
    .blk .head h2 span {
        text-align: right !important;
    }
    
    .content-center {
        padding: 12px;
        border-radius: var(--radius-md);
    }
    
    .hor-nav.main nav ul li a {
        padding: 8px 12px !important;
        font-size: 13px;
    }
    
    /* اصلاح کارت کتاب در موبایل - تنظیمات پیش‌فرض */
    .blk ul.navbar {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .blk ul.navbar li.navs {
        width: 100% !important;
        max-width: 100% !important;
        padding: 4px !important;
        margin: 0 !important;
    }
    
    /* اصلاح کارت کتاب در موبایل */
    .blk ul.navbar li.navs > div {
        padding: 10px !important;
    }
    
    .blk ul.navbar li.navs > div img.cover-b {
        width: 100% !important;
        height: auto !important;
        max-height: 200px !important;
        aspect-ratio: 2/3;
        object-fit: contain;
        display: block !important;
        margin: 0 auto !important;
    }
}

/* === بوت‌استرپ اورراید === */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary-dark) !important;
    border-radius: var(--radius-sm) !important;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-darker) !important;
}

.alert-danger {
    background-color: #FFF5F5 !important;
    border-color: #FEB2B2 !important;
    color: #C53030 !important;
    border-radius: var(--radius-sm) !important;
}

.alert-success {
    background-color: #F0FFF4 !important;
    border-color: #9AE6B4 !important;
    color: #276749 !important;
    border-radius: var(--radius-sm) !important;
}

.panel {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
}

.panel-heading {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--white) !important;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

/* === ناوبری اصلی === */
.top-bar-z > .row:last-child {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.row > .hor-nav.main {
    background: var(--white) !important;
    border-radius: var(--radius-md);
    padding: 4px 8px;
    margin: 0;
    border: 1px solid var(--border-color);
}

/* === انتخاب رنگ بوت‌استرپ === */
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
    background-color: var(--primary) !important;
    border-radius: var(--radius-sm) !important;
}

.pagination > .active > a,
.pagination > .active > span {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* === بهبور جدول === */
.table > thead > th {
    background: var(--primary) !important;
    color: var(--white) !important;
    border: none !important;
}

.datatable_details {
    background: var(--primary-lighter) !important;
    border-radius: var(--radius-sm);
}

/* === Sweet Alert === */
.sweet-alert {
    border-radius: var(--radius-lg) !important;
}

/* === مدال === */
.modal-content {
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
    border: none !important;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    color: var(--white) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

.modal-header .close {
    color: var(--white) !important;
    opacity: 0.8;
}

.modal-header .close:hover {
    opacity: 1;
}

/* === مگا منو - سبک دیجی‌کالا === */
.et-mega-parent {
    position: relative;
}

.et-mega-trigger {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.et-mega-trigger .et-mega-arrow {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.et-mega-parent:hover .et-mega-arrow {
    transform: rotate(180deg);
}

.et-mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    width: 750px;
    max-width: 90vw;
    min-height: 400px;
    z-index: 100005;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
    pointer-events: none;
    display: flex;
    overflow: hidden;
}

.et-mega-parent:hover .et-mega-menu,
.et-mega-parent.active .et-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* === پنل راست: لیست دسته‌های اصلی === */
.et-mega-sidebar {
    width: 240px;
    min-width: 240px;
    background: var(--bg-light);
    border-left: 1px solid var(--border-color);
    overflow-y: auto;
    max-height: 450px;
    padding: 8px 0;
}

.et-mega-sidebar-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 16px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-dark) !important;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.et-mega-sidebar-link > i:first-child {
    font-size: 14px;
    color: var(--primary) !important;
    width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.et-mega-sidebar-link > span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.et-sidebar-arrow {
    font-size: 12px !important;
    color: var(--text-light) !important;
    transition: all 0.2s ease;
    width: auto !important;
}

.et-mega-sidebar-link:hover,
.et-mega-sidebar-link.et-active {
    background: var(--white) !important;
    color: var(--primary) !important;
}

.et-mega-sidebar-link:hover > span,
.et-mega-sidebar-link.et-active > span {
    color: var(--primary) !important;
    font-weight: 600;
}

.et-mega-sidebar-link:hover > i:first-child,
.et-mega-sidebar-link.et-active > i:first-child {
    color: var(--primary) !important;
}

.et-mega-sidebar-link:hover .et-sidebar-arrow,
.et-mega-sidebar-link.et-active .et-sidebar-arrow {
    color: var(--primary) !important;
    transform: translateX(-3px);
}

/* === پنل چپ: زیردسته‌ها === */
.et-mega-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
    max-height: 450px;
    background: var(--white);
}

.et-mega-sub-panel {
    display: none;
    padding: 20px 24px;
    animation: etSubPanelFade 0.25s ease;
}

.et-mega-sub-panel.et-panel-active {
    display: block;
}

@keyframes etSubPanelFade {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.et-mega-sub-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-lighter);
}

.et-mega-sub-header a {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    padding: 4px 0 !important;
    transition: all 0.2s ease;
}

.et-mega-sub-header a:hover {
    color: var(--primary-dark) !important;
}

.et-mega-sub-header a i:first-child {
    font-size: 16px;
}

.et-mega-sub-header a .fa-arrow-left {
    font-size: 12px;
    opacity: 0;
    transform: translateX(8px);
    transition: all 0.3s ease;
}

.et-mega-sub-header a:hover .fa-arrow-left {
    opacity: 1;
    transform: translateX(0);
}

.et-mega-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px;
}

.et-mega-sub-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 12px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--text-medium) !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-decoration: none;
}

.et-mega-sub-link:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary) !important;
    padding-right: 18px !important;
}

.et-mega-sub-link i {
    font-size: 10px;
    color: var(--primary-light) !important;
    transition: all 0.2s ease;
}

.et-mega-sub-link:hover i {
    color: var(--primary) !important;
}

/* پیام پیش‌فرض وقتی دسته‌ای زیردسته نداره */
.et-mega-content-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    color: var(--text-light);
    font-size: 14px;
}

/* === منوی موبایل: دسته‌بندی آکاردئونی === */
.et-mobile-cat-parent > a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    font-weight: 700 !important;
    color: var(--primary) !important;
    background: var(--primary-lighter) !important;
}

.et-mobile-cat-parent > a::after {
    content: '\f107';
    font-family: 'FontAwesome';
    font-size: 14px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.et-mobile-cat-parent.open > a::after {
    transform: rotate(180deg);
}

.et-mobile-sub-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.et-mobile-cat-parent.open .et-mobile-sub-cats {
    display: block;
}

.et-mobile-sub-cats > li > a {
    padding-right: 28px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.et-mobile-sub-sub-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background: var(--white);
}

.et-mobile-sub-cats > li.open .et-mobile-sub-sub-cats {
    display: block;
}

.et-mobile-sub-sub-cats li a {
    padding-right: 45px !important;
    font-size: 13px !important;
    color: var(--text-medium) !important;
}

/* === همبرگر منو === */
/* === مودال ورود/ثبت‌نام یکپارچه === */
.et-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.et-auth-modal.active {
    display: flex;
}

.et-auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: etOverlayIn 0.4s ease;
}

@keyframes etOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.et-auth-container {
    position: relative;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(21, 131, 184, 0.1);
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: etModalPopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 3px solid rgba(21, 131, 184, 0.12);
}

@keyframes etModalPopIn {
    0% { opacity: 0; transform: translateY(-40px) scale(0.85); filter: blur(8px); }
    60% { opacity: 1; filter: blur(0); }
    80% { transform: translateY(5px) scale(1.02); }
    100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.et-auth-close {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
    box-shadow: none !important;
    transform: none !important;
    backdrop-filter: blur(4px);
}

.et-auth-close:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg) !important;
}

.et-auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0A5477 100%);
    padding: 30px 25px 20px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.et-auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
}

.et-auth-header::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
}

.et-auth-logo-icon {
    font-size: 42px;
    margin-bottom: 8px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.et-auth-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    position: relative;
    z-index: 1;
}

.et-auth-subtitle {
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
    position: relative;
    z-index: 1;
}

.et-auth-tabs {
    display: flex;
    background: var(--bg-gray);
    border-bottom: 2px solid var(--border-color);
}

.et-auth-tab {
    flex: 1;
    padding: 14px 16px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: none !important;
    transform: none !important;
    border-radius: 0 !important;
}

.et-auth-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.et-auth-tab.active {
    color: var(--primary);
    background: var(--white);
}

.et-auth-tab.active::after {
    transform: scaleX(1);
}

.et-auth-tab:hover {
    color: var(--primary-dark);
}

.et-auth-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.et-auth-panel {
    display: none;
    animation: etPanelFadeIn 0.3s ease;
}

.et-auth-panel.active {
    display: block;
}

@keyframes etPanelFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.et-auth-message {
    display: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
    animation: etShake 0.4s ease;
}

.et-auth-message.error {
    background: linear-gradient(135deg, #C53030, #E53E3E);
    color: #FFFFFF !important;
    border: 1px solid #9B2C2C;
}

.et-auth-message.success {
    background: #F0FFF4;
    border: 1px solid #9AE6B4;
    color: #276749;
}

@keyframes etShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.et-form-group {
    margin-bottom: 16px;
}

.et-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.et-form-group input[type="text"],
.et-form-group input[type="password"],
.et-form-group input[type="email"],
.et-form-group input[type="tel"],
.et-form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s ease;
    box-sizing: border-box;
    font-family: ISL, Tahoma, sans-serif;
}

.et-form-group input:focus,
.et-form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 131, 184, 0.12);
    outline: none;
}

.et-form-group input::placeholder {
    color: var(--text-light);
    font-size: 13px;
}

.et-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.et-form-col {
    flex: 1;
    min-width: 200px;
}

.et-privacy-check label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--text-medium);
    cursor: pointer;
    font-weight: 400;
}

.et-privacy-check input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.et-auth-submit {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white) !important;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    font-family: ISL, Tahoma, sans-serif;
    box-shadow: 0 4px 15px rgba(21, 131, 184, 0.3);
    position: relative;
    overflow: hidden;
}

.et-auth-submit:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
    box-shadow: 0 8px 30px rgba(21, 131, 184, 0.5);
    transform: translateY(-2px) !important;
}

.et-auth-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.et-auth-submit:hover::before {
    left: 100%;
}

.et-auth-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.et-auth-submit .et-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: etSpin 0.8s linear infinite;
}

.et-auth-submit.loading .et-spinner {
    display: inline-block;
}

.et-auth-submit.loading .et-btn-text {
    display: none;
}

@keyframes etSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.et-auth-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 13px;
    color: var(--text-medium);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.et-auth-footer a {
    color: var(--primary) !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.et-auth-footer a:hover {
    color: var(--primary-dark) !important;
}

/* === OTP Input === */
.et-otp-section {
    text-align: center;
    padding: 10px 0;
}

.et-otp-icon {
    font-size: 52px;
    color: var(--primary);
    margin-bottom: 12px;
}

.et-otp-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.et-otp-section p {
    font-size: 14px;
    color: var(--text-medium);
    margin: 0 0 24px;
}

.et-otp-section p strong {
    color: var(--primary);
    direction: ltr;
    display: inline-block;
}

.et-otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 24px;
    direction: ltr;
}

.et-otp-digit {
    width: 50px !important;
    height: 56px;
    text-align: center;
    font-size: 24px !important;
    font-weight: 700;
    border: 2px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-dark) !important;
    background: var(--bg-light) !important;
    transition: all 0.2s ease;
    padding: 0 !important;
    caret-color: var(--primary);
}

.et-otp-digit:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(21, 131, 184, 0.15) !important;
    background: var(--white) !important;
    outline: none;
}

.et-otp-digit.filled {
    border-color: var(--primary) !important;
    background: var(--primary-lighter) !important;
}

.et-otp-footer {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.et-otp-timer {
    font-size: 14px;
    color: var(--text-light);
}

.et-otp-timer span {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
}

.et-otp-resend {
    display: none;
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.2s;
}

.et-otp-resend:hover {
    background: var(--primary-lighter);
}

.et-otp-back {
    color: var(--text-light) !important;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    margin-top: 5px;
}

.et-otp-back:hover {
    color: var(--primary) !important;
}

/* === Forgot Password === */
.et-forgot-section {
    text-align: center;
    padding: 10px 0;
}

.et-forgot-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
}

.et-forgot-section h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px;
}

.et-forgot-section > p {
    font-size: 14px;
    color: var(--text-medium);
    margin: 0 0 20px;
}

/* === ریسپانسیو مودال === */
@media (max-width: 576px) {
    .et-auth-container {
        max-width: 100%;
        border-radius: 16px;
        max-height: 95vh;
    }

    .et-auth-header {
        padding: 24px 20px 16px;
    }

    .et-auth-logo-icon {
        font-size: 36px;
    }

    .et-auth-title {
        font-size: 18px;
    }

    .et-auth-body {
        padding: 18px;
    }

    .et-form-row {
        flex-direction: column;
        gap: 0;
    }

    .et-form-col {
        min-width: 100%;
    }

    .et-otp-digit {
        width: 44px !important;
        height: 50px;
        font-size: 22px !important;
    }

    .et-otp-inputs {
        gap: 7px;
    }

    .et-auth-tabs .et-auth-tab {
        font-size: 14px;
        padding: 12px;
    }
}

.et-hamburger {
    display: none;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100001;
    background: var(--primary);
    border: none;
    padding: 10px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(21, 131, 184, 0.3) !important;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
}

.et-hamburger:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(21, 131, 184, 0.4) !important;
    transform: translateY(-50%) scale(1.05);
}

.et-hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    margin: 4px auto;
    transition: all 0.3s ease;
}

/* === منوی موبایل کشویی === */
.et-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.et-mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.et-mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: var(--white);
    z-index: 100003;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
}

.et-mobile-menu.active {
    right: 0;
}

.et-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.et-mobile-header img {
    filter: brightness(0) invert(1);
}

.et-mobile-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.et-mobile-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

.et-mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.et-mobile-nav-list li {
    border-bottom: 1px solid var(--border-color);
}

.et-mobile-nav-list li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-dark) !important;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.et-mobile-nav-list li a:hover {
    background: var(--primary-lighter);
    color: var(--primary) !important;
    padding-right: 28px;
}

.et-mobile-user {
    padding: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.et-mobile-user a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--primary) !important;
    transition: all 0.2s ease;
    cursor: pointer;
}

.et-mobile-user a:hover {
    background: var(--primary-lighter);
}

/* === بهبود کارت کتاب (مدرن) - Grid System === */
.blk ul.navbar {
    display: grid !important;
    grid-template-columns: repeat(8, 1fr) !important;
    gap: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

.blk ul.navbar li.navs {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    box-sizing: border-box !important;
    float: none !important;
}

.blk ul.navbar li.navs > div {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-md) !important;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color) !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 12px;
}

.blk ul.navbar li.navs > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(21, 131, 184, 0.18) !important;
    border-color: var(--primary-light) !important;
}

.blk ul.navbar li.navs > div a {
    display: block;
    overflow: hidden;
    width: 100%;
}

.blk ul.navbar li.navs > div img.cover-b {
    width: 100% !important;
    height: auto !important;
    max-height: 320px;
    aspect-ratio: 2/3;
    object-fit: contain;
    transition: transform 0.5s ease;
    display: block;
    margin: 0 auto;
}

.blk ul.navbar li.navs > div:hover img.cover-b {
    transform: scale(1.05);
}

/* === بهبود سایدبار === */
.sidebar.blk {
    background: var(--white) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    color: var(--text-dark);
}

.sidebar.blk .head {
    border-bottom: 2px solid var(--primary-lighter) !important;
    padding: 18px 20px 14px !important;
    margin-bottom: 8px !important;
}

.sidebar.blk .head h2 {
    color: var(--primary) !important;
    font-size: 18px !important;
}

.sidebar.blk .head h2 span::before {
    background: var(--primary) !important;
}

.sidebar.blk nav ul li a,
.sidebar.blk.panel-default nav ul li a,
.sidebar.blk ul.nav.nav-pills.nav-stacked.navbar-default li a {
    color: var(--text-dark) !important;
    padding: 10px 20px !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    border-radius: 0;
    transition: all 0.25s ease;
}

.sidebar.blk nav ul li a:hover,
.sidebar.blk.panel-default nav ul li a:hover,
.sidebar.blk ul.nav.nav-pills.nav-stacked.navbar-default li a:hover {
    background: var(--primary-lighter) !important;
    color: var(--primary) !important;
    padding-right: 28px !important;
}

.sidebar.blk nav ul li a i,
.sidebar.blk.panel-default nav ul li a i,
.sidebar.blk ul.nav.nav-pills.nav-stacked.navbar-default li a i {
    color: var(--primary) !important;
    font-size: 12px;
    transition: all 0.2s ease;
}

/* === بهبود اسلایدر === */
.hero-z {
    padding: 15px 0 !important;
}

.sliders-w {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid var(--border-color);
}

.bx-wrapper .bx-pager.bx-default-pager a {
    background: rgba(255, 255, 255, 0.5) !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

.bx-wrapper .bx-pager.bx-default-pager a.active,
.bx-wrapper .bx-pager.bx-default-pager a:hover {
    background: var(--primary) !important;
    transform: scale(1.2);
}

/* === بهبود صفحه جزئیات کتاب === */
.box1 {
    padding: 0 10px;
}

.box1 .book-item h1 {
    color: var(--primary) !important;
    font-size: 22px !important;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.5;
}

.box1 .price-w img {
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-md) !important;
}

.box1 .price table {
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: 100%;
}

.box1 .price table td {
    padding: 8px 10px;
    font-size: 14px;
}

.box1 .actions .button {
    border-radius: var(--radius-sm) !important;
    font-size: 14px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.box1 .actions .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(21, 131, 184, 0.35);
}

/* === بهبود فوتر === */
.footer {
    padding: 40px 0 20px;
}

.footer .inr .row > .columns > .large-6 {
    margin-bottom: 20px;
}

.footer .desc {
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

/* === بهبود نوار بالایی هدر === */
.top-bar-z {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
}


.top-bar-z .search .fa-search {
    position: absolute;
    right: 20px;
    top: 25%;
    color: var(--text-light) !important;
    cursor: pointer;
    transition: color 0.3s;
}

.top-bar-z .search .fa-search:hover {
    color: var(--primary) !important;
}

/* === بهبود بلوک آزمون === */
.content-z {
    margin-bottom: 25px;
}

.content-z > .row {
    gap: 20px;
}

/* استایل بلوک آزمون */
.content-z > .row > .blk:first-child {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #0A5477 100%) !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    color: var(--white);
    padding: 25px;
    box-shadow: 0 8px 30px rgba(21, 131, 184, 0.25) !important;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* افکت پس‌زمینه برای بلوک آزمون */
.content-z > .row > .blk:first-child::before {
    content: '\f128';
    font-family: 'FontAwesome';
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 140px;
    color: rgba(255, 255, 255, 0.06);
    transform: rotate(-15deg);
}

.content-z > .row > .blk:first-child .head {
    border-bottom: 2px solid rgba(255, 255, 255, 0.25) !important;
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.content-z > .row > .blk:first-child .head h3 {
    color: var(--white) !important;
    font-size: 20px !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-z > .row > .blk:first-child .head h3::before {
    content: '\f0eb';
    font-family: 'FontAwesome';
    font-size: 24px;
    color: var(--primary-light);
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.content-z > .row > .blk:first-child .btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    color: var(--white) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 14px 24px !important;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.content-z > .row > .blk:first-child .btn:hover {
    background: var(--white) !important;
    color: var(--primary) !important;
    border-color: var(--white) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.content-z > .row > .blk:first-child .btn i {
    font-size: 18px;
}

/* استایل بلوک فعال‌سازی کتاب */
.content-z > .row > .blk:nth-child(2) {
    background: linear-gradient(135deg, #48BB78 0%, #38A169 50%, #276749 100%) !important;
    border: none !important;
    border-radius: var(--radius-lg) !important;
    color: var(--white);
    padding: 25px;
    box-shadow: 0 8px 30px rgba(72, 187, 120, 0.25) !important;
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* افکت پس‌زمینه برای بلوک فعال‌سازی */
.content-z > .row > .blk:nth-child(2)::before {
    content: '\f02d';
    font-family: 'FontAwesome';
    position: absolute;
    left: -20px;
    bottom: -30px;
    font-size: 140px;
    color: rgba(255, 255, 255, 0.06);
    transform: rotate(15deg);
}

.content-z > .row > .blk:nth-child(2) .head {
    border-bottom: 2px solid rgba(255, 255, 255, 0.25) !important;
    padding-bottom: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.content-z > .row > .blk:nth-child(2) .head h3 {
    color: var(--white) !important;
    font-size: 20px !important;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-z > .row > .blk:nth-child(2) .head h3::before {
    content: '\f023';
    font-family: 'FontAwesome';
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    animation: iconPulse 2s ease-in-out infinite;
}

/* استایل فرم فعال‌سازی */
.content-z > .row > .blk:nth-child(2) form .row {
    position: relative;
    z-index: 1;
}

.content-z > .row > .blk:nth-child(2) .input-group {
    display: flex;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.content-z > .row > .blk:nth-child(2) input.form-control {
    flex: 1;
    border: none !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 14px 20px !important;
    font-size: 15px;
    color: var(--text-dark);
    border-radius: 0 !important;
    box-shadow: none !important;
}

.content-z > .row > .blk:nth-child(2) input.form-control::placeholder {
    color: var(--text-light);
}

.content-z > .row > .blk:nth-child(2) input.form-control:focus {
    background: var(--white) !important;
    box-shadow: none !important;
    outline: none;
}

.content-z > .row > .blk:nth-child(2) .input-group-btn {
    display: flex;
}

.content-z > .row > .blk:nth-child(2) .input-group-btn .btn {
    background: linear-gradient(135deg, #276749, #1a5c38) !important;
    border: none !important;
    color: var(--white) !important;
    border-radius: 0 !important;
    padding: 14px 28px !important;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: none !important;
    white-space: nowrap;
}

.content-z > .row > .blk:nth-child(2) .input-group-btn .btn:hover {
    background: linear-gradient(135deg, #1a5c38, #0f4228) !important;
    transform: none !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2) !important;
}

/* === بهبود content-center === */
.content-center {
    min-height: 300px;
}

/* === بهبود جداول === */
.table-striped tbody tr:nth-child(odd) {
    background: var(--bg-light);
}

.table-striped tbody tr:hover {
    background: var(--primary-lighter) !important;
}

/* === بهبود قدم‌های خرید === */
ul.step {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 20px;
}

ul.step li {
    flex: 1;
    min-width: 0;
}

ul.step li a,
ul.step li span {
    display: block;
    text-align: center;
    padding: 12px 15px !important;
    font-size: 14px !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* === ریسپانسیو همبرکر و منوی موبایل === */
@media (max-width: 768px) {
    .et-hamburger {
        display: block;
    }

    .top-bar-z {
        position: relative;
        padding: 8px 0;
    }

    /* تنظیم موقعیت آیکن کاربر و سبد خرید در موبایل */
    .top-bar-z > .row:first-child {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* آیکن کاربر و سبد خرید در سمت چپ */
    .top-bar-z .mobile-header-actions {
        order: -1;
        position: relative;
        z-index: 100002;
        width: 100%;
    }
    
    .top-bar-z .logo {
        order: 1;
        text-align: center;
    }
    
    .top-bar-z .search {
        order: 2;
    }

    .top-bar-z .account-nav .avatar img {
        width: 40px !important;
        height: 40px !important;
    }

    /* لوگو در وسط */
    .top-bar-z .logo {
        order: 0;
        text-align: center;
        margin-top: 8px;
    }

    .top-bar-z .logo .inr {
        justify-content: center;
    }

    .top-bar-z .logo .inr a {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .top-bar-z .logo .inr img {
        width: 40px !important;
        height: auto;
    }

    .top-bar-z .logo .inr {
        font-size: 13px;
    }

    /* ریسپانسیو بلوک‌های آزمون و فعال‌سازی */
    .content-z > .row {
        flex-direction: column;
        gap: 15px;
    }

    .content-z > .row > .blk:first-child,
    .content-z > .row > .blk:nth-child(2) {
        min-height: auto;
        padding: 20px;
    }

    .content-z > .row > .blk:first-child .head h3,
    .content-z > .row > .blk:nth-child(2) .head h3 {
        font-size: 18px !important;
    }

    .content-z > .row > .blk:first-child .btn {
        padding: 12px 20px !important;
        font-size: 14px;
        width: 100%;
    }

    .content-z > .row > .blk:nth-child(2) input.form-control {
        padding: 12px 16px !important;
        font-size: 14px;
    }

    .content-z > .row > .blk:nth-child(2) .input-group-btn .btn {
        padding: 12px 20px !important;
        font-size: 14px;
    }

    .blk ul.navbar {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .sidebar.blk nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }

    .sidebar.blk nav ul li {
        flex: 0 0 auto;
    }

    .sidebar.blk nav ul li a {
        padding: 8px 14px !important;
        font-size: 13px;
    }

    .box1 .price-w img {
        max-width: 200px !important;
        margin: 0 auto 15px !important;
        float: none !important;
    }

    .box1 .head-b .detail-b {
        text-align: center;
    }

    .box1 .actions .button {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }

    .footer {
        text-align: center;
    }

    .footer ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px 15px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blk ul.navbar {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    
    /* اصلاح اندازه کتاب در موبایل کوچک */
    .blk ul.navbar li.navs > div {
        border-radius: 8px !important;
    }
    
    .blk ul.navbar li.navs > div img.cover-b {
        aspect-ratio: 2/3;
        object-fit: contain;
    }

    .et-mobile-menu {
        width: 260px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .blk ul.navbar {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* ============================================
   بهبود صفحه فهرست محصولات (Category Page)
   ============================================ */

/* === لیست محصولات - طراحی مدرن === */
.category-b {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    width: 100% !important;
}

.category-b > li {
    background: var(--white) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    border: 1px solid var(--border-color) !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.category-b > li:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-6px) !important;
    border-color: var(--primary-light) !important;
}

.category-b > li .list-item-b {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: visible !important;
}

.category-b > li .list-item-b a {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

/* === رفع مشکل ستون‌های Foundation Grid === */
.category-b > li .list-item-b a > .columns {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* === تصویر محصول === */
.category-b .preview-b {
    position: relative;
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    overflow: hidden;
}

.category-b .preview-b img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 180px;
    max-height: 240px !important;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-b > li:hover .preview-b img {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 8px 25px rgba(21, 131, 184, 0.2);
}

/* === ربان تخفیف === */
.category-b .preview-b .ribbon {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
}

/* === جزئیات محصول === */
.category-b .detail-b {
    margin: 0 !important;
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-b .detail-b h2 {
    font-size: 16px !important;
    font-weight: 700;
    color: var(--text-dark) !important;
    line-height: 1.6;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.category-b > li:hover .detail-b h2 {
    color: var(--primary) !important;
}

.category-b .detail-b .intro {
    margin: 0 !important;
}

.category-b .detail-b .intro p {
    color: var(--text-light) !important;
    font-size: 13px;
    line-height: 1.8;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* === قیمت و تخفیف === */
.category-b .detail-b .price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.category-b .detail-b .price-original {
    color: var(--text-light);
    font-size: 14px;
    text-decoration: line-through;
}

.category-b .detail-b .price-final {
    color: var(--primary);
    font-size: 18px;
    font-weight: 700;
}

.category-b .detail-b .discount-badge {
    background: linear-gradient(135deg, #E53E3E 0%, #FC8181 100%);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

/* === دکمه‌ها === */
.category-b .detail-b .actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.category-b .detail-b .actions .button {
    flex: 1;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 600;
    border-radius: var(--radius-sm) !important;
    text-align: center;
    transition: all 0.3s ease;
}

/* === ریسپانسیو - موبایل === */
@media (max-width: 768px) {
    .category-b {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .category-b > li {
        border-radius: var(--radius-md) !important;
    }

    .category-b .preview-b {
        min-height: 200px;
        padding: 15px;
    }

    .category-b .preview-b img {
        max-height: 180px !important;
    }

    .category-b .detail-b {
        padding: 15px;
        gap: 10px;
    }

    .category-b .detail-b h2 {
        font-size: 14px !important;
    }

    .category-b .detail-b .intro p {
        font-size: 12px;
    }

    .category-b .detail-b .price-final {
        font-size: 16px;
    }

    .category-b .detail-b .actions {
        flex-direction: column;
    }

    .category-b .detail-b .actions .button {
        width: 100%;
    }
}

/* === ریسپانسیو - موبایل کوچک === */
@media (max-width: 480px) {
    .category-b {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .category-b .preview-b {
        min-height: 180px;
    }

    .category-b .detail-b h2 {
        -webkit-line-clamp: 3;
    }

    .category-b .detail-b .intro p {
        -webkit-line-clamp: 3;
    }
}

/* === ریسپانسیو - تبلت === */
@media (min-width: 769px) and (max-width: 1024px) {
    .category-b {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 16px !important;
    }
}

/* === ریسپانسیو - دسکتاپ بزرگ === */
@media (min-width: 1441px) {
    .category-b {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
        gap: 24px !important;
    }
}
