﻿
/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;

}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

    .btn:hover {
        background-color: #2980b9;
        transform: translateY(-2px);
    }

/* هدر */
header {
    background-color: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* استایل دکمه های ورود و ثبت نام */
.auth-buttons {
    display: flex;
    gap: 12px;
    margin-left: 20px;
}

.auth-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
}
    .auth-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.7s ease;
    }

    .auth-btn:hover::before {
        left: 100%;
    }
.login-btn {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-color: #3b82f6;
    color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

    .login-btn:hover {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
        border-color: transparent;
    }

.register-btn {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border-color: #3b82f6;
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

    .register-btn:hover {
        background: linear-gradient(135deg, #2563eb, #1d4ed8);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    }
.header-action-item#cart-toggle {
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: transparent;
}

    .header-action-item#cart-toggle:hover {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        transform: translateY(-2px);
    }

    .header-action-item#cart-toggle::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0;
        height: 2px;
        background: linear-gradient(90deg, #3b82f6, #10b981);
        transition: width 0.3s ease;
    }

    .header-action-item#cart-toggle:hover::after {
        width: 100%;
    }

/* استایل لینک های منوی کاربری */
.user-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.3s ease;
}

    .user-dropdown li a:hover {
        background-color: #f8f9fa;
    }

/* برای نمایش مناسب در موبایل */
@media (max-width: 768px) {
    .auth-buttons {
        display: none;
    }
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

    .logo i {
        margin-left: 8px;
        font-size: 28px;
        color: var(--secondary-color);
    }

.logo-text {
    display: inline-block;
}

.slogan {
    margin-right: 15px;
    height: 40px;
}

    .slogan img {
        height: 100%;
        width: auto;
    }

.search-box {
    flex-grow: 1;
    max-width: 400px;
    margin: 0 20px;
    position: relative;
}

    .search-box input {
        width: 100%;
        padding: 10px 40px 10px 15px;
        border: 1px solid #ddd;
        border-radius: 20px;
        outline: none;
    }

    .search-box i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: #777;
    }

.header-actions {
    display: flex;
    align-items: center;
}

.header-action-item {
    margin-left: 15px;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .header-action-item:hover {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    }

    .header-action-item i {
        margin-left: 8px;
        font-size: 18px;
        transition: all 0.3s ease;
    }
    .header-action-item:hover i {
        color: #3b82f6;
        transform: scale(1.1);
    }

    .header-action-item span {
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .header-action-item:hover span {
        color: #3b82f6;
    }

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}
.user-menu {
    position: relative;
    padding: 10px 16px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 1px solid #e2e8f0;
    margin-left: 10px;
}

    .user-menu:hover {
        background: linear-gradient(135deg, #3b82f6, #2563eb);
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
        border-color: #3b82f6;
    }

        .user-menu:hover i,
        .user-menu:hover span {
            color: white;
        }
        .user-menu:hover .user-dropdown::before {
            opacity: 1;
        }
.user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    width: 260px;
    padding: 12px 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(-15px) scale(0.95);
    border: 1px solid #f1f5f9;
    z-index: 1000;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}
.user-menu:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px) scale(1);
}
.user-dropdown::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #3b82f6, #10b981, #f59e0b, #ef4444);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientShift 3s ease infinite;
}
@keyframes gradientShift {
    0%, 100% {
        background: linear-gradient(135deg, #3b82f6, #10b981, #f59e0b, #ef4444);
    }

    25% {
        background: linear-gradient(135deg, #10b981, #f59e0b, #ef4444, #3b82f6);
    }

    50% {
        background: linear-gradient(135deg, #f59e0b, #ef4444, #3b82f6, #10b981);
    }

    75% {
        background: linear-gradient(135deg, #ef4444, #3b82f6, #10b981, #f59e0b);
    }
}
.user-dropdown li {
    margin: 0;
    padding: 0;
    position: relative;
    overflow: hidden;
}

    .user-dropdown li a {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 24px;
        text-decoration: none;
        color: #475569;
        font-weight: 600;
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
        border-left: 4px solid transparent;
        font-size: 14px;
    }
        .user-dropdown li a::before {
            content: '';
            position: absolute;
            top: 0;
            right: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
            transition: right 0.6s ease;
        }

        .user-dropdown li a:hover {
            background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
            color: #1e40af;
            border-left-color: #3b82f6;
            transform: translateX(8px);
            padding-right: 32px;
        }
            .user-dropdown li a:hover::before {
                right: 100%;
            }
        .user-dropdown li a i {
            width: 20px;
            text-align: center;
            font-size: 18px;
            transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            color: #64748b;
        }

        .user-dropdown li a:hover i {
            transform: scale(1.3);
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
        }
        .user-dropdown li a:active {
            transform: translateX(5px) scale(0.98);
        }
    /* افکت خاص برای هر آیتم منو */
    .user-dropdown li:first-child a:hover i {
        color: #3b82f6;
        transform: rotate(20deg) scale(1.3);
    }

    .user-dropdown li:nth-child(2) a:hover i {
        color: #f59e0b;
        transform: rotate(-15deg) scale(1.3);
    }

    .user-dropdown li:nth-child(3) a:hover i {
        color: #ef4444;
        transform: scale(1.3);
        animation: heartbeat 1.2s ease infinite;
    }

    .user-dropdown li:last-child a:hover i {
        color: #64748b;
        transform: translateX(-5px) scale(1.3);
    }
    .user-dropdown li:not(:last-child)::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 24px;
        left: 24px;
        height: 1px;
        background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    }
    .user-dropdown li a:active {
        transform: translateX(8px) scale(0.98);
        transition: transform 0.1s ease;
    }
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1.5);
    }
}

