/* GxP Training Academy – Cart & Checkout design.
   Markup: woocommerce/cart/cart.php, cart/cart-empty.php, checkout/form-checkout.php.
   Keep every selector scoped under .gxp-wrap / .gxp-checkout: the header auth menu
   ([gxp_auth_menu]) also uses .gxp-btn, and unscoped rules leak into it. */
.gxp-wrap {
    --teal: #15b8a6;
    --teal-h: #10a090;
    --navy: #0b1b4a;
    --navy-h: #14307a;
    --text: #12183a;
    --muted: #6b7390;
    --line: #e1e5f0;
    --bg: #f5f7fb;
    --chip: #e8f8f5;
    --card: #fff;
    --danger: #d64545;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    color: var(--text);
    font-family: "Plus Jakarta Sans", Sans-serif;
    box-sizing: border-box
}
.woocommerce-cart .site-main, .woocommerce-checkout .site-main{
    max-width: 1280px !important;
}
button#gxp-coupon-toggle:hover,
#gxp-coupon-toggle:focus {
    background: transparent;
    color: var(--text);
}
.woocommerce-cart .site-main .entry-title, .woocommerce-checkout .site-main .entry-title{
    max-width: 1280px !important;
    padding: 0 20px;
}
.gxp-wrap *,
.gxp-wrap *::before,
.gxp-wrap *::after {
    box-sizing: border-box
}

.gxp-wrap a {
    text-decoration: none;
    box-shadow: none
}

.gxp-wrap h2,
.gxp-wrap h3 {
    font-family: inherit;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0
}

.gxp-panel,
.gxp-left,
.gxp-summary {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(20, 30, 70, .07)
}

.gxp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start
}

/* Buttons */
.gxp-wrap .gxp-btn,
.gxp-wrap #place_order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--navy);
    color: #fff !important;
    border: 0;
    border-radius: 14px;
    padding: 18px;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(11, 27, 74, .25);
    transition: .15s
}

.gxp-wrap .gxp-btn:hover,
.gxp-wrap #place_order:hover {
    background: var(--navy-h);
    transform: translateY(-1px)
}

.gxp-secure {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600
}

.gxp-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0
}

/* ---------- CART ---------- */
.gxp-head {
    display: grid;
    grid-template-columns: 1fr 110px;
    padding: 18px 26px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--muted);
    text-transform: uppercase
}

.gxp-head span:last-child {
    text-align: right
}

.gxp-item {
    display: grid;
    grid-template-columns: 96px 1fr 110px;
    gap: 20px;
    padding: 24px 26px;
    border-bottom: 1px solid var(--line);
    align-items: start
}

.gxp-item:last-child {
    border-bottom: 0
}

.gxp-thumb {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid var(--line)
}

.gxp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0
}

.gxp-name {
    margin: 2px 0 4px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35
}

.gxp-name a {
    color: var(--text)
}

.gxp-unit {
    color: var(--muted);
    font-size: 14px;
    font-weight: 500
}

.gxp-info dl.variation {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted)
}

.gxp-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px
}

.gxp-badge {
    display: inline-block;
    background: var(--chip);
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px
}

.gxp-qty {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden
}

.gxp-qty button {
    width: 40px;
    height: 42px;
    border: 0;
    background: transparent;
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    padding: 0
}

.gxp-qty button:hover {
    background: var(--bg)
}

.gxp-qty input {
    width: 46px;
    height: 42px;
    border: 0;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
    box-shadow: none
}

.gxp-qty input::-webkit-outer-spin-button,
.gxp-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0
}

.gxp-del {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--muted)
}

.gxp-del:hover {
    color: var(--danger);
    background: rgba(214, 69, 69, .1)
}

.gxp-line {
    text-align: right;
    font-weight: 800;
    font-size: 17px;
    padding-top: 4px
}

.gxp-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--teal) !important;
    font-weight: 700;
    font-size: 15px
}

.gxp-empty {
    padding: 60px 26px;
    text-align: center
}

.gxp-empty h2 {
    margin: 0 0 8px;
    font-size: 24px
}

.gxp-empty p {
    color: var(--muted);
    margin: 0 0 24px
}

.gxp-empty .gxp-btn {
    display: inline-flex;
    width: auto;
    padding: 16px 28px
}

.gxp-totals {
    padding: 26px;
    position: sticky;
    top: 100px
}

