/* cart.css - طراحی حرفه‌ای صفحه سبد خرید */
/* فقط برای cart.html - بدون تأثیر بر سایر صفحات */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', sans-serif;
    background: linear-gradient(135deg, #f8f9fc 0%, #e8f0fe 100%);
    color: #2c3e50;
    line-height: 1.7;
    min-height: 100vh;
    direction: rtl;
}

/* هدر */
header {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #eef2f6;
}

header .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    background: linear-gradient(90deg, #3498db, #2980b9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-toggle {
    display: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #3498db;
    transition: transform 0.3s ease;
}

.nav-toggle:hover {
    transform: rotate(90deg);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #3498db;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -6px;
    right: 0;
    background: #3498db;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.nav-menu a:hover::after {
    width: 100%;
}

.cart-link {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    transition: all 0.3s ease;
}

.cart-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

/* بخش اصلی */
.cart-section {
    padding: 3rem 0;
}

.cart-section .container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cart-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 2.3rem;
    color: #2c3e50;
    position: relative;
    font-weight: 700;
}

.cart-section h2 i {
    color: #e74c3c;
    margin-left: 0.5rem;
}

.cart-section h2::after {
    content: '';
    width: 90px;
    height: 4px;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* محتوای سبد خرید */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        order: -1;
    }
}

/* آیتم‌های سبد خرید */
#cart-items {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px dashed #e9ecef;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #f8fbff;
    border-radius: 14px;
    padding: 1.5rem;
    margin: 0 -1.5rem;
    transform: translateX(-4px);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 80px;
    height: 110px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.cart-item img:hover {
    transform: scale(1.06);
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.cart-item-info p {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.cart-item-info p:nth-child(3) {
    color: #27ae60;
    font-weight: 600;
    font-size: 1.05rem;
}

/* کنترل تعداد */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 1rem 0;
}

.quantity-controls button {
    width: 36px;
    height: 36px;
    border: 1.5px solid #dfe6ec;
    background: #fdfdff;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls button:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: scale(1.1);
}

.quantity-controls input {
    width: 50px;
    text-align: center;
    border: 1.5px solid #dfe6ec;
    border-radius: 10px;
    padding: 0.5rem;
    font-weight: 600;
    background: #f8f9fa;
    color: #2c3e50;
}

/* دکمه حذف */
.cart-item-info > button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.2);
}

.cart-item-info > button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* سبد خرید خالی */
.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #95a5a6;
}

.empty-cart p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.empty-cart a {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.empty-cart a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

/* خلاصه سفارش */
.cart-summary {
    background: white;
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    border: 1px solid #eef2f6;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    border-bottom: 2px solid #f1f3f5;
    padding-bottom: 0.8rem;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #34495e;
}

.cart-summary p:last-of-type {
    font-weight: 700;
    font-size: 1.3rem;
    color: #2c3e50;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
}

.cart-summary p:last-of-type span {
    color: #e74c3c;
}

/* دکمه‌های پایین */
.cart-summary button {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cart-summary button:first-of-type {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.cart-summary button:first-of-type:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.4);
}

.cart-summary button:last-of-type {
    background: #ecf0f1;
    color: #2c3e50;
    margin-top: 0.8rem;
}

.cart-summary button:last-of-type:hover {
    background: #dfe6ec;
    transform: translateY(-2px);
}

/* ریسپانسیو */
@media (max-width: 768px) {
    header .container {
        padding: 1rem;
    }
    
    .nav-menu ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        padding: 1rem 0;
    }
    
    .nav-menu.active ul {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .cart-section .container {
        padding: 0 1rem;
    }
    
    .cart-section h2 {
        font-size: 1.9rem;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .cart-item img {
        width: 70px;
        height: 95px;
    }
    
    .quantity-controls {
        justify-content: center;
    }
}