/* Cart Page Styles */

.cart-wrapper {
    background-color: #fff;
    padding: 40px 0;
    min-height: 500px;
}

.cart-title h2 {
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: normal;
    color: #333;
}

/* Grid Layout for Columns */
.cart-header, .cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--cart-border, #EFEFEF);
}

.cart-header {
    background-color: var(--cart-header-bg, #F8F8F8);
    font-size: 14px;
    color: #666;
    border-bottom: none;
}

.cart-item {
    border-top: none;
    transition: background-color 0.3s;
}

.cart-item:last-child {
    border-bottom: 1px solid var(--cart-border, #EFEFEF);
}

.cart-item.selected {
    background-color: var(--cart-selected-bg, #FEF6F0);
}

/* Column Widths */
.col-check { width: 5%; text-align: center; }
.col-product { width: 45%; }
.col-price { width: 15%; text-align: center; }
.col-qty { width: 15%; text-align: center; }
.col-total { width: 15%; text-align: center; font-weight: bold; }
.col-action { width: 10%; text-align: center; }

/* Product Info */
.col-product {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-img {
    width: 80px;
    height: 80px;
    border: 1px solid #eee;
    padding: 5px;
    background: #fff;
}

.item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.item-info {
    flex: 1;
}

.item-name {
    display: block;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.item-name:hover {
    color: var(--accent);
}

.item-attr {
    color: #999;
    font-size: 12px;
}

/* Quantity Box */
.qty-box {
    display: inline-flex;
    border: 1px solid #ddd;
}

.qty-btn {
    width: 25px;
    height: 25px;
    background: #f5f5f5;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-input {
    width: 40px;
    height: 25px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 12px;
}

/* Action Buttons */
.delete-btn {
    color: #666;
    font-size: 12px;
}

.delete-btn:hover {
    color: var(--danger);
    text-decoration: underline;
}

/* Cart Footer */
.cart-footer {
    margin-top: 20px;
    border: 1px solid var(--cart-border, #EFEFEF);
    background: #f5f5f5;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.batch-delete {
    color: #666;
}

.batch-delete:hover {
    color: var(--danger);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.total-info {
    font-size: 14px;
}

.selected-count {
    font-weight: bold;
    margin: 0 3px;
}

.total-price {
    font-size: 20px;
    font-weight: bold;
    margin-left: 5px;
}

.btn-checkout {
    padding: 10px 40px;
    font-size: 18px;
    border-radius: 0;
}

/* Empty State */
.cart-empty {
    text-align: center;
    padding: 80px 0;
}

.empty-icon {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.cart-empty p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-header { display: none; }
    
    .cart-item {
        flex-wrap: wrap;
        position: relative;
        padding-bottom: 40px; /* Space for subtotal/action */
    }
    
    .col-check { width: 10%; align-self: flex-start; margin-top: 10px; }
    .col-product { width: 90%; }
    
    .col-price { 
        display: none; /* Hide unit price on mobile if needed */
    }
    
    .col-qty { 
        width: auto; 
        margin-left: 10%; /* Align with content */
        margin-top: 10px;
        text-align: left;
    }
    
    .col-total {
        position: absolute;
        bottom: 10px;
        right: 15px;
        width: auto;
    }
    
    .col-action {
        position: absolute;
        top: 15px;
        right: 15px;
        width: auto;
    }
    
    .cart-footer {
        flex-direction: column;
        gap: 15px;
        align-items: flex-end;
    }
    
    .footer-left {
        width: 100%;
        justify-content: space-between;
    }
}
