﻿.cart-item {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

    .cart-item:hover {
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }

.product-image {
    width: 120px;
    height: 120px;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #eee;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

        .product-image img:hover {
            transform: scale(1.05);
        }

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.6;
}

    .product-title a {
        color: #333;
        text-decoration: none;
        transition: color 0.3s ease;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

        .product-title a:hover {
            color: #007bff;
        }

/* استایل قیمت‌ها */
.price-box {
    margin: 10px 0;
}

.original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    margin-left: 10px;
}

.final-price {
    color: #28a745;
    font-size: 18px;
    font-weight: 700;
    display: inline-block;
}

.discount-badge {
    background: linear-gradient(45deg, #dc3545, #ff6b6b);
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    margin-right: 10px;
}

/* استایل تایمر */
.offer-timer {
    background: #fff3f3;
    padding: 10px 15px;
    border-radius: 30px;
    margin: 10px 0;
    display: inline-block;
    border: 1px solid #ffcdcd;
}

.offer-badge {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 10px;
    display: inline-block;
}

.countdown-timer {
    color: #dc3545;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    background: #ffe6e6;
    padding: 5px 12px;
    border-radius: 20px;
}

/* استایل اطلاعات محصول */
.limit-info, .stock-info, .quantity-info {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .limit-info i, .stock-info i, .quantity-info i {
        color: #007bff;
    }

/* استایل کنترل تعداد */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 5px;
    border-radius: 40px;
    border: 1px solid #e9ecef;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #495057;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

    .quantity-btn:hover {
        background: #007bff;
        color: white;
        transform: scale(1.1);
    }

    .quantity-btn:active {
        transform: scale(0.95);
    }

.quantity-input {
    width: 60px;
    height: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 5px;
}

    .quantity-input:focus {
        outline: none;
        border-bottom: 2px solid #007bff;
    }

/* استایل دکمه‌های اقدام */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .action-buttons .btn {
        border-radius: 30px;
        padding: 10px 15px;
        font-size: 14px;
        font-weight: 500;
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid transparent;
    }

.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
    background: transparent;
}

    .btn-outline-danger:hover {
        background: #dc3545;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(220,53,69,0.3);
    }

.btn-outline-warning {
    border-color: #ffc107;
    color: #ffc107;
    background: transparent;
}

    .btn-outline-warning:hover {
        background: #ffc107;
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255,193,7,0.3);
    }

.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

    .btn-success:hover {
        background: #218838;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40,167,69,0.3);
    }

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

    .btn-danger:hover {
        background: #c82333;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(220,53,69,0.3);
    }

/* استایل باکس خلاصه سبد خرید */
.cart-canvases {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.factor {
    padding: 15px 0;
}

.factor-item {
    padding: 10px 0;
    border-bottom: 1px dashed #e9ecef;
}

    .factor-item:last-child {
        border-bottom: none;
    }

    .factor-item h6 {
        color: #495057;
        font-size: 15px;
    }

    .factor-item p {
        color: #212529;
        font-weight: 600;
        font-size: 16px;
    }

.total-price {
    color: #6c757d !important;
}

.total-discount {
    color: #dc3545 !important;
}

.final-price {
    color: #28a745 !important;
    font-size: 20px !important;
}

.checkout-btn {
    padding: 15px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s ease;
}

    .checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(0,123,255,0.4);
    }

/* استایل تب‌ها */
.nav-tabs {
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 25px;
}

    .nav-tabs .nav-link {
        border: none;
        color: #6c757d;
        font-weight: 600;
        padding: 12px 25px;
        margin-left: 5px;
        border-radius: 30px 30px 0 0;
        transition: all 0.3s ease;
        position: relative;
    }

        .nav-tabs .nav-link:hover {
            color: #007bff;
            background: rgba(0,123,255,0.05);
        }

        .nav-tabs .nav-link.active {
            color: #007bff;
            background: transparent;
            border-bottom: 3px solid #007bff;
        }

            .nav-tabs .nav-link.active::after {
                content: '';
                position: absolute;
                bottom: -2px;
                left: 0;
                right: 0;
                height: 3px;
                background: #007bff;
                border-radius: 3px 3px 0 0;
            }

/* استایل دراپ‌داون */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 8px;
}

.dropdown-item {
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 14px;
    color: #495057;
    transition: all 0.2s ease;
}

    .dropdown-item:hover {
        background: #f8f9fa;
        color: #007bff;
        transform: translateX(-5px);
    }

    .dropdown-item i {
        margin-left: 8px;
    }