/* اسلایدر */
.slider {
    height: 400px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
    border-radius: 8px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

    .slide.active {
        opacity: 1;
    }

.slide-img {
    width: 100%;
    height: 100%;
    display: block;
}

.slide-content {
    position: absolute;
    bottom: 50px;
    right: 50px;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
}

    .slide-content h2 {
        color: var(--primary-color);
        margin-bottom: 10px;
    }

.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

    .slider-indicator.active {
        background-color: white;
    }

/* تبلیغات */
.ad-banner {
    background-color: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
}

/* محصولات تخفیف‌دار */
.section-title {
    position: relative;
    margin: 0 !important; /* حذف margin قبلی */
    padding-bottom: 10px;
    font-size: 22px;
    color: var(--primary-color);
    flex-grow: 1; /* اضافه کردن این خط */
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 3px;
        background-color: var(--secondary-color);
    }
/* استایل برای هدر بخش‌ها با دکمه مشاهده بیشتر */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 20px;
    position: relative;
    flex-direction: row; /* اضافه کردن این خط */
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap; /* جلوگیری از شکستن خط */
    margin-left: auto; /* اضافه کردن این خط */
    margin-right: 20px; /* فاصله از عنوان */
}

    .view-more-btn i {
        margin-right: 5px;
        font-size: 12px;
    }
    .view-more-btn:hover {
        background-color: #2980b9;
        transform: translateX(-5px);
        color: white;
    }
.products-slider {
    position: relative;
    overflow: hidden;
}

.products-container {
    display: flex;
    transition: transform 0.5s ease;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
    scrollbar-width: none; /* برای فایرفاکس */
}

    .products-container::-webkit-scrollbar {
        display: none;
    }
/* استایل برای حالت لودینگ قبل از دریافت داده‌ها */
.product-card.loading {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 350px;
    position: relative;
    overflow: hidden;
}

    .product-card.loading::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        animation: loading 1.5s infinite;
        z-index: 2;
    }

.product-img.loading {
    background-color: #e0e0e0;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .product-img.loading::after {
        content: 'در حال بارگذاری...';
        color: #999;
        font-size: 14px;
        position: relative;
        z-index: 1;
    }


.product-info .product-title {
    background-color: white;
    height: 25px;
    border-radius: 4px;
    margin-bottom: 10px;
}
.product-info .product-buttons {
    margin-top: auto;
}
.product-price .original-price,
.product-price .current-price {
    background-color:white;
    height: 15px;
    border-radius: 4px;
    margin-bottom: 5px;
    width: 100%;
}
.product-card {
    flex: 0 0 280px;
    padding: 0 10px;
    height: 100%;
    display: flex;
}

.product-inner {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

    .product-inner:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    }

