.woocommerce-checkout .woocommerce {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
}

form.checkout.woocommerce-checkout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px;
    margin-top: 20px;
}

div#customer_details {
    grid-column: span 7;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

div#order_review {
    grid-column: span 5;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

div#backorder-notice {
    grid-column: span 12;
}

.woocommerce-additional-fields {
    margin-top: 20px;
}

.shipping-method-review,
.order-review-wrap,
.payment-wrap {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
}

h3.checkout-subheader {
    text-align: center;
    margin-bottom: 15px !important;
    font-size: 20px;
}

.woocommerce-billing-fields h3 {
    margin-bottom: 20px;
}

/* WooCommerce Notices Checkout */

.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
    grid-column: span 12;
}

.woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul#shipping_method {
    padding-left: 0px;
    margin: 0;
}

.woocommerce-billing-fields {

    .woocommerce-input-wrapper input[readonly="readonly"],
    #billing_country_field strong,
    #shipping_country_field strong {
        background: #fff;
        opacity: 0.5;
        cursor: not-allowed;
    }

    .woocommerce-input-wrapper input[readonly="readonly"]:focus {
        outline: none;
    }
}

.woocommerce-checkout .woocommerce-message {
    margin-top: 20px;
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    form.checkout.woocommerce-checkout {
        grid-template-columns: repeat(6, 1fr);
    }

    div#customer_details {
        grid-column: span 6;
    }

    div#order_review {
        grid-column: span 6;
    }

    div#backorder-notice {
        grid-column: span 6;
    }

    .woocommerce-NoticeGroup.woocommerce-NoticeGroup-checkout {
        grid-column: span 6;
    }
}

/* Header Checkout */

.header-desktop_checkout {
    background-color: var(--color-primary);
    padding: 20px;
}

.header-desktop_checkout .container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.header-desktop_checkout .go-back-link a {
    text-decoration: none;
    color: var(--color-white-light);
    transition: 0.1s ease;
}

.header-desktop_checkout .go-back-link a:hover {
    color: var(--color-white);
}

@media (max-width: 767px) {
    .header-desktop_checkout .header-desktop__logo img {
        width: 120px;
    }

    .header-desktop_checkout .go-back-link a {
        width: 100%;
        display: flex;
        max-width: 100px;
        text-align: right;
        font-size: 14px;
        line-height: 1.3;
    }
}

/* Footer Checkout */

.footer-desktop_checkout {
    padding: 0 20px 60px 20px;
    color: var(--color-text-light);
}

.footer-desktop_checkout .container p:not(:last-child) {
    margin-bottom: 15px;
}

@media (max-width: 767px) {
    .footer-desktop_checkout {
        text-align: center;
    }

    .footer-desktop_checkout .container {
        align-items: center;
    }
}

/* Shipping Methods */

.woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-shipping-methods li:not(:last-of-type) {
    margin-bottom: 10px;
}

.woocommerce-shipping-methods li input {
    display: none;
}

.woocommerce-shipping-methods li label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 15px;
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-small);
    transition: border-color 100ms ease;
    cursor: pointer;
}

.woocommerce-shipping-methods .shipping-method-title {
    display: flex;
    flex: 1;
    font-weight: 600;
}

.shipping-method-description {
    width: 100%;
    margin-top: 10px;
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: var(--font-weight);
    line-height: 166%;
}

.woocommerce-shipping-methods li label span.woocommerce-Price-amount.amount {
    margin-left: auto;
    font-size: 14px;
}

.woocommerce-shipping-methods li label:hover,
.woocommerce-shipping-methods li input:checked+label {
    border-color: var(--color-primary);
}

.woocommerce-shipping-methods li label:before {
    content: "";
    margin-right: 10px;
    width: 20px;
    height: 20px;
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-radio-button);
    display: inline-flex;
    transition: background-color 100ms ease;
}

.woocommerce-shipping-methods li input:checked+label:before {
    border: solid 6px var(--color-primary);
}

/* Coupon Code */

.woocommerce-coupon {
    padding: 20px;
    border: solid 1px var(--color-border-colored);
    border-radius: var(--border-radius);
}

.woocommerce-form-coupon-toggle a.showcoupon {
    color: var(--color-text);
}

