/* WC Unified Cart & Checkout — style.css v1.6.6 */

/* ── Reset ──────────────────────────────────────────── */
.wcucc-wrap *, .wcucc-wrap *::before, .wcucc-wrap *::after { box-sizing: border-box; }
.wcucc-wrap { position: relative; width: 100%; font-family: inherit; }

/* ── Layout ─────────────────────────────────────────── */
.wcucc-layout { display: flex; align-items: flex-start; width: 100%; gap: 40px; }
.wcucc-cols-1  { flex-direction: column; }
.wcucc-cols-1  .wcucc-col { width: 100%; }
.wcucc-cols-2  .wcucc-col-checkout { flex: 1 1 0; min-width: 0; }
.wcucc-order-ckfirst .wcucc-col-checkout { order: -1; }
.wcucc-order-ckfirst .wcucc-col-cart     { order:  1; }
.wcucc-sticky { position: sticky; top: 80px; }

/* ── Column ─────────────────────────────────────────── */
.wcucc-col { padding: 32px 28px; background: #fff; border-radius: 12px; }

/* ── Titles ─────────────────────────────────────────── */
.wcucc-title {
    font-size: 1.25em; font-weight: 700; margin: 0 0 20px;
    color: #1a1a2e; letter-spacing: -.01em;
}
.wcucc-title.has-div {
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 14px; margin-bottom: 22px;
}

/* ── Cart items ─────────────────────────────────────── */
.wcucc-cart-wrap { display: flex; flex-direction: column; }

/* Cart content: products/coupon on the left, totals on the right. */
.wcucc-col-cart {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.wcucc-cart-inner-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) 28px minmax(0, 2fr);
    align-items: start;
    width: 100%;
    gap: 0;
}
.wcucc-cart-main-panel,
.wcucc-summary-panel,
.wcucc-ck-2col .wcucc-billing-panel,
.wcucc-ck-2col #order_review {
    min-width: 0;
    background: transparent;
    border-radius: 10px;
    padding: 24px 20px;
    border: 1px solid #5a5a5a4d;
}
.wcucc-cart-main-panel { grid-column: 1; }
.wcucc-summary-panel {
    grid-column: 3;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    align-self: flex-start;
    height: auto;
}
.wcucc-cart-separator {
    grid-column: 2;
    width: 28px;
    align-self: stretch;
    min-height: 0;
    background: #fff !important;
}
.wcucc-cart-main { min-width: 0; }
.wcucc-summary-panel .wcucc-summary-wrap {
    width: 100%;
    min-width: 0;
    margin-top: 0;
}

@media (max-width: 900px) {
   .wcucc-cart-inner-grid {
        display: grid;
        grid-template-columns: 1fr;
    }

    .wcucc-cart-main-panel,
    .wcucc-summary-panel {
        width: 100%;
        min-width: 0;
        grid-column: 1;
    }

    .wcucc-cart-separator {
        grid-column: 1;
        width: 100% !important;
        height: 20px;
        min-height: 20px;
    }

    .wcucc-summary-panel {
        align-items: stretch;
    }
}

.wcucc-item {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 0; border-top: 1px solid #f4f4f4;
}
.wcucc-item:first-child { border-top: none; padding-top: 0; }

/* Thumbnail */
.wcucc-item-img { width: 76px; flex: 0 0 76px; }
.wcucc-item-img img {
    width: 76px; height: 76px; object-fit: cover;
    border-radius: 8px; display: block;
    border: 1px solid #f0f0f0;
}
.wcucc-no-thumb .wcucc-item-img { display: none; }

