/* ===================================== */
/*  Desktop Flex Layout + Smooth Sticky Totals  */
/* ===================================== */
.cart-page-flex {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    font-family: 'DM Sans', sans-serif; /* Default font for all cart text */
}
.cart-products { flex: 0 0 65%; }
.cart-totals-wrapper { flex: 0 0 35%; position: relative; }

/* Remove old sticky, JS handles smooth floating */
@media(min-width: 769px) {
    .cart-totals-modern {
        position: relative;
        top: auto;
        transition: top 0.3s ease;
    }
}

/* ===================================== */
/*  Desktop Table Styles                 */
/* ===================================== */
.modern-cart table.shop_table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 15px;
}
.modern-cart th, .modern-cart td {
    padding: 10px;
    vertical-align: middle;
    font-family: 'DM Sans', sans-serif; /* Table text in DM Sans */
}
.modern-cart .product-thumbnail img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
}
.modern-cart .remove {
    color: #ff4d4d;
    font-size: 18px;
    margin-left: 8px;
    cursor: pointer;
}

/* Quantity Buttons */
.quantity.buttons_added {
    display: flex;
    align-items: center;
    gap: 5px;
}
.quantity.buttons_added .minus,
.quantity.buttons_added .plus {
    background: #222;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    border-radius: 4px;
    font-family: 'BankGothic Bold', sans-serif; /* Keep custom font for buttons */
}
.quantity.buttons_added input.qty {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'DM Sans', sans-serif;
}

/* Cart Actions */
.cart-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-family: 'DM Sans', sans-serif;
}
.cart-actions .button {
    padding: 10px 20px;
    border-radius: 6px;
    background: #222;
    color: #fff;
    border: none;
    cursor: pointer;
    font-family: 'BankGothic Bold', sans-serif; /* Buttons retain BankGothic Bold */
}
.cart-actions .button:hover { background: #444; }

/* Coupon field styling */
.cart-actions .coupon input.input-text {
    flex: 1;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-family: 'DM Sans', sans-serif;
}
.cart-actions .coupon button.button {
    font-family: 'BankGothic Bold', sans-serif;
}

/* Cart Totals Card */
.cart-totals-modern {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 12px;
    background: #f9f9f9;
    font-family: 'DM Sans', sans-serif;
}
.cart-totals-modern table { width: 100%; }
.cart-totals-modern .checkout-btn {
    display: block;
    width: 100%;
    margin-top: 15px;
    text-align: center;
    background: #222;
    color: #fff;
    padding: 12px 0;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: bold;
    font-family: 'BankGothic Bold', sans-serif; /* Keep heading font for buttons */
}
.cart-totals-modern .checkout-btn:hover { background: #444; }

/* ===================================== */
/*  Mobile Card Layout                    */
/* ===================================== */

/* Hide mobile cards by default on desktop */
.mobile-cart-cards { display: none !important; }

@media (max-width: 768px) {
    /* Hide desktop table */
    .desktop-cart-table { display: none !important; }

    /* Show mobile cards */
    .mobile-cart-cards { display: block !important; }

    /* Stack layout */
    .cart-page-flex { flex-direction: column; }
    .cart-totals-wrapper { flex: 1 1 100%; margin-top: 20px; }

    /* Mobile Card Styles */
    .cart-item-card {
        border: 1px solid #ddd;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 20px;
        background: #fff;
        font-family: 'DM Sans', sans-serif;
    }
    .cart-item-card .product-thumbnail { margin-bottom: 10px; }
    .cart-item-card .product-name { font-weight: bold; margin-bottom: 6px; }
    .cart-item-card .product-price,
    .cart-item-card .product-subtotal,
    .cart-item-card .product-quantity { display: flex; justify-content: space-between; margin-bottom: 6px; }
    .cart-item-card .remove { color: #ff4d4d; font-size: 18px; cursor: pointer; }

    /* Coupon field full-width on mobile */
    .cart-actions .coupon {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .cart-actions .coupon input.input-text,
    .cart-actions .coupon button.button {
        width: 100%;
        border-radius: 6px;
        margin: 0;
    }
}