/* ============================================
   استایل‌های صفحه سبد خرید
   ============================================ */

/* جدول سبد خرید */
.woocommerce-cart-form__contents {
    border: none !important;
}

.woocommerce-cart-form__contents thead {
    background: #f9fafb !important;
}

.woocommerce-cart-form__contents th {
    border: none !important;
    font-weight: 600 !important;
    color: #374151 !important;
}

.woocommerce-cart-form__cart-item {
    border-bottom: 1px solid #e5e7eb !important;
}

.woocommerce-cart-form__cart-item:last-child {
    border-bottom: none !important;
}

/* تصویر محصول */
.product-thumbnail img {
    width: 80px !important;
    height: 80px !important;
    object-fit: cover !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e5e7eb !important;
}

/* نام محصول */
.product-name a {
    color: #1f2937 !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: color 0.3s !important;
}

.product-name a:hover {
    color: #10b981 !important;
}

/* قیمت */
.product-price {
    color: #1f2937 !important;
    font-weight: 600 !important;
}

.product-price del {
    color: #9ca3af !important;
    font-size: 0.875rem !important;
}

/* تعداد */
.quantity {
    display: inline-flex !important;
    align-items: center !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
}

.quantity .qty {
    width: 50px !important;
    height: 40px !important;
    border: none !important;
    text-align: center !important;
    -moz-appearance: textfield !important;
}

.quantity .qty::-webkit-outer-spin-button,
.quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.quantity button {
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    background: #f9fafb !important;
    color: #6b7280 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s !important;
}

.quantity button:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.quantity .minus {
    border-left: 1px solid #d1d5db !important;
}

.quantity .plus {
    border-right: 1px solid #d1d5db !important;
}

/* جمع جزء */
.product-subtotal {
    color: #10b981 !important;
    font-weight: bold !important;
    font-size: 1.125rem !important;
}

/* دکمه حذف */
.product-remove a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #fee2e2 !important;
    color: #dc2626 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
}

.product-remove a:hover {
    background: #fecaca !important;
    transform: scale(1.1) !important;
}

/* کد تخفیف */
.coupon {
    display: flex !important;
    gap: 0.5rem !important;
}

.coupon input {
    flex: 1 !important;
    min-width: 200px !important;
}

.coupon button {
    white-space: nowrap !important;
}

/* جمع‌بندی سبد خرید */
.cart_totals {
    border: none !important;
    padding: 0 !important;
}

.cart_totals h2 {
    display: none !important;
}

.cart_totals table {
    border: none !important;
    width: 100% !important;
}

.cart_totals table th,
.cart_totals table td {
    border: none !important;
    padding: 0.75rem 0 !important;
    color: #4b5563 !important;
}

.cart_totals table tr:not(:last-child) {
    border-bottom: 1px dashed #e5e7eb !important;
}

.cart_totals table .order-total th,
.cart_totals table .order-total td {
    color: #1f2937 !important;
    font-weight: bold !important;
    font-size: 1.125rem !important;
    padding-top: 1rem !important;
}

/* دکمه تسویه حساب */
.wc-proceed-to-checkout {
    margin-top: 1.5rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid #e5e7eb !important;
}

.wc-proceed-to-checkout a {
    display: block !important;
    width: 100% !important;
    background: #10b981 !important;
    color: white !important;
    text-align: center !important;
    padding: 1rem !important;
    border-radius: 0.75rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s !important;
}

.wc-proceed-to-checkout a:hover {
    background: #059669 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

/* محصولات مرتبط */
.cross-sells {
    margin-top: 2rem !important;
}

.cross-sells h2 {
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-bottom: 1rem !important;
}

/* سشن تبلیغاتی */
.cart-promo-banner {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-radius: 1rem !important;
    padding: 2rem !important;
    text-align: center !important;
    color: white !important;
}

/* پیام‌ها */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    border: none !important;
    background: #d1fae5 !important;
    color: #065f46 !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    margin-bottom: 1.5rem !important;
    border-right: 4px solid #10b981 !important;
}

.woocommerce-error {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-right-color: #ef4444 !important;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .shop_table thead {
        display: none !important;
    }
    
    .shop_table tbody tr {
        display: flex !important;
        flex-direction: column !important;
        padding: 1rem !important;
        border: 1px solid #e5e7eb !important;
        border-radius: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .shop_table tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 0 !important;
        border: none !important;
    }
    
    .shop_table tbody td::before {
        content: attr(data-title) !important;
        font-weight: 600 !important;
        color: #4b5563 !important;
        margin-left: 1rem !important;
    }
    
    .product-thumbnail {
        justify-content: center !important;
        margin-bottom: 1rem !important;
    }
    
    .product-name {
        order: 1 !important;
        margin-bottom: 1rem !important;
    }
    
    .product-price {
        order: 2 !important;
    }
    
    .product-quantity {
        order: 3 !important;
    }
    
    .product-subtotal {
        order: 4 !important;
    }
    
    .product-remove {
        order: 5 !important;
        position: absolute !important;
        top: 1rem !important;
        left: 1rem !important;
    }
    
    .coupon {
        flex-direction: column !important;
    }
    
    .coupon input,
    .coupon button {
        width: 100% !important;
    }
}