.btn[data-bs-toggle="dropdown"] {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

    .btn[data-bs-toggle="dropdown"]:hover {
        background: #f0f0f0;
    }

/* استایل حالت خالی */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

    .empty-cart i {
        font-size: 80px;
        color: #dee2e6;
        margin-bottom: 20px;
    }

    .empty-cart p {
        color: #6c757d;
        font-size: 16px;
        margin-bottom: 20px;
    }

    .empty-cart .btn {
        padding: 2px 5px !important;
        border-radius: 30px;
        font-weight: 600;
    }

/* استایل خرید بعدی */
.next-cart-item {
    opacity: 0.9;
}

.move-all-to-cart {
    text-decoration: none;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 30px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    display: inline-block;
}

    .move-all-to-cart:hover {
        background: #007bff;
        color: white !important;
    }

/* استایل ریسپانسیو */
@media (max-width: 768px) {
    .cart-item {
        padding: 15px;
    }

    .product-image {
        width: 80px;
        height: 80px;
    }

    .product-title {
        font-size: 14px;
    }

    .final-price {
        font-size: 16px;
    }

    .quantity-selector {
        margin-bottom: 10px;
    }

    .action-buttons {
        flex-direction: row;
        justify-content: center;
    }

        .action-buttons .btn {
            padding: 8px 15px;
            font-size: 13px;
        }

            .action-buttons .btn span {
                display: none !important;
            }

            .action-buttons .btn i {
                margin: 0;
            }

    .factor-item {
        font-size: 14px;
    }

    .final-price {
        font-size: 18px !important;
    }

    .nav-tabs .nav-link {
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .cart-canvases {
        position: static !important;
        margin-top: 20px;
    }

    .offer-timer {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .offer-badge {
        margin-bottom: 5px;
        margin-left: 0;
    }

    .countdown-timer {
        font-size: 12px;
    }

    .quantity-btn {
        width: 30px;
        height: 30px;
    }

    .quantity-input {
        width: 45px;
        height: 35px;
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item {
    animation: fadeIn 0.5s ease;
}

/* استایل اسکرول */
.content-box {
    max-height: 700px;
    overflow-y: auto;
    padding-right: 10px;
}

    .content-box::-webkit-scrollbar {
        width: 6px;
    }

    .content-box::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .content-box::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 10px;
    }

        .content-box::-webkit-scrollbar-thumb:hover {
            background: #a8a8a8;
        }

/* استایل Toast برای SweetAlert */
.swal-toast {
    border-radius: 10px !important;
    padding: 15px 25px !important;
}
/* استایل دکمه تسویه حساب */
.checkout-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    width: 100%;
    text-align: center;
    display: block;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

    .checkout-btn:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
        background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    }

    .checkout-btn:active {
        transform: translateY(-1px);
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    }

    .checkout-btn:disabled,
    .checkout-btn.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        pointer-events: none;
        background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
        box-shadow: none;
    }

/* استایل دکمه مشاهده محصولات در حالت خالی */
.btn-shop {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

    .btn-shop::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.5s ease;
    }

    .btn-shop:hover {
        transform: translateY(-5px) scale(1.02);
        box-shadow: 0 15px 35px rgba(255, 107, 107, 0.6);
        background: linear-gradient(135deg, #FF8E53 0%, #FF6B6B 100%);
        color: white !important;
    }

        .btn-shop:hover::before {
            left: 100%;
        }

    .btn-shop:active {
        transform: translateY(-2px) scale(0.98);
        box-shadow: 0 10px 25px rgba(255, 107, 107, 0.5);
    }

    .btn-shop i {
        font-size: 24px;
        transition: transform 0.3s ease;
    }

    .btn-shop:hover i {
        transform: rotate(15deg) scale(1.1);
    }

/* انیمیشن برای دکمه مشاهده محصولات */
@keyframes pulse {
    0% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    }

    50% {
        box-shadow: 0 12px 35px rgba(255, 107, 107, 0.7);
    }

    100% {
        box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    }
}

.btn-shop {
    animation: pulse 2s infinite;
}

/* استایل برای حالت خالی سبد خرید */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border-radius: 30px;
    margin: 30px 0;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

    .empty-cart i {
        font-size: 30px;
        color: #adb5bd;
        margin-bottom: 0;
        opacity: 0.6;
        animation: float 3s ease-in-out infinite;
    }

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.empty-cart p {
    color: #495057;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 30px;
    line-height: 1.8;
}

/* استایل برای دکمه‌های دیگر */
.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,123,255,0.4);
    }

/* استایل برای باکس خلاصه خرید وقتی خالی است */
.cart-canvases.disabled,
.cart-canvases:has(.checkout-btn[style*="display: none"]) {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

    .cart-canvases.disabled::after,
    .cart-canvases:has(.checkout-btn[style*="display: none"])::after {
        content: '⚠️ سبد خرید خالی است';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0,0,0,0.8);
        color: white;
        padding: 10px 20px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 500;
        z-index: 10;
        white-space: nowrap;
        pointer-events: none;
        backdrop-filter: blur(5px);
        border: 1px solid rgba(255,255,255,0.2);
    }

/* استایل ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .checkout-btn {
        padding: 14px 20px;
        font-size: 16px;
    }

    .btn-shop {
        padding: 14px 28px;
        font-size: 16px;
    }

        .btn-shop i {
            font-size: 20px;
        }

    .empty-cart {
        padding: 50px 15px;
    }

        .empty-cart i {
            font-size: 80px;
        }

        .empty-cart p {
            font-size: 18px;
        }

    .cart-canvases.disabled::after,
    .cart-canvases:has(.checkout-btn[style*="display: none"])::after {
        white-space: normal;
        width: 80%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .checkout-btn {
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-shop {
        padding: 12px 24px;
        font-size: 14px;
    }

        .btn-shop i {
            font-size: 18px;
        }

    .empty-cart {
        padding: 30px 10px;
    }

        .empty-cart i {
            font-size: 60px;
        }

        .empty-cart p {
            font-size: 16px;
        }
}

/* استایل برای حالت hover روی دکمه‌ها */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.btn-shop.loading {
    background: linear-gradient(90deg, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    color: transparent !important;
    pointer-events: none;
}

.empty-cart .btn-shop {
    padding: 0rem 1rem !important;
}

.fixed-sample-btn-mobile {
    display: none !important;
}