/* استایل برای حالت لودینگ خواندنی‌ها */
.reading-card.loading {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 350px;
    position: relative;
    overflow: hidden;
}

    .reading-card.loading::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        animation: loading 1.5s infinite;
        z-index: 2;
    }

.reading-image.loading {
    background-color: #e0e0e0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

    .reading-image.loading::after {
        content: 'در حال بارگذاری...';
        color: #999;
        font-size: 14px;
        position: relative;
        z-index: 1;
    }

.reading-content {
    padding: 15px;
    position: relative;
}

.loading-title {
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
    width: 80%;
}

.loading-text {
    height: 60px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 15px;
}

.loading-meta {
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 4px;
    width: 40%;
    display: inline-block;
}

.reading-meta .loading-meta:first-child {
    margin-left: 15px;
}

/* انیمیشن لودینگ */
@keyframes loading {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}
/* اطمینان از اینکه تصویر کل پهنای کارت را می‌گیرد */
.product-img img,
.reading-image img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-img i {
        color: var(--secondary-color);
    }

.product-inner:hover .product-img i {
    transform: scale(1.05);
}

.product-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: var(--transition);
    z-index: 5;
}

.product-inner:hover .product-actions {
    opacity: 1;
}

.product-action {
    width: 32px;
    height: 32px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-size: 14px;
}

    .product-action:hover {
        background-color: var(--secondary-color);
        color: white;
    }

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--accent-color);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.rating {
    position: absolute;
    bottom: 170px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    transition: var(--transition);
}

.product-inner:hover .rating {
    opacity: 1;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-weight: 600;
    margin-bottom: 10px;
    min-height: 50px;
    max-height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.2;
}

.product-price {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 10px;
}

.current-price {
    font-weight: bold;
    font-size: 18px;
    color: var(--accent-color);
    line-height: 1.2;
}

.original-price {
    text-decoration: line-through;
    color: #777;
    font-size: 14px;
    margin-bottom: 2px;
}

.price-unit {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}

.add-to-cart {
    width: 100%;
    padding: 8px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
}

    .add-to-cart i {
        margin-left: 5px;
    }

    .add-to-cart:hover {
        background-color: #2980b9;
    }

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 10;
}

.products-slider:hover .slider-nav {
    opacity: 1;
}

.slider-nav.prev {
    right: -40px;
}

.slider-nav.next {
    left: -40px;
}
.slider-nav.prev-new {
    right: -10px;
}

.slider-nav.next-new {
    left: -10px;
}
/* مطالب ویژه */
.featured-posts {
    display: flex;
    margin: 40px 0;
    gap: 20px;
}

.featured-post {
    flex: 1;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

    .featured-post.visible {
        opacity: 1;
        transform: translateX(0);
    }

    .featured-post:nth-child(even) {
        transform: translateX(-50px);
    }

        .featured-post:nth-child(even).visible {
            transform: translateX(0);
        }

.post-content {
    padding: 20px;
}

    .post-content h3 {
        margin-bottom: 10px;
        color: var(--primary-color);
    }

.post-image {
    height: 200px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .post-image i {
        font-size: 64px;
        color: var(--secondary-color);
    }

.featured-post:hover .post-image i {
    transform: scale(1.05);
}

/* بخش "چرا سیویل روم" */
.why-us {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 40px 0;
    text-align: center;
}

    .why-us h2 {
        color: var(--primary-color);
        margin-bottom: 30px;
    }

.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
}

.feature {
    flex: 0 0 30%;
    padding: 20px;
    margin-bottom: 20px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
    color: var(--secondary-color);
}

/* خواندنی‌ها */
.readings {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.reading-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

    .reading-card:hover {
        transform: translateY(-5px);
    }

.reading-image {
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .reading-image i {
        font-size: 48px;
        color: var(--secondary-color);
    }

.reading-card:hover .reading-image i {
    transform: scale(1.05);
}

.reading-content {
    padding: 15px;
}

    .reading-content h3 {
        margin-bottom: 10px;
        color: var(--primary-color);
    }
    .reading-content p {
        min-height: 60px;
    }
.reading-meta {
    display: flex;
    justify-content: space-between;
    color: #777;
    font-size: 14px;
    margin-top: 10px;
}

/* بخش اعلانات */
.announcements {
    background-color: var(--primary-color);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin: 40px 0;
}

    .announcements h2 {
        margin-bottom: 20px;
        text-align: center;
    }

.announcement-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.announcement {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 4px;
    transition: var(--transition);
}

    .announcement:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .announcement strong {
        display: block;
        margin-bottom: 5px;
    }

/* فوتر */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 40px 0 0;
    width: 100%;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex: 0 0 23%;
    margin-bottom: 30px;
}

    .footer-column h3 {
        margin-bottom: 20px;
        position: relative;
        padding-bottom: 10px;
    }

        .footer-column h3::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 30px;
            height: 2px;
            background-color: var(--secondary-color);
        }

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    transition: var(--transition);
}

    .footer-links a:hover {
        color: var(--secondary-color);
        padding-right: 5px;
    }

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

    .social-link:hover {
        background-color: var(--secondary-color);
        transform: translateY(-3px);
    }

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    text-align: center;
    margin-top: 30px;
    width: 100%;
    position: relative;
    bottom: 0;
}

