/* Custom checkout page — scoped to prevent changes to existing templates. */
body.woocommerce-checkout:not(.woocommerce-order-received) .am-entry > h1,
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce-breadcrumb,
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce-form-login-toggle,
body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce-form-coupon-toggle {
    display: none !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received) .am-main {
    padding-top: 34px;
    padding-bottom: 72px;
}

body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--single,
body.woocommerce-checkout:not(.woocommerce-order-received) .am-entry {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.am-checkout-form {
    --checkout-green: #3E5338;
    --checkout-soft: #F2F2F2;
    --checkout-gift: #D9DFD7;
    --checkout-border: #C7CAC4;
    --checkout-text: #282828;
    color: var(--checkout-text);
    font-family: Montserrat, sans-serif;
}

.am-checkout-form button,
.am-checkout-form input,
.am-checkout-form select,
.am-checkout-form textarea {
    font-family: inherit;
}

.am-checkout-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: center;
    margin: 0 0 36px;
}

.am-checkout-step {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 72px;
    align-items: center;
    min-width: 0;
    color: #969696;
}

.am-checkout-step::before,
.am-checkout-step::after {
    content: "";
    height: 1px;
    background: #A8A8A8;
}

.am-checkout-step::before {
    grid-column: 1;
    grid-row: 1;
}

.am-checkout-step::after {
    position: absolute;
    left: calc(100% - 1px);
    top: 50%;
    width: calc(100% - 72px);
}

.am-checkout-step:last-child::after {
    display: none;
}

.am-checkout-step > span {
    position: absolute;
    left: 8%;
    top: 50%;
    z-index: 1;
    transform: translateY(-50%);
    padding: 0 10px;
    background: #fff;
    color: inherit;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.am-checkout-step > i {
    position: relative;
    z-index: 2;
    grid-column: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #F7F8F6;
    box-shadow: 0 12px 28px rgba(62, 83, 56, .12);
    color: #777;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
}

.am-checkout-step.is-active,
.am-checkout-step.is-complete {
    color: #282828;
}

.am-checkout-step.is-active > i,
.am-checkout-step.is-complete > i {
    background: var(--checkout-green);
    color: #fff;
}

.am-checkout-step.is-complete > i::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--checkout-green);
    border-radius: inherit;
}

.am-checkout-title {
    margin: 0 0 36px;
    color: var(--checkout-green);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
}

.am-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
    align-items: start;
}

.am-checkout-main {
    min-width: 0;
}

.am-checkout-main h2,
.am-checkout-summary h2 {
    margin: 0;
    color: var(--checkout-green);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
}

.am-checkout-order-list > h2 {
    padding-bottom: 20px;
    border-bottom: 1px solid #AFAFAF;
}

.am-checkout-order-list__items {
    border-bottom: 1px solid #AFAFAF;
}

.am-checkout-cart-item {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) 110px 100px 26px;
    gap: 16px;
    align-items: center;
    min-height: 130px;
    padding: 16px 0;
    border-bottom: 1px solid #BFC2BC;
}

.am-checkout-cart-item:last-child {
    border-bottom: 0;
}

.am-checkout-cart-item__image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 108px;
    height: 96px;
    background: #F8F8F7;
}

.am-checkout-cart-item__image img {
    max-width: 88px;
    max-height: 88px;
    object-fit: contain;
}

.am-checkout-cart-item__content {
    min-width: 0;
}

.am-checkout-cart-item__content > strong {
    display: -webkit-box;
    overflow: hidden;
    color: #3E4939;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.am-checkout-cart-item__variation,
.am-checkout-cart-item__variation dl,
.am-checkout-cart-item__variation p {
    margin: 5px 0 0;
    color: #686868;
    font-size: 11px;
    line-height: 1.2;
}

.am-checkout-cart-item__hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #89977F;
    color: #686868;
}

.am-checkout-cart-item__hint span {
    min-width: 34px;
    min-height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 6px;
    border-radius: 4px;
    background: #F2F2F2;
    color: #282828;
    font-size: 12px;
    font-weight: 500;
}

.am-checkout-cart-item__hint small {
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-checkout-cart-item__quantity {
    display: grid;
    grid-template-columns: 28px 48px 28px;
    align-items: center;
    justify-content: center;
}

.am-checkout-cart-item__quantity button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--checkout-green);
    font-size: 23px;
    cursor: pointer;
}

.am-checkout-cart-item__quantity span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 1px solid #636363;
    border-radius: 4px;
    color: #777;
    font-size: 16px;
}

.am-checkout-cart-item__price {
    text-align: right;
}

.am-checkout-cart-item__price strong {
    display: block;
    color: #282828;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.15;
}

.am-checkout-cart-item__price.is-discounted strong {
    color: #B90101;
}

.am-checkout-cart-item__price del {
    display: block;
    margin-top: 4px;
    color: #909090;
    font-size: 12px;
}

.am-checkout-cart-item__remove {
    width: 26px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--checkout-green);
    cursor: pointer;
}

.am-checkout-cart-item__remove svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.am-checkout-special-block {
    margin-top: 20px;
    padding: 16px;
    border-radius: 4px;
    background: #F2F2F2;
}

.am-checkout-special-block h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 4px;
    color: #3E4939;
    font-size: 16px;
    font-weight: 600;
}

.am-checkout-special-block h3 > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.am-checkout-special-block h3 > span svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: #6D8965;
    stroke-width: 1.8;
}

.am-checkout-special-block h3 > button {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #282828;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.am-checkout-special-block .am-checkout-cart-item {
    min-height: 76px;
    padding: 8px 0 0;
    border: 0;
    grid-template-columns: 72px minmax(0, 1fr) 90px 26px;
}

.am-checkout-special-block .am-checkout-cart-item__image {
    width: 72px;
    height: 64px;
    background: #fff;
}

