/* ============================================
   🛒 سبد خرید - cart.css
   تم سورمه‌ای و نقره‌ای
   ============================================ */

/* ==========================================
   🍞 Breadcrumb
========================================== */
.breadcrumb-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    font-size: 13px;
    color: rgba(15, 26, 44, 0.4);
}

.breadcrumb-custom li a {
    color: rgba(15, 26, 44, 0.5);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-custom li a:hover {
    color: #0f1a2c;
}

.breadcrumb-custom .separator {
    color: rgba(15, 26, 44, 0.1);
}

.breadcrumb-custom .active {
    color: #0f1a2c;
    font-weight: 600;
}

/* ==========================================
   📋 هدر صفحه
========================================== */
.page-header-cart {
    margin-bottom: 30px;
}

.page-header-cart h1 {
    font-size: 28px;
    font-weight: 700;
    color: #0f1a2c;
    margin: 0 0 4px 0;
}

.page-header-cart p {
    color: rgba(15, 26, 44, 0.4);
    font-size: 14px;
    margin: 0;
}

/* ==========================================
   📋 لیست سبد خرید
========================================== */
.cart-wrapper {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(15, 26, 44, 0.04);
    padding: 20px;
    box-shadow: 0 2px 12px rgba(15, 26, 44, 0.02);
    margin-bottom: 24px;
    min-height: 200px;
}

/* ==========================================
   🃏 آیتم سبد خرید
========================================== */
.cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(15, 26, 44, 0.04);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(15, 26, 44, 0.03);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0f1a2c;
    margin: 0 0 4px 0;
}

.cart-item-size {
    font-size: 13px;
    color: rgba(15, 26, 44, 0.4);
    display: block;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #4a5a6a;
    display: block;
    margin-top: 4px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==========================================
   📦 کنترل تعداد
========================================== */
.quantity-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid rgba(15, 26, 44, 0.06);
    border-radius: 8px;
    overflow: hidden;
}

.quantity-control button {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #0f1a2c;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-control button:hover {
    background: rgba(15, 26, 44, 0.05);
    color: #4a5a6a;
}

.quantity-control span {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    padding: 0 4px;
}

/* ==========================================
   🗑️ دکمه حذف
========================================== */
.btn-remove {
    background: transparent;
    border: none;
    color: rgba(15, 26, 44, 0.2);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
}

.btn-remove:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.05);
}

/* ==========================================
   📊 خلاصه سبد خرید
========================================== */
.cart-summary {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(15, 26, 44, 0.04);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(15, 26, 44, 0.02);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
    color: rgba(15, 26, 44, 0.5);
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    color: #0f1a2c;
    border-top: 2px solid rgba(74, 90, 106, 0.1);
    padding-top: 16px;
    margin-top: 8px;
}

.summary-row.total span:last-child {
    color: #4a5a6a;
}

/* ==========================================
   🛒 دکمه ادامه خرید
========================================== */
.btn-checkout {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0f1a2c, #2c3e50);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 26, 44, 0.2);
}

/* ==========================================
   🔄 لودینگ
========================================== */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: rgba(15, 26, 44, 0.3);
}

.loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(15, 26, 44, 0.05);
    border-top-color: #4a5a6a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   📭 حالت خالی
========================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #0f1a2c;
    margin: 0 0 4px 0;
}

.empty-state p {
    color: rgba(15, 26, 44, 0.3);
    font-size: 14px;
    margin: 0 0 20px 0;
}

.empty-state .btn-shop-now {
    display: inline-block;
    padding: 10px 32px;
    background: linear-gradient(135deg, #0f1a2c, #2c3e50);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.empty-state .btn-shop-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 26, 44, 0.15);
}

/* ==========================================
   📱 ریسپانسیو
========================================== */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .page-header-cart h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .quantity-control button {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .summary-row.total {
        font-size: 17px;
    }
}

/* ============================================
   🛒 تعداد سبد خرید
========================================== */
.cart-amount {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #4a5a6a;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(74, 90, 106, 0.3);
    transition: all 0.3s ease;
}

.cart-amount:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(74, 90, 106, 0.4);
}

/* ===== تعداد صفر ===== */
.cart-amount[data-count="0"] {
    opacity: 0.5;
    transform: scale(0.8);
}