/* ==========================================================
   QBT Cart / Checkout Redesign — Clean Invoice Style
   Uses universal selectors (no body-class dependency)
   ========================================================== */

/* ---- Injected Payment Header ---- */
.qbt-pay-header {
    padding: 0 0 22px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}
.qbt-pay-header__label {
    font-size: 15px;
    color: #6b7280;
    font-weight: 400;
    margin: 0 0 6px;
    line-height: 1.4;
}
.qbt-pay-header__amount {
    font-size: 36px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -.5px;
    line-height: 1.15;
    margin: 0;
}

/* ==============================================================
   TABLE — Hide borders, background, and headers
   ============================================================== */
table.shop_table.woocommerce-checkout-review-order-table,
.woocommerce-cart-form table.shop_table.cart {
    border: none !important;
    border-collapse: collapse !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    background: transparent !important;
    width: 100% !important;
}

table.shop_table.woocommerce-checkout-review-order-table thead,
.woocommerce-cart-form table.shop_table.cart thead {
    display: none !important;
}

/* ==============================================================
   CART ITEM ROWS
   ============================================================== */
table.shop_table.woocommerce-checkout-review-order-table tbody,
.woocommerce-cart-form table.shop_table.cart tbody {
    display: block !important;
    width: 100% !important;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item,
.woocommerce-cart-form table.shop_table.cart tr.cart_item {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    width: 100% !important;
    padding: 18px 0 !important;
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
    background: transparent !important;
    position: relative !important;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td,
.woocommerce-cart-form table.shop_table.cart tr.cart_item td {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    vertical-align: top !important;
}

/* ==============================================================
   PRODUCT NAME — teal link
   ============================================================== */
table.shop_table tr.cart_item td.product-name {
    flex: 1 !important;
    min-width: 0 !important;
    padding-right: 16px !important;
    display: block !important;
    width: auto !important;
}

table.shop_table tr.cart_item td.product-name > a {
    color: #0d9488 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    display: inline-block;
    line-height: 1.4;
}
table.shop_table tr.cart_item td.product-name > a:hover {
    text-decoration: underline !important;
    color: #0f766e !important;
}

/* ==============================================================
   VARIATION / META DATA (dl list) — clean gray lines
   ============================================================== */
table.shop_table tr.cart_item td.product-name dl.variation {
    margin: 4px 0 0 !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    display: block !important;
    width: 100% !important;
}
table.shop_table tr.cart_item td.product-name dl.variation dt,
table.shop_table tr.cart_item td.product-name dl.variation dd {
    display: inline !important;
    float: none !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #6b7280 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.9 !important;
    background: none !important;
    text-transform: none !important;
}
table.shop_table tr.cart_item td.product-name dl.variation dd p {
    display: inline !important;
    margin: 0 !important;
}
table.shop_table tr.cart_item td.product-name dl.variation dd::after {
    content: '\A';
    white-space: pre;
}

/* ==============================================================
   SUBTOTAL / PRODUCT-TOTAL — Right side
   ============================================================== */
table.shop_table tr.cart_item td.product-subtotal,
table.shop_table tr.cart_item td.product-total {
    flex-shrink: 0 !important;
    width: auto !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #111827 !important;
    text-align: right !important;
    white-space: nowrap !important;
    display: block !important;
}

table.shop_table tr.cart_item td.product-subtotal .woocommerce-Price-amount,
table.shop_table tr.cart_item td.product-total .woocommerce-Price-amount {
    color: #111827 !important;
    font-weight: 500 !important;
}

/* ==============================================================
   REMOVE BUTTON — hide by default, show on hover
   ============================================================== */
table.shop_table tr.cart_item td.product-remove {
    position: absolute !important;
    top: 18px !important;
    right: 0 !important;
    width: auto !important;
    display: none !important;
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
}
table.shop_table tr.cart_item:hover td.product-remove {
    display: block !important;
}
table.shop_table tr.cart_item td.product-remove a.remove {
    color: #9ca3af !important;
    font-size: 18px !important;
    background: none !important;
    border-radius: 4px !important;
    text-decoration: none !important;
}
table.shop_table tr.cart_item td.product-remove a.remove:hover {
    background: #fee2e2 !important;
    color: #ef4444 !important;
}

/* Hide thumbnail, price, quantity columns */
table.shop_table tr.cart_item td.product-thumbnail,
table.shop_table tr.cart_item td.product-price,
table.shop_table tr.cart_item td.product-quantity {
    display: none !important;
}

/* ==============================================================
   TFOOT — Summary rows (Subtotal, Fees, Total)
   ============================================================== */
table.shop_table.woocommerce-checkout-review-order-table tfoot,
.cart_totals table.shop_table {
    display: block !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr,
.cart_totals table.shop_table tr {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    border: none !important;
    background: transparent !important;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr th,
table.shop_table.woocommerce-checkout-review-order-table tfoot tr td,
.cart_totals table.shop_table tr th,
.cart_totals table.shop_table tr td {
    border: none !important;
    padding: 10px 0 !important;
    font-size: 14px !important;
    background: transparent !important;
    vertical-align: middle !important;
}

/* Labels — left */
table.shop_table.woocommerce-checkout-review-order-table tfoot tr th,
.cart_totals table.shop_table tr th {
    font-weight: 400 !important;
    color: #374151 !important;
    text-align: left !important;
    width: auto !important;
}

/* Values — right */
table.shop_table.woocommerce-checkout-review-order-table tfoot tr td,
.cart_totals table.shop_table tr td {
    text-align: right !important;
    color: #111827 !important;
    font-weight: 500 !important;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr td .woocommerce-Price-amount,
.cart_totals table.shop_table tr td .woocommerce-Price-amount {
    color: #111827 !important;
    font-weight: 500 !important;
}

/* Subtotal row */
table.shop_table.woocommerce-checkout-review-order-table tfoot .cart-subtotal,
.cart_totals .cart-subtotal {
    border-bottom: 1px solid #e5e7eb !important;
}
table.shop_table.woocommerce-checkout-review-order-table tfoot .cart-subtotal th,
table.shop_table.woocommerce-checkout-review-order-table tfoot .cart-subtotal td,
.cart_totals .cart-subtotal th,
.cart_totals .cart-subtotal td {
    padding: 14px 0 !important;
}

/* Fee rows (Gratuity, Tax) */
table.shop_table.woocommerce-checkout-review-order-table tfoot tr.fee,
.cart_totals tr.fee {
    border-bottom: 1px solid #f3f4f6 !important;
}

/* Total row */
table.shop_table.woocommerce-checkout-review-order-table tfoot .order-total,
.cart_totals .order-total {
    border-top: 1px solid #e5e7eb !important;
}
table.shop_table.woocommerce-checkout-review-order-table tfoot .order-total th,
.cart_totals .order-total th {
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #111827 !important;
    padding: 16px 0 !important;
}
table.shop_table.woocommerce-checkout-review-order-table tfoot .order-total td,
.cart_totals .order-total td {
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #111827 !important;
    padding: 16px 0 !important;
}
table.shop_table.woocommerce-checkout-review-order-table tfoot .order-total td .woocommerce-Price-amount,
.cart_totals .order-total td .woocommerce-Price-amount {
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #111827 !important;
}

/* ==============================================================
   ORDER REVIEW WRAPPER — white card with shadow
   ============================================================== */
#order_review,
.woocommerce-checkout-review-order {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px;
    box-shadow: 0 1px 12px rgba(0,0,0,.06);
    border: 1px solid #e5e7eb;
}

/* Hide "Your order" heading */
#order_review_heading {
    display: none !important;
}

/* ==============================================================
   CART TOTALS WRAPPER
   ============================================================== */
.cart-collaterals {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
}
.cart_totals {
    float: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.cart_totals > h2 {
    display: none !important;
}

/* ==============================================================
   ACTIONS ROW — Coupon / Update cart
   ============================================================== */
table.shop_table.cart tr td.actions {
    padding: 16px 0 0 !important;
    border-top: none !important;
    background: transparent !important;
    display: block !important;
    width: 100% !important;
}
table.shop_table.cart .actions .coupon {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}
table.shop_table.cart .actions .coupon label {
    display: none !important;
}
table.shop_table.cart .actions .coupon #coupon_code {
    border: 1.5px solid #d1d5db !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    color: #374151 !important;
    background: #fff !important;
    outline: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    font-family: inherit !important;
    flex: 1;
    min-width: 0;
}
table.shop_table.cart .actions .coupon #coupon_code:focus {
    border-color: #0d9488 !important;
    box-shadow: 0 0 0 3px rgba(13,148,136,.12) !important;
}
table.shop_table.cart .actions .coupon .button {
    display: none !important;
}
table.shop_table.cart .actions > .button[name="update_cart"] {
    display: none !important;
}

/* Promo toggle button */
.qbt-promo-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    font-family: inherit;
    width: 100%;
    box-sizing: border-box;
}
.qbt-promo-toggle:hover {
    border-color: #0d9488;
    background: #f0fdfa;
}
.qbt-coupon-visible .coupon {
    display: flex !important;
}
.qbt-coupon-visible .coupon .button {
    display: inline-block !important;
    background: #0d9488 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    margin-left: 8px !important;
    white-space: nowrap !important;
}
.qbt-coupon-visible .coupon .button:hover {
    background: #0f766e !important;
}

/* ==============================================================
   BUTTONS — Proceed to Checkout / Place Order
   ============================================================== */
.wc-proceed-to-checkout {
    padding: 20px 0 4px !important;
}
.wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    width: 100% !important;
    background: #111827 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background .2s, transform .15s !important;
    box-sizing: border-box !important;
    letter-spacing: .02em;
    margin: 0 !important;
}
.wc-proceed-to-checkout a.checkout-button:hover {
    background: #1f2937 !important;
    transform: translateY(-1px) !important;
}

#place_order {
    background: #111827 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: background .2s !important;
    letter-spacing: .02em;
}
#place_order:hover {
    background: #1f2937 !important;
}

/* ==============================================================
   RESPONSIVE
   ============================================================== */
@media (max-width: 600px) {
    .qbt-pay-header__amount {
        font-size: 30px;
    }
    #order_review,
    .woocommerce-checkout-review-order {
        padding: 18px 14px;
    }
}