.am-checkout-special-block .am-checkout-cart-item__image img {
    max-width: 58px;
    max-height: 58px;
}

.am-checkout-special-block .am-checkout-cart-item__price {
    grid-column: 3;
}

.am-checkout-special-block .am-checkout-cart-item__remove {
    grid-column: 4;
}

.am-checkout-gift-block {
    background: #D9DFD7;
}

.am-checkout-buyer,
.am-checkout-delivery,
.am-checkout-payment {
    margin-top: 40px;
}

.am-checkout-buyer > h2,
.am-checkout-delivery > h2,
.am-checkout-payment > h2 {
    margin-bottom: 18px;
}

.am-checkout-buyer__switch {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 22px;
}

.am-checkout-buyer__switch label,
.am-checkout-checkbox {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    color: #4F4F4F;
    font-size: 15px;
    line-height: 1.35;
    cursor: pointer;
}

.am-checkout-buyer__switch input,
.am-checkout-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.am-checkout-buyer__switch label > span {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid #282828;
    border-radius: 50%;
    background: #fff;
}

.am-checkout-buyer__switch input:checked + span::after {
    content: "";
    display: block;
    width: 10px;
    height: 10px;
    margin: 4px;
    border-radius: 50%;
    background: #282828;
}

.am-checkout-checkbox > span {
    position: relative;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1px solid #282828;
    border-radius: 3px;
    background: #fff;
}

.am-checkout-checkbox input:checked + span::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid #6D8965;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.am-checkout-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.am-checkout-field {
    position: relative;
    min-width: 0;
}

.am-checkout-field--full {
    grid-column: 1 / -1;
}

.am-checkout-field input,
.am-checkout-field select {
    width: 100%;
    height: 58px;
    border: 1px solid #282828;
    border-radius: 4px;
    padding: 0 18px;
    outline: 0;
    background: #fff;
    color: #282828;
    font-size: 15px;
    font-weight: 400;
    text-transform: uppercase;
}

.am-checkout-field input:focus,
.am-checkout-field select:focus {
    border-color: var(--checkout-green);
    box-shadow: 0 0 0 1px var(--checkout-green);
}

.am-checkout-field input::placeholder {
    color: #929292;
    opacity: 1;
}

.am-checkout-field--select select {
    padding-right: 48px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23282828' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 20px;
}

.am-checkout-field--email input,
.am-checkout-field--password input {
    padding-left: 50px;
}

.am-checkout-field--email::before,
.am-checkout-field--password::before {
    content: "";
    position: absolute;
    z-index: 1;
    left: 18px;
    top: 50%;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    opacity: .62;
}

.am-checkout-field--email::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686868' stroke-width='1.6'%3E%3Crect x='3' y='5' width='18' height='14' rx='1'/%3E%3Cpath d='m3 7 9 7 9-7'/%3E%3C/svg%3E");
}

.am-checkout-field--password::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686868' stroke-width='1.6'%3E%3Crect x='5' y='10' width='14' height='11' rx='1'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E");
}

.am-checkout-field--password button {
    position: absolute;
    right: 13px;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    border: 0;
    padding: 5px;
    background: transparent;
    color: #777;
    cursor: pointer;
}

.am-checkout-field--password button svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
}

.am-checkout-field--phone input {
    padding-left: 60px;
}

.am-checkout-phone-flag {
    position: absolute;
    z-index: 2;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}

.am-checkout-login-panel {
    display: grid;
    gap: 10px;
}

.am-checkout-login-panel__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 2px 0 8px;
}

.am-checkout-login-panel__options a {
    color: #282828;
    font-size: 15px;
    text-decoration: underline;
}

.am-checkout-login-button {
    width: 100%;
    height: 58px;
}

.am-checkout-login-status {
    min-height: 20px;
    margin: 0;
    color: #B90101;
    font-size: 13px;
}

.am-checkout-create-account {
    margin-top: 18px;
}

.am-checkout-account-password {
    margin-top: 12px;
}

.am-checkout-delivery-panel {
    margin-top: 8px;
}

.am-checkout-method-field {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.am-checkout-address-row {
    display: grid;
    grid-template-columns: .9fr .9fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.am-checkout-pickup {
    display: grid;
    grid-template-columns: 46% 54%;
    overflow: hidden;
    margin-top: 12px;
    border-radius: 4px;
    background: #F2F2F2;
}

.am-checkout-pickup__map iframe {
    display: block;
    width: 100%;
    height: 340px;
    border: 0;
}

.am-checkout-pickup__content {
    padding: 20px;
}

.am-checkout-pickup__content h3,
.am-checkout-pickup__content h4 {
    margin: 0 0 12px;
    color: var(--checkout-green);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.25;
}

.am-checkout-pickup__content h4 {
    margin-top: 20px;
}

.am-checkout-pickup__content p {
    margin: 0 0 8px;
    color: #4D4D4D;
    font-size: 15px;
    line-height: 1.35;
}

.am-checkout-pickup__content .am-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    margin-top: 18px;
}

.am-checkout-delivery-notes {
    margin-top: 18px;
}

.am-checkout-delivery-notes p {
    margin: 0 0 18px;
    color: #686868;
    font-size: 14px;
    line-height: 1.45;
}

.am-checkout-sidebar {
    position: sticky;
    top: 24px;
}

.am-checkout-summary {
    padding: 16px;
    border-radius: 4px;
    background: #F2F2F2;
}

.am-checkout-summary .am-cart-shipping-progress {
    padding: 0 0 16px;
    border-bottom: 1px solid #A8A8A8;
}

.am-checkout-summary .am-cart-shipping-progress__text {
    align-items: flex-start;
}

.am-checkout-summary .am-cart-shipping-progress__text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
}

.am-checkout-summary .am-cart-shipping-progress__track {
    margin-top: 10px;
}