/* پشتیبانی و بازگشت به بالا */
.support-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 1000;
    transition: var(--transition);
}

    .support-fab:hover {
        background-color: #2980b9;
        transform: scale(1.1);
    }

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background-color: #c0392b;
    }

/* پنل گفتگو */
.chat-panel {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 350px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

    .chat-panel.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

.chat-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    cursor: pointer;
}

.chat-body {
    padding: 15px;
    height: 300px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
}

    .chat-message.support {
        justify-content: flex-start;
    }

    .chat-message.user {
        justify-content: flex-end;
    }

.message-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
}

.support .message-bubble {
    background-color: #f0f0f0;
    border-top-right-radius: 0;
}

.user .message-bubble {
    background-color: var(--secondary-color);
    color: white;
    border-top-left-radius: 0;
}

.chat-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
}

    .chat-footer input {
        flex-grow: 1;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 20px;
        outline: none;
    }

    .chat-footer button {
        margin-right: 10px;
        background: none;
        border: none;
        color: var(--secondary-color);
        cursor: pointer;
    }

/* استایل‌های موبایل */
@media (max-width: 768px) {
    body {
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 70px; /* برای منوی موبایل */
    }
    .product-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .add-to-cart,
    .view-product {
        flex: none;
        width: 100%;
    }
    .container {
        padding: 0 15px;
        width: 100%;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .logo-area {
        order: 1;
        flex: 0 0 50%;
    }

    .logo-text {
        display: none;
    }

    .search-box {
        order: 3;
        flex: 0 0 100%;
        margin: 15px 0 0;
        max-width: 100%;
    }

    .header-actions {
        order: 2;
        flex: 0 0 50%;
        justify-content: flex-end;
    }

    .auth-buttons {
        display: none;
    }

    .header-action-item {
        padding: 6px 10px;
    }

        .header-action-item span {
            display: none;
        }

    .user-menu {
        padding: 8px 12px;
        margin-left: 5px;
    }

        .user-menu span {
            display: none;
        }

    .user-dropdown {
        width: 220px;
        right: 0;
        left: auto;
    }

        .user-dropdown li a {
            padding: 12px 20px;
            font-size: 13px;
        }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-more-btn {
        margin-left: 0;
        margin-top: -40px;
        align-self: flex-end;
    }
    .product-card {
        flex: 0 0 85%;
    }

    .featured-posts {
        flex-direction: column;
    }

    .feature {
        flex: 0 0 100%;
    }

    .footer-column {
        flex: 0 0 48%;
    }

    .chat-panel {
        width: calc(100% - 40px);
        left: 20px;
        right: 20px;
        bottom: 80px;
    }

    .support-fab {
        bottom: 75px;
        left: 20px;
    }

    .cart-drawer {
        width: 90%;
        left: -90%;
    }

    .slide-content {
        right: 20px;
        bottom: 20px;
        max-width: 80%;
        padding: 15px;
    }

    .slider-nav {
        display: none;
    }

    .slider-indicators {
        bottom: 10px;
    }

    /* منوی موبایل در فوتر */
    .mobile-footer-menu {
        display: flex;
        justify-content: space-around;
        background-color: var(--dark-color);
        padding: 10px 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100%;
    }

    .mobile-menu-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: white;
        font-size: 12px;
        flex: 1;
        padding: 5px;
    }

        .mobile-menu-item i {
            font-size: 20px;
            margin-bottom: 5px;
        }

    .desktop-footer {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-footer-menu {
        display: none;
    }
}

@media (max-width: 480px) {
    .slide-content {
        right: 15px;
        bottom: 15px;
        max-width: 85%;
        padding: 12px;
    }

        .slide-content h2 {
            font-size: 18px;
        }

    .product-card {
        flex: 0 0 90%;
    }

    .footer-column {
        flex: 0 0 100%;
    }

    .chat-panel {
        bottom: 120px;
    }

    .why-us {
        padding: 20px;
    }

    .feature {
        flex: 0 0 100%;
    }
}


/* استایل تبلیغات جدید */
.ad-banner {
    background: linear-gradient(135deg, var(--primary-color), #1a2530);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 12px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.ad-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: pulse 6s infinite linear;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    }
}

.ad-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}

    .ad-content h2::after {
        content: '';
        position: absolute;
        bottom: -5px;
        right: 0;
        width: 100%;
        height: 2px;
        background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    }

.ad-content p {
    margin-bottom: 25px;
    opacity: 0.9;
    font-size: 16px;
}

.ad-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ad-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 200px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

    .ad-btn::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;
    }

    .ad-btn:hover::before {
        left: 100%;
    }

    .ad-btn:hover {
        transform: translateY(-5px);
        border-color: var(--secondary-color);
        box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
        background: rgba(255, 255, 255, 0.15);
    }

    .ad-btn i {
        font-size: 32px;
        margin-bottom: 10px;
        transition: transform 0.3s ease;
    }

    .ad-btn:hover i {
        transform: scale(1.2);
    }

    .ad-btn span {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 5px;
    }

    .ad-btn small {
        font-size: 12px;
        opacity: 0.8;
    }