form.checkout_coupon.woocommerce-form-coupon {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

form.checkout_coupon.woocommerce-form-coupon p:first-child {
    width: 100%;
}

form.checkout_coupon input#coupon_code {
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-input);
    padding: 10px 15px;
    width: 100%;
    flex: 1;
}

form.checkout_coupon p.form-row.form-row-first {
    flex: 1;
}

.woocommerce-coupon ul {
    list-style: none;
    margin: 20px 0 0 0;
}

.woocommerce-coupon ul li {
    padding: 20px;
    border-radius: var(--border-radius-small);
}

.woocommerce-coupon ul.woocommerce-error li {
    background-color: var(--color-error-light);
    border: solid 1px #ebd5d5;
    border-left: solid 10px var(--color-error);
}

@media (max-width: 767px) {
    .woocommerce-coupon {
        padding: 15px;
    }

    .woocommerce-form-coupon-toggle a.showcoupon {
        display: block;
    }

    .woocommerce-form-coupon-toggle {
        line-height: 1.5;
    }

    form.checkout_coupon.woocommerce-form-coupon {
        flex-direction: column;
    }

    form.checkout_coupon p.form-row.form-row-last button {
        width: 100%;
    }
}

/* Order Review */

table.shop_table.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
}

table.shop_table.woocommerce-checkout-review-order-table th {
    text-align: left;
}