.am-checkout-coupon {
    border-bottom: 1px solid #A8A8A8;
}

.am-checkout-coupon__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 58px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #282828;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.am-checkout-coupon__toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    transition: transform .2s ease;
}

.am-checkout-coupon.is-open .am-checkout-coupon__toggle svg {
    transform: rotate(180deg);
}

.am-checkout-coupon__body {
    padding: 0 0 14px;
}

.am-checkout-coupon__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px;
}

.am-checkout-coupon__form input {
    height: 44px;
    min-width: 0;
    border: 1px solid #282828;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 13px;
}

.am-checkout-coupon__form button {
    height: 44px;
    border: 0;
    border-radius: 4px;
    padding: 0 12px;
    background: var(--checkout-green);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.am-checkout-coupon__applied {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.am-checkout-coupon__applied button {
    border: 1px solid #A8B7A4;
    border-radius: 3px;
    padding: 4px 7px;
    background: #fff;
    color: var(--checkout-green);
    font-size: 11px;
    cursor: pointer;
}

.am-checkout-coupon__body p {
    min-height: 14px;
    margin: 5px 0 0;
    color: #B90101;
    font-size: 11px;
}

.am-checkout-summary__rows {
    display: grid;
    gap: 8px;
    padding: 18px 0;
    border-bottom: 1px solid #A8A8A8;
}

.am-checkout-summary__rows > div,
.am-checkout-summary__total {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    color: #4A4A4A;
    font-size: 15px;
    line-height: 1.25;
}

.am-checkout-summary__rows strong {
    max-width: 55%;
    color: #282828;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
}

.am-checkout-summary__rows .is-discount strong {
    color: #B90101;
}

.am-checkout-summary__total {
    padding-top: 18px;
    color: #282828;
    font-size: 21px;
    font-weight: 600;
}

.am-checkout-summary__total strong {
    font-size: 21px;
    font-weight: 600;
}

.am-checkout-native-order-review .woocommerce-checkout-review-order-table {
    display: none !important;
}

.am-checkout-native-order-review #payment {
    border-radius: 4px;
    background: #F2F2F2;
}

.am-checkout-native-order-review #payment ul.payment_methods {
    padding: 20px;
    border-bottom: 1px solid #D1D1D1;
}

.am-checkout-native-order-review #payment ul.payment_methods li {
    margin-bottom: 12px;
}

.am-checkout-native-order-review #payment div.payment_box {
    background: #fff;
    color: #4D4D4D;
}

.am-checkout-native-order-review #payment div.payment_box::before {
    border-bottom-color: #fff;
}

.am-checkout-native-order-review #payment .place-order {
    padding: 20px !important;
}

.am-checkout-native-order-review #place_order {
    width: 100%;
    min-height: 58px;
    border: 0;
    border-radius: 4px;
    background: var(--checkout-green);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
}

.am-checkout-form.processing::after {
    content: "";
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(255, 255, 255, .5);
    cursor: wait;
}

.am-checkout-form .woocommerce-NoticeGroup-checkout,
.am-checkout-form .woocommerce-error,
.am-checkout-form .woocommerce-message {
    grid-column: 1 / -1;
}

@media (max-width: 1080px) {
    .am-checkout-layout {
        grid-template-columns: minmax(0, 1fr) 340px;
        gap: 22px;
    }

    .am-checkout-cart-item {
        grid-template-columns: 86px minmax(0, 1fr) 102px 88px 24px;
        gap: 10px;
    }

    .am-checkout-cart-item__image {
        width: 86px;
    }
}

@media (max-width: 900px) {
    .am-checkout-layout {
        grid-template-columns: 1fr;
    }

    .am-checkout-sidebar {
        position: static;
        grid-row: 1;
    }

    .am-checkout-summary {
        max-width: none;
    }

    .am-checkout-main {
        grid-row: 2;
    }
}

