/* تنسيقات صفحة السلة */
.cart-page {
    padding: 30px 0;
    background-color: #f8f9fa;
    min-height: 500px;
}

.cart-page .page-title {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: bold;
    color: var(--primary-color);
    text-align: center;
    position: relative;
}

.cart-page .page-title:after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
    background-color: white;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.empty-cart-icon {
    width: 100px;
    height: 100px;
    background-color: #f8f8f8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.cart-empty i {
    font-size: 50px;
    color: #bababa;
}

.cart-empty h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.cart-empty p {
    font-size: 16px;
    color: #777;
    margin-bottom: 25px;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.cart-empty .btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    display: inline-block;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cart-empty .btn-primary:hover {
    background-color: var(--primary-color-dark, #e06700);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* تنسيقات بطاقات المنتجات في السلة */
.cart-products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.cart-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.cart-product-content {
    padding: 12px;
}

.cart-product-header {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

.cart-product-image-container {
    width: 100px;
    height: 100px;
    min-width: 100px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f9f9f9;
    border: 1px solid #eee;
}

.cart-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: right;
}

.cart-product-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    line-height: 1.3;
}

.cart-product-description {
    color: #777;
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.cart-product-price {
    margin-top: auto;
    text-align: right;
    direction: rtl;
}

.cart-current-price {
    color: #000;
    font-weight: 500;
    font-size: 15px;
}

.cart-old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-left: 5px;
}

.cart-product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.cart-product-subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.subtotal-label {
    font-size: 13px;
    color: #777;
    margin-bottom: 2px;
}

.subtotal-value {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.cart-product-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-quantity-control {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.cart-quantity-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 2px;
}

.cart-quantity-buttons {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    height: 32px;
}

.cart-quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #f5f5f5;
    color: #555;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-quantity-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.cart-quantity-input {
    width: 40px;
    height: 32px;
    border: none;
    border-right: 1px solid #eee;
    border-left: 1px solid #eee;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background-color: white;
}

.cart-remove-product {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: #fee5e5;
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-remove-product:hover {
    background-color: #e74c3c;
    color: white;
    transform: scale(1.1);
}

.free-shipping {
    color: #2ecc71;
    font-weight: 600;
    padding: 3px 8px;
    background-color: #eafaf1;
    border-radius: 4px;
    font-size: 14px;
    display: inline-block;
}

/* تنسيقات السلة الجديدة */
.cart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
}

.cart-items-container {
    flex: 1 1 65%;
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.cart-sidebar {
    flex: 1 1 30%;
    min-width: 300px;
}

.cart-section-title {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
    position: relative;
    padding-bottom: 10px;
}

.cart-section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-bottom: 20px;
}

.cart-table th {
    padding: 15px 10px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.cart-table td {
    padding: 15px 10px;
    text-align: center;
    vertical-align: middle;
}

.cart-item-row {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cart-item-row:hover {
    background-color: #f5f5f5;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

/* تنسيقات صورة المنتج */
.product-details {
    display: flex;
    align-items: center;
    text-align: right;
    width: 100%;
}

.product-image-container {
    width: 80px;
    height: 80px;
    margin-left: 15px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    background-color: white;
}

.cart-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.product-text {
    flex: 1;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.product-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.product-description {
    color: #777;
    font-size: 13px;
    margin: 0 0 10px 0;
}

.product-price-cart {
    text-align: right;
    margin-top: 5px;
    direction: rtl;
}

.product-price-cart .current-price {
    color: #000;
    font-weight: 500;
    font-size: 15px;
}

.product-price-cart .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 13px;
    margin-left: 5px;
}

.product-name {
    font-weight: 500;
    color: #333;
    text-align: right;
}

.product-price {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
    text-align: right;
}

.product-price .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-left: 5px;
}

.product-price .current-price {
    color: #333;
}

.product-price i {
    font-size: 12px;
    margin-right: 2px;
}

.product-quantity {
    width: 140px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.quantity-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
    font-weight: 500;
}

.quantity-controls {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    width: 100px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background-color: transparent;
    color: #555;
    cursor: pointer;
    padding: 0;
    line-height: 30px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.quantity-btn i {
    font-size: 12px;
}

.quantity-input {
    width: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
    background-color: transparent;
    padding: 0 5px;
    font-size: 15px;
}

.product-remove {
    width: 60px;
}

.quantity-column {
    width: 140px;
}

.remove-product {
    border: none;
    background-color: #fee5e5;
    color: #e74c3c;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin: 0 auto;
}

.remove-product:hover {
    background-color: #e74c3c;
    color: white;
    transform: scale(1.1);
}

.remove-product i {
    font-size: 14px;
}

.cart-summary {
    background-color: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.summary-row.total {
    border-top: 1px solid #ddd;
    padding-top: 15px;
    font-weight: bold;
    font-size: 18px;
}

.checkout-btn {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.checkout-btn:hover {
    background-color: var(--primary-color-dark, #e06700);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #666;
    text-decoration: none;
    padding: 8px 0;
    font-size: 14px;
    transition: all 0.3s ease;
}

.continue-shopping:hover {
    color: var(--primary-color);
    transform: translateX(-5px);
}

/* Media Queries for Responsive Design */
@media (max-width: 992px) {
    .cart-container {
        flex-direction: column;
    }
    
    .cart-items-container, 
    .cart-sidebar {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    .product-details {
        flex-direction: column;
        text-align: center;
    }
    
    .product-image-container {
        margin: 0 auto 10px;
    }
    
    .cart-table th:nth-child(2),
    .cart-table td:nth-child(2) {
        display: none;
    }
}

@media (max-width: 576px) {
    .cart-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {
    .cart-table th,
    .cart-table td {
        padding: 10px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .cart-table td img {
        width: 60px;
        height: 60px;
    }
    
    .product-price {
        font-size: 14px;
    }
}