/* استایل‌های خاص برای هر دکمه */
.webinar-btn {
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
    border-color: rgba(231, 76, 60, 0.4);
}

    .webinar-btn:hover {
        border-color: #e74c3c;
        box-shadow: 0 10px 25px rgba(231, 76, 60, 0.3);
    }

.product-btn {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.2));
    border-color: rgba(52, 152, 219, 0.4);
}

    .product-btn:hover {
        border-color: #3498db;
        box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
    }

/* ریسپانسیو */
@media (max-width: 768px) {
    .ad-buttons {
        flex-direction: column;
        align-items: center;
    }

    .ad-btn {
        min-width: 250px;
        width: 100%;
        max-width: 300px;
    }

    .ad-content h2 {
        font-size: 24px;
    }

    .ad-banner {
        padding: 20px 15px;
    }
}

@media (max-width: 480px) {
    .ad-btn {
        padding: 15px 20px;
        min-width: 200px;
    }

        .ad-btn span {
            font-size: 16px;
        }

        .ad-btn i {
            font-size: 28px;
        }
}


/* استایل‌های صفحه محصولات */

/* هدر صفحه */
.page-header {
    margin: 30px 0;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.page-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    color: #777;
    font-size: 14px;
}

    .breadcrumb a {
        color: var(--secondary-color);
        transition: var(--transition);
    }

        .breadcrumb a:hover {
            color: var(--primary-color);
        }

    .breadcrumb i {
        margin: 0 10px;
        font-size: 12px;
    }

/* طرح‌بندی اصلی محصولات */
.products-page {
    display: flex;
    gap: 30px;
    margin: 40px 0;
}

.products-sidebar {
    flex: 0 0 280px;
}

.products-main {
    flex: 1;
}

/* استایل‌های سایدبار فیلتر */
.filter-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

    .filter-header h3 {
        color: var(--primary-color);
        font-size: 18px;
    }