@media (max-width: 767px) {
    body.woocommerce-checkout:not(.woocommerce-order-received) .am-main {
        padding-top: 20px;
        padding-bottom: 42px;
    }

    .am-checkout-steps {
        margin-bottom: 24px;
    }

    .am-checkout-step {
        grid-template-columns: 1fr 44px;
    }

    .am-checkout-step > span {
        left: 0;
        max-width: calc(100% - 38px);
        padding: 0 5px;
        font-size: 10px;
        white-space: normal;
        text-align: center;
    }

    .am-checkout-step > i {
        width: 44px;
        height: 44px;
        font-size: 15px;
    }

    .am-checkout-step::after {
        width: calc(100% - 44px);
    }

    .am-checkout-title {
        margin-bottom: 24px;
        font-size: 24px;
    }

    .am-checkout-main h2,
    .am-checkout-summary h2 {
        font-size: 20px;
    }

    .am-checkout-order-list > h2 {
        padding-bottom: 14px;
    }

    .am-checkout-cart-item {
        grid-template-columns: 74px minmax(0, 1fr) 82px 22px;
        min-height: 110px;
        gap: 8px;
        padding: 12px 0;
    }

    .am-checkout-cart-item__image {
        width: 74px;
        height: 78px;
    }

    .am-checkout-cart-item__image img {
        max-width: 66px;
        max-height: 68px;
    }

    .am-checkout-cart-item__content > strong {
        font-size: 13px;
    }

    .am-checkout-cart-item__quantity {
        grid-column: 2;
        grid-row: 2;
        justify-content: start;
        grid-template-columns: 26px 40px 26px;
    }

    .am-checkout-cart-item__quantity button,
    .am-checkout-cart-item__quantity span {
        height: 38px;
    }

    .am-checkout-cart-item__price {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .am-checkout-cart-item__price strong {
        font-size: 14px;
    }

    .am-checkout-cart-item__remove {
        grid-column: 4;
        grid-row: 1 / span 2;
    }

    .am-checkout-special-block .am-checkout-cart-item {
        grid-template-columns: 58px minmax(0, 1fr) 72px 22px;
    }

    .am-checkout-special-block .am-checkout-cart-item__image {
        width: 58px;
        height: 58px;
    }

    .am-checkout-special-block h3 {
        align-items: flex-start;
        font-size: 14px;
    }

    .am-checkout-special-block h3 > button {
        max-width: 48%;
        font-size: 11px;
        text-align: right;
    }

    .am-checkout-buyer,
    .am-checkout-delivery,
    .am-checkout-payment {
        margin-top: 30px;
    }

    .am-checkout-fields-grid,
    .am-checkout-address-row {
        grid-template-columns: 1fr;
    }

    .am-checkout-field input,
    .am-checkout-field select {
        height: 54px;
        font-size: 14px;
    }

    .am-checkout-pickup {
        grid-template-columns: 1fr;
    }

    .am-checkout-pickup__map iframe {
        height: 240px;
    }

    .am-checkout-pickup__content {
        padding: 16px;
    }

    .am-checkout-summary {
        padding: 14px;
    }
}

/* Checkout reliability fixes: keep the custom checkout inside one content block,
   preserve native WooCommerce payment fragments and honour the HTML hidden state. */
body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--checkout {
    display: block;
    width: min(calc(100% - 40px), 1200px);
    max-width: 1200px;
    margin-inline: auto;
}

body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--checkout .am-entry,
body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--checkout .woocommerce,
.am-checkout-form,
.am-checkout-order-list {
    width: 100%;
}

.am-checkout-form [hidden] {
    display: none !important;
}

.am-checkout-native-order-review,
.am-checkout-native-order-review .woocommerce-checkout-payment {
    width: 100%;
}

.am-checkout-create-account {
    display: inline-flex;
    width: 100%;
    margin-top: 18px;
}

.am-checkout-checkbox input:checked + span::after {
    left: 50%;
    top: 50%;
    width: 6px;
    height: 11px;
    margin: -7px 0 0 -3px;
}

@media (max-width: 767px) {
    body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--checkout {
        width: min(calc(100% - 20px), 1200px);
    }
}

/* ========================================================================== 
   Checkout refinement v4.6: exact steps, carrier API fields, validation states
   ========================================================================== */
.am-checkout-form {
    width: min(100%, 1200px);
    margin-inline: auto;
}

.am-checkout-form [hidden] {
    display: none !important;
}

.am-checkout-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 30px;
    padding: 0 4px;
}

.am-checkout-step {
    grid-template-columns: minmax(0, 1fr) 66px;
}

.am-checkout-step::after {
    left: 100%;
    width: calc(100% - 66px);
}

.am-checkout-step > span {
    left: 7%;
    padding-inline: 12px;
    font-size: 16px;
    line-height: 1.35;
}

.am-checkout-step > i {
    width: 66px;
    height: 66px;
    font-size: 18px;
}

.am-checkout-layout {
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 30px;
}

.am-checkout-buyer,
.am-checkout-delivery,
.am-checkout-payment {
    margin-top: 42px;
}

.am-checkout-buyer > h2,
.am-checkout-delivery > h2,
.am-checkout-payment > h2 {
    margin-bottom: 24px;
    font-size: 24px;
}

.am-checkout-field {
    position: relative;
}

.am-checkout-field > input,
.am-checkout-field > select,
.am-checkout-field--phone,
.am-checkout-delivery-method-select select {
    min-height: 68px;
}

.am-checkout-delivery-method-select {
    margin-bottom: 14px;
}

.am-checkout-delivery-method-select select {
    font-size: 18px;
    font-weight: 400;
}

.am-checkout-field.has-error,
.am-checkout-api-combobox.has-error .am-checkout-field {
    border-color: #b90101 !important;
}

.am-checkout-field.has-error input,
.am-checkout-field.has-error select,
.am-checkout-api-combobox.has-error input {
    border-color: #b90101 !important;
    box-shadow: 0 0 0 1px #b90101 inset;
}

.am-checkout-field.has-error::after,
.am-checkout-api-combobox.has-error::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 12px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #b90101;
}

.am-checkout-field--phone {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: stretch;
    border: 1px solid #282828;
    border-radius: 4px;
    background: #fff;
}

.am-checkout-field--phone > input {
    min-width: 0;
    height: 66px;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 16px 0 6px;
}

.am-checkout-field--phone .am-country-select,
.am-checkout-field--phone .am-country-select__toggle {
    width: 64px;
    height: 66px;
}

.am-checkout-field--phone .am-country-select__toggle {
    border: 0;
    padding: 0 8px 0 14px;
    background: transparent;
}

.am-checkout-field--phone .am-country-select__toggle svg {
    width: 10px;
    stroke: #686868;
    fill: none;
}

.am-checkout-field--phone .am-country-select__menu {
    top: calc(100% + 4px);
    left: 0;
    width: min(360px, calc(100vw - 40px));
    z-index: 80;
}

.am-checkout-carrier-panel {
    display: grid;
    gap: 8px;
}

.am-checkout-api-combobox {
    position: relative;
}

.am-checkout-api-combobox .am-checkout-field {
    margin: 0;
}

.am-checkout-api-spinner {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid rgba(62, 83, 56, .18);
    border-top-color: #3E5338;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

.am-checkout-api-combobox.is-loading .am-checkout-api-spinner {
    opacity: 1;
    animation: am-checkout-spin .75s linear infinite;
}

@keyframes am-checkout-spin {
    to { transform: rotate(360deg); }
}

.am-checkout-api-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 70;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #c7cac4;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(40, 40, 40, .12);
}

.am-checkout-api-option,
.am-checkout-api-results__empty {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border: 0;
    border-bottom: 1px solid #eceeea;
    background: #fff;
    color: #282828;
    font-size: 14px;
    line-height: 1.35;
    text-align: left;
}