/* Info */
.wcucc-item-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.wcucc-item-name {
    font-weight: 600; font-size: .92em; color: #1a1a2e;
    text-decoration: none; line-height: 1.35; display: block;
}
.wcucc-item-name:hover { color: #555; }
.wcucc-item-var { font-size: .75em; color: #999; }

.wcucc-item-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }

/* Price */
.wcucc-item-price {
    font-weight: 700; font-size: .95em; white-space: nowrap;
    color: #1a1a2e; flex-shrink: 0; min-width: 60px; text-align: right;
}
.wcucc-item-price .woocommerce-Price-amount { color: inherit; }

/* Empty */
.wcucc-empty {
    color: #aaa; font-style: italic; padding: 28px 0;
    text-align: center; font-size: .9em;
}

/* ── Qty control ─────────────────────────────────────── */
.wcucc-qty {
    display: inline-flex; align-items: center;
    width: auto !important; max-width: max-content; flex: 0 0 auto;
    background: #f6f6f8; border-radius: 8px;
    height: 34px; overflow: hidden; border: 1px solid #ebebeb;
}
.wcucc-wrap .wcucc-qty .wcucc-minus,
.wcucc-wrap .wcucc-qty .wcucc-plus {
    background: none; border: none; cursor: pointer;
    width: 32px !important; min-width: 32px !important; max-width: 32px !important;
    height: 34px !important; flex: 0 0 32px !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 1em; color: #555; line-height: 1;
    transition: background .15s, color .15s; padding: 0 !important;
}
.wcucc-wrap .wcucc-qty .wcucc-minus:hover,
.wcucc-wrap .wcucc-qty .wcucc-plus:hover { background: #eaeaee; color: #1a1a2e; }
.wcucc-wrap .wcucc-qty input.wcucc-qty-input {
    width: 38px !important; min-width: 38px !important; max-width: 38px !important;
    height: 34px !important; flex: 0 0 38px !important;
    border: none !important; background: transparent;
    text-align: center; font-size: .88em; font-weight: 700; color: #1a1a2e;
    -moz-appearance: textfield; padding: 0 !important; margin: 0 !important;
    box-shadow: none !important;
}
.wcucc-qty-input::-webkit-outer-spin-button,
.wcucc-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Delete */
.wcucc-del {
    background: none; border: none; cursor: pointer; color: #ccc;
    padding: 5px; border-radius: 6px; line-height: 1; font-size: 1em;
    transition: color .15s, background .15s; display: flex; align-items: center;
}
.wcucc-del:hover { color: #e74c3c; background: #fef0ee; }

/* ── Coupon ──────────────────────────────────────────── */
.wcucc-coupon-wrap { margin-top: 20px; }
.wcucc-coupon { display: flex; gap: 8px; }
.wcucc-wrap input.wcucc-coupon-code {
    flex: 1 1 auto; width: auto; min-width: 0; height: 44px; border: 1.5px solid #e8e8e8;
    border-radius: 8px; padding: 0 14px; font-size: .88em;
    color: #333; background: #fafafa; transition: border-color .2s, background .2s;
}
.wcucc-wrap input.wcucc-coupon-code:focus {
    outline: none; border-color: #aaa; background: #fff;
    box-shadow: 0 0 0 3px rgba(0,0,0,.05);
}

/* ── Buttons ─────────────────────────────────────────── */
.wcucc-btn-sec {
    display: inline-flex; align-items: center; justify-content: center;
    background: #f0f0f2; color: #444; border: none; cursor: pointer;
    font-size: .86em; font-weight: 600; height: 44px; padding: 0 18px;
    border-radius: 8px; transition: background .2s; white-space: nowrap;
    letter-spacing: .01em;
}
.wcucc-btn-sec:hover { background: #e4e4e8; }

/* Place order button */
.wcucc-checkout-wrap #place_order,
.wcucc-checkout-wrap .wcucc-order-btn {
    display: block; width: 100%;
    background-color: #1a1a2e !important;
    color: #fff !important;
    padding: 16px 32px;
    font-size: 1em; font-weight: 700;
    border-radius: 10px; border: none; cursor: pointer;
    margin-top: 10px; text-align: center;
    transition: background .2s, transform .1s;
    letter-spacing: .02em;
}
.wcucc-checkout-wrap #place_order:hover,
.wcucc-checkout-wrap .wcucc-order-btn:hover {
    background-color: #2e2e4a !important;
}
.wcucc-checkout-wrap #place_order:active { transform: scale(.98); }

/* ── Order summary ───────────────────────────────────── */
.wcucc-summary-wrap { margin-top: 22px; }
.wcucc-summary {
    border-top: 2px solid #f4f4f4; padding-top: 16px;
    display: flex; flex-direction: column; gap: 2px;
}
.wcucc-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0; font-size: .9em; color: #555; gap: 12px;
}
.wcucc-row span:last-child { font-weight: 600; color: #1a1a2e; }
.wcucc-row-total {
    font-weight: 700; font-size: 1.1em; color: #1a1a2e;
    border-top: 2px solid #f0f0f0; margin-top: 8px; padding-top: 14px;
}
.wcucc-row-total span { font-size: 1.1em; }
.wcucc-row-discount span:last-child { color: #c0392b !important; }

.wcucc-row-coupon { font-size: .82em; flex-wrap: wrap; gap: 6px; }
.wcucc-rm-coupon {
    background: none; border: 1px solid #e0e0e0; border-radius: 4px;
    cursor: pointer; font-size: .78em; color: #aaa; padding: 2px 8px;
    transition: all .15s; margin-left: auto;
}
.wcucc-rm-coupon:hover { border-color: #e74c3c; color: #e74c3c; }


.wcucc-item-var dl.variation { margin: 0; }
.wcucc-item-var dl.variation dt,
.wcucc-item-var dl.variation dd { display: inline; margin: 0; }
.wcucc-item-var dl.variation dd + dt::before { content: ', '; }

.wcucc-ck-empty {
    margin: 0;
    padding: 18px;
    border: 1px solid #ececf0;
    border-radius: 8px;
    text-align: center;
    color: #777;
    background: #fafafa;
}

/* ── Checkout form ───────────────────────────────────── */
.wcucc-checkout-wrap .woocommerce { max-width: 100%; }
.wcucc-checkout-wrap form.checkout { padding: 0; margin: 0; }

/* ── Checkout inner 2-col layout ────────────────────────
   Keep payment INSIDE the native WooCommerce checkout form.
   This avoids breaking submit/payment behavior and matches
   Elementor/WooCommerce much more closely.
   -------------------------------------------------------- */

.wcucc-col-checkout.wcucc-inner-2col {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.wcucc-ck-2col form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    column-gap: var(--wcucc-ck-gap, 28px);
    row-gap: var(--wcucc-ck-gap, 28px);
    align-items: start;
    background: transparent !important;
}

/* Billing is a real independent card, not a full-height parent column. */
.wcucc-ck-2col .wcucc-billing-panel {
    grid-column: 1;
    min-width: 0;
    width: 100%;
    height: auto;
    align-self: start;
    background: var(--wcucc-checkout-panel-bg, transparent);
    border-radius: var(--wcucc-checkout-panel-radius, 10px);
}

.wcucc-ck-2col .wcucc-billing-panel > .wcucc-title {
    margin-top: 0;
}

.wcucc-ck-2col #customer_details,
.wcucc-ck-2col .col2-set {
    min-width: 0;
    width: 100% !important;
    height: auto !important;
    align-self: start;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.wcucc-ck-2col #order_review_heading,
.wcucc-ck-2col #order_review {
    grid-column: 2;
    min-width: 0;
    width: 100% !important;
}

.wcucc-ck-2col #order_review_heading {
    display: none !important;
}

.wcucc-ck-2col #customer_details .col-1,
.wcucc-ck-2col #customer_details .col-2,
.wcucc-ck-2col .col2-set .col-1,
.wcucc-ck-2col .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

/* Hide duplicate order table if theme injects another one, but keep payment visible */
.wcucc-checkout-wrap .woocommerce-checkout-review-order-table {
    display: none !important;
}

.wcucc-ck-2col #payment {
    margin-top: 0 !important;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
}

.wcucc-ck-2col #order_review {
    position: sticky;
    top: var(--wcucc-payment-sticky-top, 20px);
    align-self: start;
    height: max-content !important;
    min-height: 0 !important;
}

/* In the two-column checkout the payment card owns the sticky behavior. */
.wcucc-col-checkout.wcucc-sticky.wcucc-inner-2col {
    position: static !important;
    top: auto !important;
}

.wcucc-checkout-wrap #payment .payment_methods,
.wcucc-checkout-wrap #payment .payment_box,
.wcucc-checkout-wrap #payment .place-order {
    width: 100%;
}

.wcucc-checkout-wrap #payment .payment_box,
.wcucc-checkout-wrap #payment .woocommerce-privacy-policy-text {
    font-size: .92em;
    line-height: 1.5;
}

@media (max-width: 767px) {
    .wcucc-ck-2col form.checkout {
        grid-template-columns: 1fr !important;
    }

    .wcucc-ck-2col .wcucc-billing-panel,
    .wcucc-ck-2col #customer_details,
    .wcucc-ck-2col .col2-set,
    .wcucc-ck-2col #order_review_heading,
    .wcucc-ck-2col #order_review {
        grid-column: 1 !important;
        position: static !important;
        top: auto !important;
    }
}