.gxp-totals h2 {
    font-size: 12px;
    letter-spacing: .1em !important;
    text-transform: uppercase !important;
    color: var(--muted) !important;
    margin: 0 0 16px;
    font-weight: 700
}

.gxp-coupon {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line)
}

.gxp-coupon>button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: 0;
    padding: 16px 0;
    color: var(--text);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    box-shadow: none
}

.gxp-coupon>button svg {
    transition: transform .2s
}

.gxp-coupon.open>button svg {
    transform: rotate(180deg)
}

.gxp-coupon-body {
    display: none;
    gap: 8px;
    padding: 0 0 16px;
    margin: 0
}

.gxp-coupon.open .gxp-coupon-body {
    display: flex
}

.gxp-coupon-body input[type=text] {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 0 14px;
    font: inherit;
    background: #fff
}

.gxp-coupon-body input:focus {
    outline: 2px solid var(--teal);
    border-color: transparent
}

.gxp-coupon-body button {
    border: 0;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    padding: 0 18px;
    font-weight: 700;
    cursor: pointer
}

.gxp-sum {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    font-size: 15px;
    color: var(--muted);
    font-weight: 600
}

.gxp-sum-coupon a {
    color: var(--danger);
    font-size: 12px;
    margin-left: 6px
}

.gxp-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px
}

.gxp-total>span {
    font-size: 18px;
    font-weight: 700
}

.gxp-total strong {
    font-size: 28px;
    font-weight: 800;
    text-align: right
}

.gxp-total small {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 500
}

.gxp-sticky {
    display: none
}

/* ---------- CHECKOUT ---------- */
.gxp-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start
}

.gxp-checkout .woocommerce-form-coupon-toggle,
.gxp-checkout form.checkout_coupon,
.gxp-checkout .woocommerce-form-login-toggle {
    grid-column: 1/-1
}

.gxp-checkout .woocommerce-info {
    background: var(--chip);
    border: 0;
    border-radius: 14px;
    color: var(--text);
    padding: 14px 18px;
    margin: 0 0 20px;
    font-weight: 600;
    font-size: 14px
}

.gxp-checkout .woocommerce-info::before {
    display: none
}

.gxp-checkout .woocommerce-info a {
    color: var(--teal);
    font-weight: 700
}

.gxp-checkout form.checkout_coupon {
    background: var(--card);
    border: 1px solid var(--line) !important;
    border-radius: 14px;
    padding: 18px;
    margin: 0 0 20px
}

.gxp-left {
    padding: 30px;
    counter-reset: gxp
}

.gxp-checkout #customer_details {
    display: block;
    width: 100%;
    float: none;
    margin: 0
}

.gxp-checkout #customer_details .col-1,
.gxp-checkout #customer_details .col-2 {
    float: none;
    width: 100%;
    max-width: none;
    padding: 0
}

.gxp-left h3 {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 18px
}

.gxp-left .woocommerce-billing-fields>h3,
.gxp-pay-title {
    display: flex;
    align-items: center;
    gap: 12px;
    counter-increment: gxp
}

.gxp-left .woocommerce-billing-fields>h3::before,
.gxp-pay-title::before {
    content: counter(gxp);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--chip);
    color: var(--teal);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
    flex: none
}

.gxp-checkout .woocommerce-additional-fields>h3 {
    display: none
}

.gxp-checkout .woocommerce-additional-fields {
    margin-top: 22px
}

.gxp-checkout .woocommerce-billing-fields__field-wrapper,
.gxp-checkout .woocommerce-shipping-fields__field-wrapper,
.gxp-checkout .woocommerce-additional-fields__field-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 14px
}

.gxp-checkout .form-row {
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-column: 1/-1
}

.gxp-checkout #billing_first_name_field,
.gxp-checkout #billing_last_name_field,
.gxp-checkout #billing_city_field,
.gxp-checkout #billing_state_field,
.gxp-checkout #billing_postcode_field,
.gxp-checkout #billing_phone_field {
    grid-column: auto
}

.gxp-checkout .form-row label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
    color: var(--text)
}

.gxp-checkout .form-row .required {
    color: var(--danger);
    text-decoration: none
}

.gxp-checkout .form-row .optional {
    color: var(--muted);
    font-weight: 500
}

.gxp-checkout input.input-text,
.gxp-checkout select,
.gxp-checkout textarea {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-size: 15px;
    color: var(--text);
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s
}

.gxp-checkout textarea {
    height: auto;
    min-height: 100px;
    padding: 14px 16px
}