.am-checkout-api-option:last-child {
    border-bottom: 0;
}

.am-checkout-api-option:hover,
.am-checkout-api-option:focus-visible {
    background: rgba(62, 83, 56, .1);
    color: #3E5338;
}

.am-checkout-api-results__empty {
    color: #686868;
}

.am-checkout-api-status {
    min-height: 18px;
    margin: 2px 0 0;
    color: #686868;
    font-size: 12px;
}

.am-checkout-api-status.is-error {
    color: #b90101;
}

.am-checkout-payment {
    scroll-margin-top: 120px;
}

.am-checkout-native-order-review #payment {
    border-radius: 4px;
}

@media (max-width: 991px) {
    .am-checkout-form {
        width: 100%;
    }

    .am-checkout-layout {
        grid-template-columns: 1fr;
    }

    .am-checkout-sidebar {
        grid-row: auto;
    }
}

@media (max-width: 767px) {
    .am-checkout-steps {
        margin-bottom: 24px;
    }

    .am-checkout-step {
        grid-template-columns: minmax(0, 1fr) 46px;
    }

    .am-checkout-step > i {
        width: 46px;
        height: 46px;
        font-size: 16px;
    }

    .am-checkout-step > span {
        left: 2px;
        max-width: calc(100% - 38px);
        padding-inline: 4px;
        font-size: 10px;
        white-space: normal;
        text-align: center;
    }

    .am-checkout-step::after {
        left: 100%;
        width: calc(100% - 46px);
    }

    .am-checkout-title {
        margin-bottom: 26px;
        font-size: 26px;
    }

    .am-checkout-buyer,
    .am-checkout-delivery,
    .am-checkout-payment {
        margin-top: 30px;
    }

    .am-checkout-buyer > h2,
    .am-checkout-delivery > h2,
    .am-checkout-payment > h2 {
        font-size: 22px;
    }

    .am-checkout-field > input,
    .am-checkout-field > select,
    .am-checkout-field--phone,
    .am-checkout-delivery-method-select select {
        min-height: 58px;
        font-size: 15px;
    }

    .am-checkout-field--phone > input,
    .am-checkout-field--phone .am-country-select,
    .am-checkout-field--phone .am-country-select__toggle {
        height: 56px;
    }

    .am-checkout-pickup {
        grid-template-columns: 1fr;
    }

    .am-checkout-pickup__map iframe {
        min-height: 260px;
    }
}

/* Checkout steps — final alignment with the approved three-step mockup. */
.am-checkout-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    min-height: 80px;
    margin: 0 0 34px;
    padding: 0;
}

.am-checkout-step {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 80px;
    align-items: center;
    min-width: 0;
    min-height: 80px;
    color: #909090;
}

.am-checkout-step::before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #777c74;
    transform: translateY(-50%);
}

.am-checkout-step:last-child::before {
    right: 40px;
}

.am-checkout-step::after {
    display: none !important;
}

.am-checkout-step > span {
    position: relative;
    z-index: 1;
    grid-column: 1;
    justify-self: center;
    left: auto;
    top: auto;
    max-width: calc(100% - 24px);
    padding: 0 16px;
    transform: none;
    background: #fff;
    color: inherit;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
}

.am-checkout-step > i {
    position: relative;
    z-index: 2;
    grid-column: 2;
    justify-self: end;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f7f8f6;
    box-shadow: 0 13px 30px rgba(62, 83, 56, .13);
    color: #686868;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
}

.am-checkout-step.is-active,
.am-checkout-step.is-complete {
    color: #282828;
}

.am-checkout-step.is-active > i,
.am-checkout-step.is-complete > i {
    background: #3E5338;
    color: #fff;
}

.am-checkout-step.is-complete > i::after {
    display: none !important;
    content: none !important;
}

@media (max-width: 767px) {
    .am-checkout-steps {
        min-height: 50px;
        margin-bottom: 24px;
    }

    .am-checkout-step {
        grid-template-columns: minmax(0, 1fr) 48px;
        min-height: 48px;
    }

    .am-checkout-step:last-child::before {
        right: 24px;
    }

    .am-checkout-step > span {
        max-width: calc(100% - 8px);
        padding: 0 5px;
        font-size: 10px;
        line-height: 1.15;
        white-space: normal;
    }

    .am-checkout-step > i {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }
}

/* ==========================================================================
   Checkout payment methods and buyer notes — v4.8
   ========================================================================== */
.am-checkout-native-order-review #payment {
    border: 0;
    border-radius: 0;
    background: transparent;
}

.am-checkout-native-order-review #payment ul.payment_methods {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    list-style: none;
}

.am-checkout-native-order-review #payment ul.payment_methods::before,
.am-checkout-native-order-review #payment ul.payment_methods::after {
    display: none;
}

.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method {
    position: relative;
    margin: 0;
    padding: 15px 16px;
    border: 1px solid #3E5338;
    border-radius: 4px;
    background: #fff;
    color: #282828;
    transition: background-color .2s ease;
}

.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method.is-selected,
.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method:has(> input[name="payment_method"]:checked) {
    background: #F2F2F2;
}

.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method > input[name="payment_method"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method > label {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 24px;
    margin: 0;
    padding-left: 32px;
    color: #282828;
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
    cursor: pointer;
}

.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method > label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 22px;
    height: 22px;
    border: 1px solid #282828;
    border-radius: 50%;
    background: #fff;
    transform: translateY(-50%);
    box-sizing: border-box;
}

.am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method > input[name="payment_method"]:checked + label::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #282828;
    transform: translateY(-50%);
}

.am-checkout-native-order-review #payment div.payment_box {
    margin: 10px 0 0 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #282828;
    font-size: 16px;
    line-height: 1.45;
}

.am-checkout-native-order-review #payment div.payment_box::before {
    display: none;
}