/* ── Order received / Thank You ──────────────────────── */
.wcucc-order-received { max-width: 680px; margin: 0 auto; }

.wcucc-order-received .woocommerce-order { }

.wcucc-order-received .woocommerce-notice--success,
.wcucc-order-received .woocommerce-thankyou-order-received {
    background: #edfbf3;
    border-left: 4px solid #27ae60;
    color: #1a6b3a;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 28px;
    font-size: 1.05em;
    font-weight: 600;
}

.wcucc-order-received .woocommerce-order-overview {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.wcucc-order-received .woocommerce-order-overview li {
    background: #f8f8fb;
    border: 1.5px solid #ebebf0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: .9em;
    flex: 1 1 140px;
    min-width: 120px;
}

.wcucc-order-received .woocommerce-order-overview li strong {
    display: block;
    font-size: 1.1em;
    color: #1a1a2e;
    margin-top: 4px;
}

.wcucc-order-received .woocommerce-order-details h2,
.wcucc-order-received .woocommerce-customer-details h2 {
    font-size: 1em;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.wcucc-order-received table.woocommerce-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: .9em;
}

.wcucc-order-received table.woocommerce-table th,
.wcucc-order-received table.woocommerce-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: top;
}

.wcucc-order-received table.woocommerce-table th {
    font-weight: 700;
    color: #666;
    font-size: .8em;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.wcucc-order-received table.woocommerce-table tfoot td,
.wcucc-order-received table.woocommerce-table tfoot th {
    font-weight: 700;
    color: #1a1a2e;
}

.wcucc-order-received .woocommerce-customer-details address {
    background: #f8f8fb;
    border: 1.5px solid #ebebf0;
    border-radius: 10px;
    padding: 16px 20px;
    font-style: normal;
    font-size: .9em;
    line-height: 1.7;
    color: #444;
}

/* ================================================================
   FIXES: duplicate coupon, express payments, shipping, 50/50 grid
   ================================================================ */

/* 1. Hide the native WooCommerce checkout coupon because this plugin renders its own. */
.wcucc-checkout-wrap .woocommerce-form-coupon-toggle,
.wcucc-checkout-wrap .checkout_coupon,
.wcucc-checkout-wrap .woocommerce-form-coupon { display: none !important; }

/* 2. Hide standalone express-checkout blocks without hiding real gateway fields. */
.wcucc-checkout-wrap .wcpay-express-checkout-wrapper,
.wcucc-checkout-wrap #wcpay-express-checkout-element,
.wcucc-checkout-wrap #wc-stripe-payment-request-wrapper,
.wcucc-checkout-wrap .wc-stripe-payment-request-button-separator-container,
.wcucc-checkout-wrap .wc-block-components-express-payment,
.wcucc-checkout-wrap .wc-block-components-express-payment-continue-rule,
.wcucc-checkout-wrap .spco-express-checkout,
.wcucc-checkout-wrap .woo-klarna-payments-express-checkout,
.wcucc-checkout-wrap [class*="express-checkout"],
.wcucc-checkout-wrap [class*="express_checkout"],
.wcucc-checkout-wrap [id*="express-checkout"],
.wcucc-checkout-wrap [id*="express_checkout"],
.wcucc-checkout-wrap .wc-proceed-to-checkout { display: none !important; }

/* 3. Hide the shipping calculator in the cart column; keep it available in checkout. */
.wcucc-col-cart .woocommerce-shipping-calculator,
.wcucc-col-cart .shipping-calculator-button,
.wcucc-col-cart .shipping-calculator-form,
.wcucc-col-cart .calculate-shipping { display: none !important; }

/* 4. Desktop 50/50 form layout: each first/last pair uses half the row. */
/*    The first/last fields already use the two-column grid.
      This also keeps generic non-wide form rows aligned to that grid. */

/* Main wrapper: two columns by default on desktop. */
.wcucc-checkout-wrap .woocommerce-billing-fields__field-wrapper,
.wcucc-checkout-wrap .woocommerce-shipping-fields__field-wrapper,
.wcucc-checkout-wrap .woocommerce-additional-fields__field-wrapper {
    display: grid !important;
    grid-template-columns: repeat( var(--wcucc-form-cols, 2), minmax(0, 1fr) ) !important;
    column-gap: 16px !important;
    row-gap: 0 !important;
    width: 100% !important;
}

/* First/last fields use one grid column each. */
.wcucc-checkout-wrap .form-row-first,
.wcucc-checkout-wrap .form-row-last {
    float: none !important;
    clear: none !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-column: auto !important;
}

/* Wide fields always span the full grid width. */
.wcucc-checkout-wrap .form-row-wide {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
}

/* Generic fields without first/last/wide classes also use one grid column. */
.wcucc-checkout-wrap .woocommerce-billing-fields__field-wrapper > .form-row:not(.form-row-wide):not(.form-row-first):not(.form-row-last),
.wcucc-checkout-wrap .woocommerce-shipping-fields__field-wrapper > .form-row:not(.form-row-wide):not(.form-row-first):not(.form-row-last),
.wcucc-checkout-wrap .woocommerce-additional-fields__field-wrapper > .form-row:not(.form-row-wide):not(.form-row-first):not(.form-row-last) {
    grid-column: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
}

/* Mobile uses a single column. */
@media (max-width: 767px) {
    .wcucc-checkout-wrap .woocommerce-billing-fields__field-wrapper,
    .wcucc-checkout-wrap .woocommerce-shipping-fields__field-wrapper,
    .wcucc-checkout-wrap .woocommerce-additional-fields__field-wrapper {
        grid-template-columns: 1fr !important;
    }
    .wcucc-checkout-wrap .form-row-first,
    .wcucc-checkout-wrap .form-row-last,
    .wcucc-checkout-wrap .form-row-wide {
        grid-column: 1 / -1;
    }
}

/* ── Isolate control borders from theme/browser hover and focus styles ── */
.wcucc-wrap .woocommerce-checkout .form-row:not(.woocommerce-invalid) :is(input.input-text, textarea, select, .select2-selection--single):hover {
    border-color: var(--wcucc-input-hover-border, var(--wcucc-input-border, #e8e8e8)) !important;
    box-shadow: none !important;
    outline: none !important;
}
.wcucc-wrap .woocommerce-checkout .form-row:not(.woocommerce-invalid) :is(input.input-text, textarea, select, .select2-selection--single):focus,
.wcucc-wrap .woocommerce-checkout .form-row:not(.woocommerce-invalid) :is(.select2-container--focus, .select2-container--open) .select2-selection--single {
    border-color: var(--wcucc-input-focus-border, var(--wcucc-input-border, #e8e8e8)) !important;
    box-shadow: 0 0 0 2px rgba(26, 26, 46, .08) !important;
    outline: none !important;
}
.wcucc-wrap input.wcucc-coupon-code:hover {
    border-color: var(--wcucc-coupon-border, #e8e8e8) !important;
    box-shadow: none !important;
    outline: none !important;
}
.wcucc-wrap input.wcucc-coupon-code:focus {
    border-color: var(--wcucc-coupon-focus-border, var(--wcucc-coupon-border, #e8e8e8)) !important;
    box-shadow: 0 0 0 2px rgba(26, 26, 46, .08) !important;
    outline: none !important;
}
.wcucc-wrap :is(.wcucc-minus, .wcucc-plus, .wcucc-del, #place_order, .wcucc-order-btn, .wccp-remove),
.wcucc-wrap :is(.wcucc-minus, .wcucc-plus, .wcucc-del, #place_order, .wcucc-order-btn, .wccp-remove):is(:hover, :focus, :active) {
    -webkit-appearance: none;
    appearance: none;
    border-style: solid !important;
    border-width: var(--wcucc-control-border-width, 0px) !important;
    border-color: var(--wcucc-control-border-color, transparent) !important;
    box-shadow: none !important;
}
.wcucc-wrap .wcucc-del {
    --wcucc-control-border-width: var(--wcucc-delete-border-width, 0px);
    --wcucc-control-border-color: var(--wcucc-delete-border, transparent);
}
.wcucc-wrap .wcucc-btn-sec,
.wcucc-wrap .wcucc-btn-sec:is(:hover, :focus, :active) {
    -webkit-appearance: none;
    appearance: none;
    border-width: var(--wcucc-secondary-border-width, 0px) !important;
    border-style: solid !important;
    border-color: var(--wcucc-secondary-border, transparent) !important;
    box-shadow: none !important;
}
.wcucc-wrap .wcucc-btn-sec:hover {
    border-color: var(--wcucc-secondary-hover-border, var(--wcucc-secondary-border, transparent)) !important;
}
.wcucc-wrap .wcucc-rm-coupon:is(:hover, :focus, :active) {
    border-color: var(--wcucc-secondary-hover-border, #e0e0e0) !important;
    box-shadow: none !important;
}
.wcucc-wrap :is(.wcucc-minus, .wcucc-plus, .wcucc-del, .wcucc-btn-sec, .wcucc-rm-coupon, #place_order, .wcucc-order-btn, .wccp-remove):is(:hover, :focus, :active) {
    outline: none !important;
}
/* Keep a visible keyboard focus indicator instead of removing accessibility cues. */
.wcucc-wrap :is(.wcucc-minus, .wcucc-plus, .wcucc-del, .wcucc-btn-sec, .wcucc-rm-coupon, .wcucc-qty-input, #place_order, .wcucc-order-btn, .wccp-remove):focus-visible {
    outline: 2px solid var(--wcucc-input-focus-border, #6b7280) !important;
    outline-offset: 2px !important;
}
.wcucc-wrap :is(.wcucc-minus, .wcucc-plus, .wcucc-qty-input):focus-visible {
    outline-offset: -3px !important;
}
@media (forced-colors: active) {
    .wcucc-wrap :focus-visible { outline: 2px solid Highlight !important; }
}

/* v1.5.8: keep Elementor payment-box controls above WooCommerce gateway CSS loaded later. */
.wcucc-checkout-wrap.woocommerce-checkout #payment div.payment_box,
.wcucc-checkout-wrap .woocommerce-checkout #payment div.payment_box {
    box-sizing: border-box;
}


/* v1.5.9: payment-box controls use inline widget variables so they do not depend on Elementor CSS regeneration. */
.wcucc-wrap .woocommerce-checkout #payment div.payment_box,
.wcucc-wrap #payment div.payment_box {
    background-color: var(--wcucc-payment-box-bg, #dcd7e2) !important;
    color: var(--wcucc-payment-box-color, #515151) !important;
    font-size: var(--wcucc-payment-box-font-size, .92em) !important;
    line-height: var(--wcucc-payment-box-line-height, 1.5em) !important;
    padding: var(--wcucc-payment-box-padding, 1em 1em 1em 1em) !important;
    margin: var(--wcucc-payment-box-margin, 1em 0 1em 0) !important;
    border-radius: var(--wcucc-payment-box-radius, 2px) !important;
}
.wcucc-wrap .woocommerce-checkout #payment div.payment_box::before,
.wcucc-wrap #payment div.payment_box::before {
    border-bottom-color: var(--wcucc-payment-box-bg, #dcd7e2) !important;
}
.wcucc-wrap .woocommerce-checkout #payment div.payment_box :is(p, div, span, small, strong, a),
.wcucc-wrap #payment div.payment_box :is(p, div, span, small, strong, a) {
    color: var(--wcucc-payment-box-color, #515151) !important;
}

/* v1.6.2: WooCommerce/Elementor can generate a more specific !important rule for
   .payment_box. The JS layer applies the widget values as inline !important styles.
   This selector only keeps the payment-box arrow synchronized with that value. */
.wcucc-wrap.wcucc-wrap.wcucc-wrap .wcucc-checkout-wrap.wcucc-checkout-wrap #payment div.payment_box.payment_box::before {
    border-bottom-color: var(--wcucc-payment-box-effective-bg, var(--wcucc-payment-box-bg, #dcd7e2)) !important;
}

/* Mobile cart: thumbnail, product details, price, then quantity controls. */
@media (max-width: 767px) {
    .wcucc-wrap .wcucc-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        min-width: 0;
    }
    .wcucc-wrap .wcucc-item-img {
        order: 1;
        flex: none !important;
        max-width: 100%;
    }
    .wcucc-wrap .wcucc-item-info {
        display: contents;
    }
    .wcucc-wrap .wcucc-item-name {
        order: 2;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .wcucc-wrap .wcucc-item-var {
        order: 2;
        min-width: 0;
        overflow-wrap: anywhere;
    }
    .wcucc-wrap .wcucc-item-price {
        order: 3;
        min-width: 0 !important;
        width: 100%;
        text-align: left;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .wcucc-wrap .wcucc-item-row {
        order: 4;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        min-width: 0;
        margin-top: 0;
    }
}

/* Native WooCommerce checkout section titles: sensible defaults, configurable in Elementor. */
.wcucc-wrap .wcucc-checkout-wrap .woocommerce-billing-fields > h3,
.wcucc-wrap .wcucc-checkout-wrap .woocommerce-additional-fields > h3 {
    font-size: 22px;
    line-height: 1.3;
    font-weight: 500;
    margin: 0 0 20px;
}
@media (max-width: 767px) {
    .wcucc-wrap .wcucc-checkout-wrap .woocommerce-billing-fields > h3,
    .wcucc-wrap .wcucc-checkout-wrap .woocommerce-additional-fields > h3 {
        font-size: 18px;
        line-height: 1.35;
        margin-bottom: 16px;
    }
    .wcucc-wrap .wcucc-billing-panel > .wcucc-title {
        font-size: 22px;
        line-height: 1.3;
    }
}

/* Checkout main heading: independent styling in Elementor. */
.wcucc-wrap .wcucc-ck-2col .wcucc-billing-panel > .wcucc-checkout-main-title {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 500;
}
@media (max-width: 767px) {
    .wcucc-wrap .wcucc-ck-2col .wcucc-billing-panel > .wcucc-checkout-main-title {
        font-size: 22px;
        line-height: 1.3;
    }
}

/* Payment gateway logos: preserve normal flow and avoid overlapping titles on mobile. */
.wcucc-wrap #payment ul.payment_methods {
    background-color: var(--wcucc-payment-methods-bg, transparent);
    min-width: 0;
}
.wcucc-wrap #payment ul.payment_methods > li {
    min-width: 0;
    height: auto;
}
.wcucc-wrap #payment ul.payment_methods > li > label {
    height: auto;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
}
.wcucc-wrap #payment ul.payment_methods > li > label img {
    display: inline-block;
    position: static;
    float: none;
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    vertical-align: middle;
}
@media (max-width: 767px) {
    .wcucc-wrap #payment ul.payment_methods > li > label {
        display: block;
        line-height: 1.45;
    }
    .wcucc-wrap #payment ul.payment_methods > li > label img {
        display: block !important;
        clear: both;
        max-height: 64px;
        margin: 10px 0 6px !important;
    }
    .wcucc-wrap #payment ul.payment_methods > li > input[type="radio"] {
        vertical-align: middle;
    }
    .wcucc-wrap #payment ul.payment_methods > li > div.payment_box {
        clear: both;
        max-width: 100%;
    }
}

/* Shipping-address toggle heading: independent default sizes, Elementor can override. */
.wcucc-checkout-wrap #ship-to-different-address label span { font-size: 23px; line-height: 1.3; }
@media (max-width: 767px) {
  .wcucc-checkout-wrap #ship-to-different-address label span { font-size: 21px; }
}