.gxp-checkout input.input-text:focus,
.gxp-checkout select:focus,
.gxp-checkout textarea:focus {
    outline: 0;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(21, 184, 166, .15)
}

.gxp-checkout .woocommerce-invalid input.input-text {
    border-color: var(--danger)
}

.gxp-checkout .select2-container .select2-selection--single {
    height: 52px;
    border: 1.5px solid var(--line);
    border-radius: 12px
}

.gxp-checkout .select2-container .select2-selection__rendered {
    line-height: 36px;
    padding-left: 16px;
    color: var(--text);
    color: #253858;
    font-size: 14px;
    font-weight: 400;
}

.gxp-checkout .select2-container .select2-selection__arrow {
    height: 50px;
    right: 10px
}

.gxp-checkout .select2-container--open .select2-selection--single,
.gxp-checkout .select2-container--focus .select2-selection--single {
    border-color: var(--teal)
}

/* Payment */
.gxp-payment-wrap {
    margin-top: 34px
}

.gxp-checkout #payment {
    background: none;
    border-radius: 0
}

.gxp-checkout #payment ul.payment_methods {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 12px
}

.gxp-checkout #payment ul.payment_methods li {
    border: 2px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 0;
    background: #fff;
    list-style: none
}

.gxp-checkout #payment ul.payment_methods li:has(input:checked) {
    border-color: var(--teal);
    background: var(--chip)
}

.gxp-checkout #payment ul.payment_methods li label {
    display: inline;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin: 0
}

.gxp-checkout #payment ul.payment_methods li input[type=radio] {
    accent-color: var(--teal);
    margin: 0 10px 0 0;
    width: 18px;
    height: 18px;
    vertical-align: middle
}

.gxp-checkout #payment ul.payment_methods li img {
    max-height: 22px;
    margin-left: 8px;
    vertical-align: middle
}

.gxp-checkout #payment div.payment_box {
    background: transparent;
    color: var(--muted);
    padding: 10px 0 0 28px;
    margin: 0;
    font-size: 13.5px
}

.gxp-checkout #payment div.payment_box::before {
    display: none
}

.gxp-checkout #payment .place-order {
    padding: 0;
    margin: 0
}

.gxp-checkout .woocommerce-terms-and-conditions-wrapper {
    margin: 24px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6
}

.gxp-checkout .woocommerce-terms-and-conditions-wrapper a,
.gxp-checkout .woocommerce-privacy-policy-text a {
    color: var(--teal);
    font-weight: 700;
    text-decoration: underline
}

.gxp-checkout .woocommerce-privacy-policy-text {
    font-size: 13px;
    color: var(--muted)
}

.gxp-checkout #place_order {
    float: none;
    margin-top: 18px
}

/* Order summary */
.gxp-summary {
    padding: 26px;
    position: sticky;
    top: 100px
}

.gxp-summary h2 {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 14px
}

.gxp-checkout #order_review_heading {
    display: none
}

.gxp-checkout #order_review {
    padding: 0;
    border: 0;
    width: 100%;
    float: none;
    margin: 0
}

.gxp-checkout table.shop_table {
    border: 0 !important;
    border-collapse: collapse;
    width: 100%;
    margin: 0;
    background: none
}

.gxp-checkout table.shop_table thead {
    display: none
}

.gxp-checkout table.shop_table th,
.gxp-checkout table.shop_table td {
    padding: 14px 0;
    border: 0;
    border-top: 1px solid var(--line);
    font-size: 14.5px;
    background: none;
    vertical-align: middle
}

/* .gxp-checkout table.shop_table tr:first-child td {
    border-top: 0
} */

.gxp-rv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700
}

.gxp-rv-th img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
    display: block;
    margin: 0
}

.gxp-checkout td.product-name .product-quantity {
    color: var(--muted);
    font-weight: 600;
    margin-left: 4px
}

.gxp-checkout td.product-total {
    text-align: right;
    font-weight: 800
}

.gxp-checkout tfoot th {
    text-align: left;
    color: var(--muted);
    font-weight: 600
}

.gxp-checkout tfoot td {
    text-align: right;
    font-weight: 700
}

.gxp-checkout tr.order-total th {
    font-size: 17px;
    color: var(--text);
    font-weight: 700
}

.gxp-checkout tr.order-total td {
    font-size: 26px;
    font-weight: 800
}

.gxp-trust {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    background: var(--bg);
    font-size: 13px;
    font-weight: 600;
    color: var(--muted)
}