.am-checkout-native-order-review #payment div.payment_box p {
    margin: 0 0 16px;
    color: #282828;
    font-size: 16px;
    line-height: 1.45;
}

.am-checkout-native-order-review #payment div.payment_box p:last-child {
    margin-bottom: 0;
}

.am-checkout-native-order-review #payment .place-order {
    margin: 0;
    padding: 0 !important;
    background: transparent;
}

.am-checkout-native-order-review #payment .woocommerce-privacy-policy-text,
.am-checkout-native-order-review #payment .woocommerce-terms-and-conditions-wrapper {
    margin-top: 16px;
    font-size: 13px;
    line-height: 1.4;
}

.am-checkout-native-order-review #payment .woocommerce-privacy-policy-text {
    display: none !important;
}

.am-checkout-notes {
    margin-top: 28px;
}

.am-checkout-notes h3 {
    margin: 0 0 16px;
    color: #3F4636;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
}

.am-checkout-note-option {
    display: flex;
    width: fit-content;
    margin-bottom: 8px;
    color: #4F4F4F;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.35;
}

.am-checkout-note-option > span {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
}

.am-checkout-note-textarea {
    position: relative;
    margin-top: 22px;
}

.am-checkout-note-textarea textarea {
    display: block;
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 22px 24px 38px;
    border: 1px solid #282828;
    border-radius: 4px;
    outline: 0;
    background: #fff;
    color: #282828;
    font: 400 16px/1.45 Montserrat, sans-serif;
    box-sizing: border-box;
}

.am-checkout-note-textarea textarea::placeholder {
    color: #A1A1A1;
    opacity: 1;
}

.am-checkout-note-textarea textarea:focus {
    border-color: #3E5338;
}

.am-checkout-note-textarea [data-checkout-note-counter] {
    position: absolute;
    right: 24px;
    bottom: 16px;
    color: #909090;
    font-size: 13px;
    line-height: 1;
}

.am-checkout-native-order-review #place_order {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    margin-top: 22px;
    padding: 16px 24px;
    line-height: 1;
    text-align: center;
}

.am-wayforpay-redirect {
    margin: 30px 0 20px;
    text-align: center;
}

#am-wayforpay-form {
    text-align: center;
}

@media (max-width: 767px) {
    .am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method {
        padding: 14px 12px;
    }

    .am-checkout-native-order-review #payment ul.payment_methods li.wc_payment_method > label {
        padding-left: 30px;
        font-size: 16px;
    }

    .am-checkout-native-order-review #payment div.payment_box {
        margin-left: 30px;
        font-size: 14px;
    }

    .am-checkout-native-order-review #payment div.payment_box p {
        font-size: 14px;
    }

    .am-checkout-notes {
        margin-top: 24px;
    }

    .am-checkout-notes h3 {
        font-size: 22px;
    }

    .am-checkout-note-option {
        font-size: 15px;
    }

    .am-checkout-note-textarea textarea {
        min-height: 132px;
        padding: 18px 16px 36px;
        font-size: 15px;
    }

    .am-checkout-note-textarea [data-checkout-note-counter] {
        right: 16px;
        bottom: 14px;
    }
}

/* v4.9: visible 24px note checkboxes */
.am-checkout-native-order-review .am-checkout-note-option {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px;
    min-height: 24px;
}

