/**
 * Cart Layout Styles
 * Custom styles to fix the uneven layout of the cart page
 */

/* Cart Container Layout */
.cart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 20px;
    justify-content: space-between;
}

.cart-main-content {
    flex: 1 1 65%;
    min-width: 600px;
}

.cart-collaterals {
    flex: 1 1 30%;
    min-width: 300px;
    align-self: flex-start;
}

/* Cart Header */
.cart-header {
    display: flex;
    background-color: #fff;
    padding: 10px 0;
    border-radius: 0;
    margin-bottom: 10px;
    font-weight: normal;
    text-transform: none;
    font-size: 14px;
    width: 100%;
    justify-content: space-between;
}

/* Cart Columns */
.cart-col {
    padding: 10px;
}

.product-col {
    flex: 3;
    display: flex;
    align-items: center;
    padding-left: 0;
}

.price-col,
.quantity-col,
.subtotal-col {
    flex: 1;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Header text styling */
.header-text {
    font-weight: 600;
    color: #333;
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    width: 100%;
    justify-content: space-between;
}

/* Product Column Layout */
.product-col {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-remove {
    margin-right: 5px;
}

.product-thumbnail {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    margin-right: 10px;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.product-details {
    flex-grow: 1;
}

.product-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.product-meta {
    font-size: 14px;
    color: #666;
}

/* Quantity Input */
.quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity input {
    width: 40px;
    text-align: center;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 0;
}

.quantity .qty {
    width: 2.5em;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    height: 30px;
    font-size: 14px;
}

.quantity .minus,
.quantity .plus {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 8px;
    height: 30px;
    width: 25px;
    cursor: pointer;
}

/* Cart Totals */
.cart_totals {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin-top: 0;
}

.cart-collaterals {
    width: 30%;
    min-width: 300px;
    padding: 0 !important;
}

/* Cart Totals Title */
.cart_totals h2 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.cart_totals table {
    width: 100%;
    margin-bottom: 15px;
}

.cart_totals th,
.cart_totals td {
    padding: 10px 0;
    border-bottom: none;
}

.cart_totals th {
    text-align: left;
    font-weight: 400;
    color: #333;
}

.cart_totals td {
    text-align: right;
    font-weight: 600;
}

.cart-totals .order-total th,
.cart-totals .order-total td {
    font-size: 18px;
    padding-top: 20px;
}

/* Proceed to Checkout Button */
.checkout-button,
.wc-proceed-to-checkout .checkout-button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #000 !important;
    color: #fff !important;
    text-align: center;
    border-radius: 0;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    transition: background-color 0.3s;
    margin-top: 10px;
    font-size: 14px;
}

.checkout-button:hover,
.wc-proceed-to-checkout .checkout-button:hover {
    background-color: #333 !important;
    color: #fff !important;
    text-decoration: none;
}

/* Coupon Form */
.coupon {
    display: flex;
    margin-top: 30px;
    max-width: 400px;
}

.coupon input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
}

.coupon button {
    padding: 12px 20px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.coupon button:hover {
    background-color: #e0e0e0;
}

/* Additional Cart Styling */
.cart-page-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 600;
}

.cart-page-banner {
    background-color: #f7f7f7;
    padding: 30px 0;
    margin-bottom: 30px;
    text-align: center;
}

.cart-banner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cart-breadcrumbs {
    margin-bottom: 15px;
    font-size: 14px;
}

.cart-breadcrumbs a {
    color: #666;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #999;
}

.current-page {
    font-weight: 500;
}

/* Cart Main Content */
.cart-main-content {
    flex: 1 1 65%;
    min-width: 600px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .cart-main-content,
    .cart-collaterals {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .cart-header {
        display: none;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 0;
    }
    
    .cart-col {
        width: 100%;
        padding: 10px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .cart-col::before {
        content: attr(data-title);
        font-weight: 600;
    }
    
    .product-col {
        flex-direction: row;
    }
    
    .product-col::before {
        display: none;
    }
}

@media (max-width: 576px) {
    .product-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .coupon {
        flex-direction: column;
    }
    
    .coupon input,
    .coupon button {
        width: 100%;
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .coupon button {
        border-left: 1px solid #ddd;
    }
}