/* Cart Alignment Fixes */

/* Ensure consistent flex layout for cart items */
.cart-header,
.cart-item {
    display: flex;
    align-items: center;
    width: 100%;
}

/* Fix column widths to ensure alignment */
.cart-header-image,
.cart-item-image {
    width: 80px;
    flex: 0 0 80px;
}

.cart-header-product,
.cart-item-product {
    flex: 2;
    padding: 0 15px;
}

.cart-header-price,
.cart-item-price {
    flex: 1;
    text-align: center;
}

.cart-header-quantity,
.cart-item-quantity {
    flex: 1.5;
    text-align: center;
    display: flex;
    justify-content: center;
}

.cart-header-subtotal,
.cart-item-subtotal {
    flex: 1;
    text-align: center;
}

.cart-header-actions,
.cart-item-actions {
    width: 100px;
    flex: 0 0 100px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .cart-header-image,
    .cart-item-image {
        width: 60px;
        flex: 0 0 60px;
    }
    
    .cart-header-price,
    .cart-item-price {
        display: none;
    }
}

@media (max-width: 768px) {
    .cart-header-actions,
    .cart-item-actions {
        width: 80px;
        flex: 0 0 80px;
    }
    
    .cart-header-subtotal,
    .cart-item-subtotal {
        display: none;
    }
}

/* Mobile layout */
@media (max-width: 576px) {
    .cart-header {
        display: none;
    }
    
    .cart-item {
        flex-wrap: wrap;
        position: relative;
    }
    
    .cart-item-image {
        width: 70px;
        flex: 0 0 70px;
    }
    
    .cart-item-product {
        width: calc(100% - 70px - 40px);
        flex: 0 0 calc(100% - 70px - 40px);
        padding-right: 0;
    }
    
    .cart-item-actions {
        position: absolute;
        top: 15px;
        right: 10px;
        width: auto;
        flex: 0 0 auto;
    }
    
    .cart-item-quantity {
        width: 70%;
        flex: 0 0 70%;
        margin-top: 15px;
        justify-content: flex-start;
    }
    
    .cart-item-subtotal {
        width: 30%;
        flex: 0 0 30%;
        margin-top: 15px;
        text-align: right;
        display: block;
    }
}

/* Very small screens */
@media (max-width: 400px) {
    .cart-item-image {
        width: 60px;
        flex: 0 0 60px;
    }
    
    .cart-item-product {
        width: calc(100% - 60px - 40px);
        flex: 0 0 calc(100% - 60px - 40px);
    }
    
    .cart-item-quantity {
        width: 60%;
        flex: 0 0 60%;
    }
    
    .cart-item-subtotal {
        width: 40%;
        flex: 0 0 40%;
    }
}