.am-checkout-native-order-review .am-checkout-note-option > input[type="checkbox"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.am-checkout-native-order-review .am-checkout-note-option > .am-checkout-checkbox-box {
    position: relative !important;
    display: inline-grid !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    min-width: 24px !important;
    height: 24px !important;
    min-height: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    place-items: center;
    border: 1px solid #282828 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.am-checkout-native-order-review .am-checkout-note-option > input[type="checkbox"]:focus-visible + .am-checkout-checkbox-box {
    outline: 2px solid rgba(62, 83, 56, .35);
    outline-offset: 2px;
}

.am-checkout-native-order-review .am-checkout-note-option > input[type="checkbox"]:checked + .am-checkout-checkbox-box::after {
    content: "" !important;
    position: static !important;
    display: block !important;
    width: 7px !important;
    height: 12px !important;
    margin: -2px 0 0 !important;
    border: solid #6D8965 !important;
    border-width: 0 2px 2px 0 !important;
    transform: rotate(45deg) !important;
}

/* v6.5 delivery picker sizing */
.am-checkout-delivery-method-select .am-shipping-picker__toggle { height: 68px; min-height: 68px; }
.am-checkout-delivery-method-select .am-shipping-picker__menu { z-index: 250; }
@media (max-width: 767px) {
    .am-checkout-delivery-method-select .am-shipping-picker__toggle { height: 58px; min-height: 58px; padding-inline: 16px; font-size: 15px; }
    .am-checkout-delivery-method-select .am-shipping-picker__option { min-height: 54px; font-size: 15px; }
}

.am-checkout-cart-item__remove img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.am-checkout-delivery-method-select.has-error .am-shipping-picker__toggle {
    border-color:#B90101 !important;
    box-shadow:0 0 0 1px #B90101 inset;
}

/* ========================================================================== 
   v6.30 — checkout main content matched to the supplied desktop design
   ========================================================================== */
.am-checkout-layout {
    grid-template-columns: minmax(0, 1.58fr) minmax(390px, 1fr);
    gap: 30px;
}

.am-checkout-main {
    display: flex;
    flex-direction: column;
    gap: 29px;
}

.am-checkout-section {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #9FA39D;
    border-radius: 3px;
    background: #fff;
}

.am-checkout-section__toggle {
    width: 100%;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 0;
    padding: 0 20px;
    background: transparent;
    color: #3E5338;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.am-checkout-section__toggle svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
}

.am-checkout-section:not(.is-open) .am-checkout-section__toggle svg {
    transform: rotate(180deg);
}

.am-checkout-section.is-locked {
    border-color: #D1D3D0;
}

.am-checkout-section.is-locked .am-checkout-section__toggle {
    color: #A3ADA0;
    cursor: default;
}

.am-checkout-section__body {
    min-width: 0;
}

.am-checkout-section--order .am-checkout-section__body {
    padding: 0 14px 16px;
}

.am-checkout-order-list__items {
    border-top: 0;
    border-bottom: 1px solid #AFAFAF;
}

.am-checkout-order-list__items > .am-checkout-cart-item {
    grid-template-columns: 108px minmax(0, 1fr) 110px 92px 26px;
    gap: 16px;
    min-height: 148px;
    padding: 16px 0;
    border-bottom: 1px solid #BFC2BC;
}

.am-checkout-order-list__items > .am-checkout-cart-item:last-child {
    border-bottom: 0;
}

.am-checkout-order-list__items .am-checkout-cart-item__image {
    width: 104px;
    height: 104px;
}

.am-checkout-order-list__items .am-checkout-cart-item__image img {
    max-width: 96px;
    max-height: 96px;
}

.am-checkout-cart-item__content > strong {
    font-size: 16px;
    font-weight: 600;
}

.am-checkout-cart-item__hint {
    width: fit-content;
    max-width: 100%;
    margin-top: 7px;
    padding-bottom: 5px;
}

.am-checkout-cart-item__quantity {
    grid-template-columns: 28px 48px 28px;
}

.am-checkout-cart-item__price strong {
    font-size: 16px;
}

.am-checkout-special-block {
    margin: 21px 0 0;
    padding: 16px 14px;
    border-radius: 3px;
}

.am-checkout-special-block h3 {
    min-height: 24px;
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
}

.am-checkout-special-block .am-checkout-cart-item {
    grid-template-columns: 74px minmax(0, 1fr) 90px 26px;
    gap: 16px;
    min-height: 84px;
    padding: 8px 0 0;
}

.am-checkout-special-block .am-checkout-cart-item__image {
    width: 72px;
    height: 72px;
}

.am-checkout-special-block .am-checkout-cart-item__image img {
    max-width: 66px;
    max-height: 66px;
}

.am-checkout-special-block .am-checkout-cart-item__content > strong {
    font-weight: 400;
}

.am-checkout-special-block .am-checkout-cart-item__variation,
.am-checkout-special-block .am-checkout-cart-item__hint {
    display: none;
}

.am-checkout-special-block .am-checkout-cart-item__price {
    align-self: center;
    text-align: left;
}

.am-checkout-special-block .am-checkout-cart-item__remove {
    align-self: center;
}

.am-checkout-subscription-block {
    position: relative;
    background: #F2F2F2;
}

.am-checkout-subscription-block h3 > span {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3E5338;
    border-radius: 50%;
    color: #3E5338;
    font-size: 12px;
    line-height: 1;
}

.am-checkout-gift-block {
    position: relative;
    margin-top: 43px;
    background: rgba(62, 83, 56, .2);
}

.am-checkout-gift-block::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -23px;
    height: 1px;
    background: #AFAFAF;
}

.am-checkout-gift-block h3 > span {
    color: #6D8965;
}

.am-checkout-gift-block h3 > span svg {
    width: 20px;
    height: 20px;
}

.am-checkout-gift-block h3 > span img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.am-checkout-gift-block h3 > button {
    font-size: 16px;
    font-weight: 500;
}

.am-checkout-section--delivery .am-checkout-section__body {
    padding: 0 14px 14px;
}

.am-checkout-buyer {
    margin-top: 8px;
}

.am-checkout-buyer > h2,
.am-checkout-delivery > h2 {
    margin-bottom: 8px;
    color: #3F4636;
    font-size: 22px;
    font-weight: 600;
}

.am-checkout-buyer__switch {
    gap: 20px;
    margin-bottom: 22px;
}

.am-checkout-buyer__switch label {
    align-items: center;
    font-size: 16px;
}

.am-checkout-fields-grid {
    gap: 8px;
}

.am-checkout-field > input,
.am-checkout-field > select,
.am-checkout-field--phone,
.am-checkout-delivery-method-select .am-shipping-picker__toggle {
    height: 64px;
    min-height: 64px;
    font-size: 16px;
}

.am-checkout-field--phone > input,
.am-checkout-field--phone .am-country-select,
.am-checkout-field--phone .am-country-select__toggle {
    height: 62px;
}

.am-checkout-delivery {
    margin-top: 24px;
}

.am-checkout-delivery > h2 {
    margin-bottom: 22px;
}

.am-checkout-delivery-method-select {
    margin-bottom: 8px;
}

.am-checkout-carrier-panel,
.am-checkout-method-field {
    gap: 8px;
}

.am-checkout-address-row {
    gap: 8px;
}

.am-checkout-delivery-notes {
    margin-top: 14px;
}

.am-checkout-delivery-notes p {
    margin: 0 0 18px;
    color: #4F4F4F;
    font-size: 14px;
    line-height: 1.35;
}

.am-checkout-section--payment .am-checkout-section__body {
    padding: 0 14px 16px;
}

.am-checkout-payment {
    margin-top: 0;
}

.am-checkout-locked-submit {
    width: 100%;
    min-height: 64px;
    border: 1px solid #A8AAA6;
    border-radius: 3px;
    background: #F2F2F2;
    color: #7C7C7C;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    cursor: not-allowed;
}

.am-checkout-sidebar {
    top: 20px;
}

.am-checkout-summary {
    padding: 16px;
    border-radius: 3px;
}

.am-checkout-summary .am-cart-shipping-progress {
    margin: 0;
    padding: 0 0 24px;
}

.am-checkout-summary .am-cart-shipping-progress__text > span {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
}