.gxp-trust div {
    display: flex;
    gap: 10px;
    align-items: center
}

.gxp-trust svg {
    color: var(--teal);
    flex: none
}

/* Notices */
.gxp-wrap .woocommerce-message,
.gxp-wrap .woocommerce-error {
    border-radius: 14px;
    margin: 0 0 20px
}

.default-cart-section,
.default-checkout-section {
    display: none;
}
.woocommerce-checkout .gxp-left span.woocommerce-input-wrapper input, .woocommerce-checkout .gxp-left span.woocommerce-input-wrapper textarea, .woocommerce-checkout .checkout_coupon .form-row-first input {
    display: block;
    width: 100%;
    margin-top: 9px;
    padding: 14px 15px;
    min-height: 51px;
    box-sizing: border-box;
    border: 1px solid #d8e4f1;
    border-radius: 7px;
    background: #fff;
    color: #253858;
    font-size: 14px;
    font-weight: 400;
    font-family: inherit;
    outline: none;
    box-shadow: none;
}
.woocommerce-checkout .checkout_coupon .form-row-first input {
    margin-top: 0;
}
.woocommerce-checkout .checkout_coupon .form-row-last .button {
    border: 0;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    padding: 16px 18px 18px;
    font-weight: 700;
}
.woocommerce-checkout .checkout_coupon p.form-row.form-row-first {
    flex: 1;
    margin-right: 15px !important;
}
.woocommerce-checkout .checkout_coupon {
    display: flex;
    align-items: center;
}
/* ---------- TABLET ---------- */
@media (max-width:900px) {

    .gxp-grid,
    .gxp-checkout form.checkout {
        grid-template-columns: 1fr;
        gap: 20px
    }

    .gxp-totals,
    .gxp-summary {
        position: static
    }

    .gxp-totals {
        max-width: 520px;
        margin-left: auto;
        width: 100%
    }

    .gxp-summary {
        order: -1;
        padding: 22px
    }

    .gxp-wrap {
        padding-bottom: 60px
    }
}

/* ---------- MOBILE ---------- */
@media (max-width:600px) {
    .gxp-wrap {
        padding: 16px 20px 80px
    }
    .woocommerce-cart .site-main .entry-title, .woocommerce-checkout .site-main .entry-title {
    font-size: 24px;
}
.woocommerce-cart .site-main, .woocommerce-checkout .site-main{
    padding-inline-end: 0px !important;
    padding-inline-start: 0px !important;
}
    .gxp-head {
        display: none
    }

    .gxp-item {
        grid-template-columns: 76px 1fr;
        gap: 14px;
        padding: 18px 16px
    }

    .gxp-thumb {
        width: 76px;
        height: 76px
    }

    .gxp-line {
        grid-column: 2;
        text-align: left;
        padding: 0;
        margin-top: -4px;
        font-size: 16px
    }

    .gxp-line::before {
        content: "Subtotal: ";
        font-weight: 500;
        color: var(--muted);
        font-size: 13px
    }

    .gxp-actions {
        margin-top: 10px
    }

    .gxp-totals {
        padding: 20px 16px;
        max-width: none
    }

    .gxp-totals>.gxp-btn,
    .gxp-totals>.gxp-secure {
        display: none
    }

    .gxp-total {
        margin-bottom: 0;
        border-bottom: 0
    }

    .gxp-sticky {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999;
        background: var(--card);
        border-top: 1px solid var(--line);
        padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
        gap: 14px;
        align-items: center;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, .08)
    }

    .gxp-sticky div {
        font-size: 12px;
        color: var(--muted);
        font-weight: 600
    }

    .gxp-sticky strong {
        display: block;
        font-size: 20px;
        color: var(--text);
        font-weight: 800
    }

    .gxp-sticky .gxp-btn {
        flex: 1;
        padding: 15px;
        width: auto
    }

    .gxp-checkout.gxp-wrap {
        padding-bottom: 60px
    }

    .gxp-left {
        padding: 22px 16px
    }

    .gxp-checkout .woocommerce-billing-fields__field-wrapper,
    .gxp-checkout .woocommerce-shipping-fields__field-wrapper,
    .gxp-checkout .woocommerce-additional-fields__field-wrapper {
        grid-template-columns: 1fr
    }

    .gxp-checkout .form-row {
        grid-column: 1/-1 !important
    }

    .gxp-summary {
        padding: 18px 16px
    }
}