table.shop_table.woocommerce-checkout-review-order-table tr:not(.cart_item_show_more) td:not(.product-name),
table.shop_table.woocommerce-checkout-review-order-table tr th.product-total {
    text-align: right;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td {
    border-bottom: dashed 1px var(--color-border);
    padding: 10px 0;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td.product-name .product-name-wrapper {
    display: flex;
    gap: 5px;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td.product-name img {
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-xsmall);
    padding: 3px;
    object-fit: contain;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td.product-name .product-data .product-title {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td.product-name .product-data .product-sku {
    font-size: 11px;
    line-height: 1.1;
    font-weight: normal;
    color: var(--color-text-light);
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item td.product-name .product-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

table.shop_table.woocommerce-checkout-review-order-table tbody tr:not(.cart_item_show_more) td:not(.product-name) {
    font-size: 13px;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item_show_more td {
    padding: 10px 0;
    text-align: center;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item_show_more td button {
    border: none;
    background: none;
    color: var(--color-text);
    font-weight: var(--font-weight-button);
    font-size: var(--font-size-button-small);
    cursor: pointer;
    opacity: 1;
    transition: 0.1s ease;
}


td.product-total .qty-discount-price {
    font-size: var(--font-size-xsmall);
    color: var(--color-text-light);
    text-decoration: line-through;
}

td.product-total {
    vertical-align: middle;
}

table.shop_table.woocommerce-checkout-review-order-table tr.cart_item_show_more td button:hover {
    opacity: 0.6;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr:not(.order-total) th,
table.shop_table.woocommerce-checkout-review-order-table tfoot tr:not(.order-total) td {
    font-weight: normal;
    font-size: 13px;
    padding: 5px 0;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal th,
table.shop_table.woocommerce-checkout-review-order-table tfoot tr.cart-subtotal td {
    padding-top: 10px;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr.tax-rate th,
table.shop_table.woocommerce-checkout-review-order-table tfoot tr.tax-rate td {
    padding-bottom: 10px;
}

table.shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total th,
table.shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total td,
table.shop_table.woocommerce-checkout-review-order-table tfoot tr.order-total td strong {
    font-size: 16px;
    padding: 13px 0 0 0;
    font-weight: 600;
    border-top: dashed 1px var(--color-border);
}

body:not(.woocommerce-cart-items-toggled) .show-less-items,
body:not(.woocommerce-cart-items-toggled) .cart_item_hidden,
body.woocommerce-cart-items-toggled .show-more-items {
    display: none;
}

body:not(.woocommerce-cart-items-toggled) .cart_item_fadeout td {
    -webkit-mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.2) 40%,
            rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.2) 40%,
            rgba(0, 0, 0, 0) 100%);
}

a.woocommerce-remove-coupon {
    color: var(--color-text);
}

/* Payments */

ul.wc_payment_methods.payment_methods.methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

ul.wc_payment_methods.payment_methods.methods li:not(:last-of-type) {
    margin-bottom: 10px;
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method input {
    display: none;
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-weight: 600;
    padding: 15px;
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-small);
    transition: border-color 100ms ease;
    cursor: pointer;
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method label:hover,
ul.wc_payment_methods.payment_methods.methods li.wc_payment_method input:checked+label {
    border-color: var(--color-primary);
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method label:before {
    content: "";
    margin-right: 6px;
    width: 20px;
    height: 20px;
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-radio-button);
    display: inline-flex;
    transition: background-color 100ms ease;
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method input:checked+label:before {
    border: solid 6px var(--color-primary);
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method .payment_box {
    display: flex !important;
    width: 100%;
}

ul.wc_payment_methods.payment_methods.methods li.wc_payment_method .payment_box p {
    font-size: 13px;
    margin-top: 10px;
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: var(--font-weight);
    line-height: 166%;
}

/* Place Order */

.form-row.place-order {
    margin-top: 20px;
}

button#place_order {
    width: 100%;
}

/* Shipping Addon */

label.shipping-addon-label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: solid 1px var(--color-border);
    border-radius: var(--border-radius-small);
    transition: border-color 100msease;
    cursor: pointer;
    position: relative;
    background-color: var(--color-white);
}

.shipping-addon input {
    display: none !important;
}

label.shipping-addon-label:before {
    content: '';
    display: flex;
    width: 22px;
    height: 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-checkbox);
    background-color: var(--color-white);
    transition: background-color 100msease;
    margin-right: 10px;
    flex-shrink: 0;
}

.shipping-addon input:checked+label.shipping-addon-label:before {
    background-color: var(--color-primary);
    background-image: url(../../images/icons/checkmark.svg);
    background-size: 15px;
    background-position: center;
    background-repeat: no-repeat;
    border-color: var(--color-primary);
}

.shipping-addon input:checked+label.shipping-addon-label {
    border-color: var(--color-primary);
}

.shipping-addon:not(:last-of-type) {
    margin-bottom: 10px;
}

.shipping-addons-inner {
    background-color: var(--color-white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
}

.shipping-addon-data {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-right: 10px;
}

span.shipping-addon-text {
    width: 100%;
    color: var(--color-text-light);
    font-size: 13px;
    font-weight: var(--font-weight);
    line-height: 166%;
}

span.shipping-addon-title {
    font-weight: 600;
}

.shipping-addon-price {
    font-size: 14px;
}

.ferry-surcharge-modal {
    display: flex;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 999999999;
    align-items: center;
    justify-content: center;
}

.ferry-surcharge-modal-drop {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: rgba(0, 0, 0, .5);
}

.ferry-surcharge-modal-inner {
    background-color: #fff;
    z-index: 2;
    width: 534px;
    border-radius: 10px;
    border: 1px solid #F2F2F2;
    overflow: hidden;
}

.ferry-surcharge-modal-head {
    padding: 30px 30px 25px 30px;
    border-bottom: 1px solid #F2F2F2;
    color: #003423;
    font-weight: 600;
    font-size: 20px;
    line-height: 26px;
}

.ferry-surcharge-modal-body {
    padding: 25px 30px 25px 30px;
    color: #818181;
    font-size: 15px;
    font-weight: 500;
    line-height: 25px;
}

.ferry-surcharge-modal-checkbox {
    padding: 0 30px 25px 30px;
}

.ferry-surcharge-modal-checkbox input {
    display: none;
}

.ferry-surcharge-modal-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    color: #1C2228;
}

.ferry-surcharge-modal-checkbox label:before {
    content: '';
    display: flex;
    width: 22px;
    height: 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-checkbox);
    background-color: var(--color-white);
    transition: background-color 100msease;
    margin-right: 10px;
    flex-shrink: 0;
}

.ferry-surcharge-modal-checkbox input:checked+label:before {
    background-color: var(--color-primary);
    background-image: url(../../images/icons/checkmark.svg);
    background-size: 15px;
    background-position: center;
    background-repeat: no-repeat;
    border-color: var(--color-primary);
}

.ferry-surcharge-modal-actions {
    border-top: 1px solid #F2F2F2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background-color: #F2F2F2;
    gap: 1px;
}

.ferry-surcharge-modal-actions button {
    width: 100%;
    text-align: center;
    color: #003423;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 26px;
    border: 0;
    background-color: #fff;
    padding: 20px;
    border-radius: 0;
}

.ferry-surcharge-modal-actions button:disabled {
    color: #ddd;
}