.am-checkout-summary .am-cart-shipping-progress__text p {
    font-size: 16px;
    line-height: 1.3;
}

.am-checkout-coupon__toggle {
    height: 68px;
    font-size: 16px;
}

.am-checkout-summary__rows {
    gap: 8px;
    padding: 20px 0;
}

.am-checkout-summary__rows > div,
.am-checkout-summary__points,
.am-checkout-summary__total {
    font-size: 16px;
}

.am-checkout-summary__rows strong {
    font-size: 16px;
}

.am-checkout-summary__points {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #A8A8A8;
    color: #4A4A4A;
}

.am-checkout-summary__points strong {
    color: #282828;
    font-weight: 500;
}

.am-checkout-summary__total {
    align-items: center;
    min-height: 64px;
    padding-top: 0;
    font-size: 22px;
}

.am-checkout-summary__total strong {
    font-size: 22px;
}

@media (max-width: 991px) {
    .am-checkout-layout {
        grid-template-columns: 1fr;
    }

    .am-checkout-sidebar {
        position: static;
        grid-row: auto;
    }
}

@media (max-width: 767px) {
    .am-checkout-main {
        gap: 18px;
    }

    .am-checkout-section__toggle {
        min-height: 56px;
        padding: 0 14px;
        font-size: 20px;
    }

    .am-checkout-section__toggle svg {
        width: 21px;
        height: 21px;
        flex-basis: 21px;
    }

    .am-checkout-section--order .am-checkout-section__body,
    .am-checkout-section--delivery .am-checkout-section__body,
    .am-checkout-section--payment .am-checkout-section__body {
        padding-right: 10px;
        padding-left: 10px;
    }

    .am-checkout-order-list__items > .am-checkout-cart-item {
        grid-template-columns: 70px minmax(0, 1fr) auto 22px;
        grid-template-rows: auto auto;
        column-gap: 8px;
        row-gap: 5px;
        min-height: 116px;
        padding: 13px 0;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__image {
        grid-column: 1;
        grid-row: 1 / 3;
        width: 70px;
        height: 86px;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__image img {
        max-width: 66px;
        max-height: 80px;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__content {
        grid-column: 2 / 4;
        grid-row: 1;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__content > strong {
        font-size: 14px;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__quantity {
        grid-column: 2;
        grid-row: 2;
        justify-content: start;
        grid-template-columns: 25px 38px 25px;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__quantity button,
    .am-checkout-order-list__items .am-checkout-cart-item__quantity span {
        height: 36px;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__price {
        grid-column: 3;
        grid-row: 2;
        align-self: center;
    }

    .am-checkout-order-list__items .am-checkout-cart-item__remove {
        grid-column: 4;
        grid-row: 1 / 3;
        align-self: center;
    }

    .am-checkout-special-block {
        padding: 12px 10px;
    }

    .am-checkout-special-block h3 {
        font-size: 16px;
    }

    .am-checkout-special-block .am-checkout-cart-item {
        grid-template-columns: 64px minmax(0, 1fr) 68px 22px;
        gap: 8px;
    }

    .am-checkout-special-block .am-checkout-cart-item__image {
        width: 64px;
        height: 64px;
    }

    .am-checkout-special-block .am-checkout-cart-item__content > strong {
        font-size: 14px;
    }

    .am-checkout-gift-block {
        display: grid;
    }

    .am-checkout-gift-block > h3 {
        display: contents;
    }

    .am-checkout-gift-block > h3 > span {
        grid-row: 1;
        justify-self: start;
        margin-bottom: 8px;
    }

    .am-checkout-gift-block > .am-checkout-cart-item {
        grid-row: 2;
    }

    .am-checkout-gift-block > h3 > button {
        grid-row: 3;
        justify-self: end;
        margin-top: 8px;
        font-size: 15px;
    }

    .am-checkout-buyer {
        margin-top: 6px;
    }

    .am-checkout-buyer > h2,
    .am-checkout-delivery > h2 {
        font-size: 20px;
    }

    .am-checkout-buyer__switch {
        gap: 10px 16px;
    }

    .am-checkout-buyer__switch label {
        font-size: 14px;
    }

    .am-checkout-fields-grid {
        grid-template-columns: 1fr;
    }

    .am-checkout-field,
    .am-checkout-field--full {
        grid-column: 1;
    }

    .am-checkout-field > input,
    .am-checkout-field > select,
    .am-checkout-field--phone,
    .am-checkout-delivery-method-select .am-shipping-picker__toggle {
        height: 56px;
        min-height: 56px;
        font-size: 14px;
    }

    .am-checkout-field--phone > input,
    .am-checkout-field--phone .am-country-select,
    .am-checkout-field--phone .am-country-select__toggle {
        height: 54px;
    }

    .am-checkout-address-row {
        grid-template-columns: 1fr;
    }

    .am-checkout-delivery-notes p {
        font-size: 12px;
    }

    .am-checkout-locked-submit {
        min-height: 56px;
    }

    .am-checkout-summary .am-cart-shipping-progress__text p,
    .am-checkout-summary__rows > div,
    .am-checkout-summary__points {
        font-size: 14px;
    }
}

/* 6.40: WooCommerce core applies width:100% to payment boxes; the design
 * requires the box to size naturally inside the payment method container. */
#add_payment_method #payment div.payment_box,
.woocommerce-cart #payment div.payment_box,
.woocommerce-checkout #payment div.payment_box {
    width: auto !important;
}

/* Defensive fallback for a damaged WooCommerce Checkout page that still
 * contains a Cart block/shortcode. PHP now bypasses that content entirely,
 * while these selectors prevent a cached duplicate cart form flashing above
 * the approved checkout layout. */
body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--checkout .woocommerce-cart-form,
body.woocommerce-checkout:not(.woocommerce-order-received) .am-content-layout--checkout .cart-collaterals {
    display: none !important;
}