.clear-filters {
    background: none;
    border: none;
    color: var(--accent-color);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

    .clear-filters:hover {
        color: #c0392b;
    }

.filter-group {
    margin-bottom: 20px;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.filter-title {
    padding: 15px;
    background: #f9f9f9;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

    .filter-title:hover {
        background: #f0f0f0;
    }

    .filter-title.active {
        background: var(--light-color);
    }

    .filter-title h4 {
        margin: 0;
        font-size: 14px;
        color: var(--primary-color);
    }

.filter-content {
    padding: 15px;
    display: none;
}

.filter-group:first-child .filter-content {
    display: block;
}

.filter-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.filter-checkbox {
    margin-left: 10px;
}

.filter-option label {
    cursor: pointer;
    font-size: 14px;
}

/* فیلتر قیمت */
.price-range {
    padding: 10px 0;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

    .price-inputs input {
        width: 80px;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        text-align: center;
    }

    .price-inputs span {
        color: #777;
        font-size: 12px;
    }

.price-slider {
    position: relative;
    height: 5px;
    background: #ddd;
    border-radius: 5px;
    margin: 20px 0;
}

.slider-track {
    position: absolute;
    height: 100%;
    background: var(--secondary-color);
    border-radius: 5px;
}

.range-min,
.range-max {
    position: absolute;
    top: -5px;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
}

    .range-min::-webkit-slider-thumb,
    .range-max::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: var(--secondary-color);
        border-radius: 50%;
        cursor: pointer;
        pointer-events: all;
    }

.apply-filters {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 20px;
}

    .apply-filters:hover {
        background: #2980b9;
    }

/* هدر محصولات */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.products-info {
    color: #777;
    font-size: 14px;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
}

/* گرید محصولات */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 20px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

    .pagination-btn:hover:not(.disabled) {
        background: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
    }

    .pagination-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.pagination-numbers {
    display: flex;
    gap: 5px;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

    .page-number:hover,
    .page-number.active {
        background: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
    }

.page-dots {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

/* استایل‌های لودینگ */
.loading-title {
    height: 20px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 10px;
    animation: pulse 1.5s infinite;
}

.loading-price {
    height: 15px;
    background: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 5px;
    width: 50px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* پیغام خطا */
.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--accent-color);
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .products-page {
        flex-direction: column;
    }

    .products-sidebar {
        flex: none;
        margin-bottom: 20px;
    }

    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .filter-section {
        position: static;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .page-number {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }
}

/* استایل‌های لوگو و افکت‌های هدر - نسخه مطمئن */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: var(--transition);
}

.logo {
    position: relative;
    overflow: hidden;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-hover-effect {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: var(--transition);
    border-radius: 2px;
}

.logo-link:hover .logo-hover-effect {
    width: 100%;
}

.logo-link:hover .logo i {
    transform: rotate(15deg) scale(1.1);
    color: var(--secondary-color);
    text-shadow: 0 0 15px rgba(52, 152, 219, 0.6);
}

.logo-link:hover .logo-text {
    color: var(--secondary-color);
    transform: translateX(-3px);
}

/* انیمیشن برای آیکون لوگو */
.logo i {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-size: 28px;
    color: var(--secondary-color);
}

.logo-text {
    transition: var(--transition);
    font-weight: 700;
    font-size: 24px;
    color: var(--primary-color);
    position: relative;
}

/* افکت glow روی هور */
.logo-link:hover .logo {
    filter: drop-shadow(0 0 8px rgba(52, 152, 219, 0.3));
}

/* افکت پالس ملایم برای لوگو */
@keyframes logoPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.logo-link:hover .logo {
    animation: logoPulse 2s infinite;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
    .logo-text {
        display: inline-block;
    }

    .logo i {
        font-size: 24px;
    }

    .logo-text {
        font-size: 20px;
    }
}
.product-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    width: 100%;
}

.add-to-cart {
    flex: 2;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--transition);
    font-size: 14px;
    min-height: 44px;
}

.view-product {
    flex: 1;
    background: #28a745;
    color: white;
    text-decoration: none;
    padding: 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    transition: var(--transition);
    font-size: 14px;
    min-height: 44px;
}

.add-to-cart:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.view-product:hover {
    background: #218838;
    color: white;
    transform: translateY(-2px);
}

/* استایل‌های بهبود یافته برای دراور سبد خرید */
.cart-drawer {
    position: fixed;
    top: 0;
    left: -400px;
    width: 380px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1100;
    transition: var(--transition);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

    .cart-drawer.open {
        left: 0;
    }

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.cart-close {
    cursor: pointer;
    font-size: 20px;
    transition: var(--transition);
    padding: 5px;
    border-radius: 4px;
}

    .cart-close:hover {
        background-color: #f5f5f5;
        transform: rotate(90deg);
    }

.cart-items {
    margin-bottom: 20px;
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.cart-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    transition: var(--transition);
}

    .cart-item:hover {
        background-color: #f9f9f9;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 10px;
        transform: translateX(5px);
    }

.cart-item-img {
    width: 80px;
    height: 80px;
    margin-left: 15px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    position: relative;
}
    .cart-item-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
.cart-item:hover .cart-item-img {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cart-item-img i {
    font-size: 32px;
    color: var(--secondary-color);
    transition: var(--transition);
}

.cart-item:hover .cart-item-img i {
    transform: rotate(10deg) scale(1.1);
    color: var(--accent-color);
}

.cart-item-details {
    flex-grow: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: var(--transition);
}

.cart-item:hover .cart-item-title {
    color: var(--secondary-color);
}

.cart-item-price {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 16px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

    .quantity-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .quantity-btn:hover::before {
        left: 100%;
    }

    .quantity-btn:hover {
        background: var(--secondary-color);
        color: white;
        border-color: var(--secondary-color);
        transform: scale(1.1);
        box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
    }

    .quantity-btn:active {
        transform: scale(0.95);
    }

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 6px;
    font-weight: bold;
    transition: var(--transition);
    background: #f9f9f9;
}

.cart-item:hover .quantity-input {
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-item-remove {
    color: #ff6b6b;
    cursor: pointer;
    align-self: flex-start;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 6px;
    margin-right: 5px;
    position: relative;
    overflow: hidden;
}

    .cart-item-remove::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 107, 107, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .cart-item-remove:hover::before {
        left: 100%;
    }

    .cart-item-remove:hover {
        background: #ff6b6b;
        color: white;
        transform: rotate(90deg) scale(1.1);
        box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
    }

.cart-footer {
    margin-top: auto;
    padding: 15px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

    .cart-total:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

    .checkout-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.7s ease;
    }

    .checkout-btn:hover::before {
        left: 100%;
    }

    .checkout-btn:hover {
        background: linear-gradient(135deg, #2980b9, var(--secondary-color));
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
    }

    .checkout-btn:active {
        transform: translateY(-1px);
    }

.empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #777;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

    .empty-cart i {
        font-size: 48px;
        color: #ddd;
        margin-bottom: 10px;
    }

/* استایل برای آیتم‌های سبد خرید در حالت لودینگ */
.cart-item.loading {
    pointer-events: none;
}

    .cart-item.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
        animation: loading-shine 1.5s infinite;
    }

@keyframes loading-shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* انیمیشن برای اضافه شدن آیتم جدید */
@keyframes itemAdded {
    0% {
        transform: translateX(-20px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.cart-item.new-item {
    animation: itemAdded 0.5s ease-out;
}

/* انیمیشن برای حذف آیتم */
@keyframes itemRemoved {
    0% {
        transform: translateX(0);
        opacity: 1;
        max-height: 100px;
    }

    100% {
        transform: translateX(100%);
        opacity: 0;
        max-height: 0;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

.cart-item.removing {
    animation: itemRemoved 0.4s ease-in forwards;
}

/* استایل برای موبایل */
@media (max-width: 768px) {
    .cart-drawer {
        width: 90%;
        left: -90%;
    }

    .cart-item {
        padding: 12px 8px;
    }

    .cart-item-img {
        width: 60px;
        height: 60px;
        margin-left: 10px;
    }

        .cart-item-img i {
            font-size: 24px;
        }

    .quantity-btn {
        width: 28px;
        height: 28px;
    }

    .quantity-input {
        width: 40px;
    }
}

/* استایل Toast */
.toast-container {
    position: fixed;
    top: 150px; /* فاصله از بالای صفحه برای جلوگیری از تداخل با هدر */
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999; /* افزایش z-index */
    width: 90%;
    max-width: 400px;
}

.toast {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
    z-index: 10000; /* افزایش بیشتر برای اطمینان */
}

.toast-success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border-right: 5px solid #388E3C;
}

.toast-error {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
    border-right: 5px solid #c62828;
}

.toast-warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border-right: 5px solid #ef6c00;
}

.toast-info {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    border-right: 5px solid #1565C0;
}

.toast-message {
    flex: 1;
    margin-left: 15px;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

    .toast-close:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.toast.hiding {
    animation: slideUp 0.3s ease forwards;
}
