/* Layout canônico do carrinho e checkout TKG. Regras antigas devem ser
   removidas, não sobrepostas com novos patches em wp_head. */
:root {
    --tkg-bg: #fff;
    --tkg-surface: #f7f8f9;
    --tkg-ink: #111318;
    --tkg-muted: #5f6b7a;
    --tkg-line: #dce3ea;
    --tkg-accent: #fbb12d;
    --tkg-accent-dark: #d88f12;
    --tkg-radius-sm: 4px;
    --tkg-radius-lg: 12px;
}

body.tkg-cart-page {
    background: var(--tkg-bg);
    color: var(--tkg-ink);
}

body.tkg-cart-page main > .wp-block-post-title {
    display: none;
}

.tkg-cart-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 32px auto 56px;
    font-family: Inter, Arial, sans-serif;
}

.tkg-cart-shell :where(h1, h2, h3, p, figure) {
    margin-top: 0;
}

.tkg-cart-intro {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
}

.tkg-cart-intro > div {
    display: flex;
    align-items: center;
    gap: 16px;
}

.tkg-cart-intro h1 {
    margin: 0;
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.tkg-cart-actions {
    display: flex;
    gap: 12px;
}

.tkg-cart-actions--bottom {
    justify-content: flex-end;
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--tkg-line);
    border-radius: var(--tkg-radius-lg);
    background: var(--tkg-surface);
}

.tkg-cart-shell .wc-block-cart__main > .tkg-cart-actions--bottom {
    width: 100%;
    margin-top: 8px;
    padding: 12px 0 4px;
    border: 0;
    border-top: 1px solid var(--tkg-line);
    border-radius: 0;
    background: transparent;
}

/* Carrinho em três blocos, inspirado no fluxo de referência. */
.tkg-cart-reference-layout .wc-block-cart {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
    gap: 18px 28px;
}

.tkg-cart-reference-layout .wc-block-cart__main {
    grid-column: 1 / -1;
    width: 100% !important;
    padding: 26px 30px !important;
}

.tkg-cart-reference-layout .tkg-cart-intro {
    margin: 0 0 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tkg-line);
}

.tkg-cart-reference-layout .tkg-cart-intro > div {
    display: block;
}

.tkg-cart-reference-layout .tkg-cart-intro h1 {
    font-size: 25px;
}

.tkg-cart-reference-layout .wc-block-cart-items__header {
    display: none;
}

.tkg-cart-reference-layout .wc-block-cart-items__row {
    min-height: 210px;
}

.tkg-cart-reference-layout .wc-block-cart-items__row td {
    padding-top: 18px;
    padding-bottom: 18px;
}

.tkg-cart-reference-layout .wc-block-cart-item__image {
    width: 220px !important;
    min-width: 220px;
    padding-right: 24px !important;
}

.tkg-cart-reference-layout .wc-block-cart-item__image img {
    width: 200px !important;
    height: 200px !important;
    object-fit: contain;
}

.tkg-cart-reference-layout .wc-block-cart-item__product {
    vertical-align: middle;
}

.tkg-cart-reference-layout .wc-block-cart-item__total {
    width: 180px;
    vertical-align: middle;
}

.tkg-cart-reference-layout .wc-block-cart__sidebar {
    grid-column: 2;
    grid-row: 2;
    width: 100% !important;
    min-height: 260px;
}

.tkg-cart-shipping-card {
    grid-column: 1;
    grid-row: 2;
    min-height: 260px;
    padding: 24px;
    border: 1px solid var(--tkg-line);
    border-radius: var(--tkg-radius-lg);
    background: #fff;
}

.tkg-cart-shipping-card h2 {
    margin: 0 0 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--tkg-line);
    font-size: 22px;
}

.tkg-cart-shipping-card__form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

.tkg-cart-shipping-card input {
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    font-size: 16px;
}

.tkg-cart-shipping-card button {
    min-width: 120px;
    border: 0;
    border-radius: 6px;
    background: var(--tkg-accent);
    color: var(--tkg-ink);
    font-size: 16px;
    font-weight: 800;
}

.tkg-cart-shipping-card > a {
    display: inline-block;
    margin-top: 16px;
    color: #1677c8;
    font-weight: 600;
    text-decoration: none;
}

.tkg-cart-shipping-card__status {
    min-height: 20px;
    margin: 12px 0 0;
    color: #287a3d;
    font-size: 13px;
}

.tkg-cart-shipping-card__status.is-error {
    color: #b42318;
}

.tkg-summary-continue.is-disabled {
    cursor: not-allowed;
    filter: grayscale(.4);
    opacity: .5;
    pointer-events: auto;
}

.tkg-cart-reference-layout > .tkg-cart-actions--bottom {
    justify-content: space-between;
    margin-top: 18px;
    padding: 0;
    border: 0;
    background: transparent;
}

.tkg-cart-reference-layout > .tkg-cart-actions--bottom .tkg-button {
    width: min(360px, 42%);
    min-height: 50px;
    justify-content: center;
}

.tkg-cart-actions--bottom .tkg-button {
    min-height: 40px;
    padding: 10px 16px;
    font-size: 14px;
}

.tkg-cart-actions--bottom .tkg-button span {
    display: inline-block;
    transition: transform .15s ease;
}

.tkg-cart-actions--bottom .tkg-button--secondary:hover span {
    transform: translateX(-2px);
}

.tkg-button {
    min-height: 46px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: var(--tkg-radius-sm);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.tkg-button:active {
    transform: translateY(1px);
}

.tkg-button--secondary {
    border-color: var(--tkg-line);
    background: var(--tkg-surface);
    color: var(--tkg-ink);
}

.tkg-button--secondary:hover {
    border-color: var(--tkg-muted);
    background: #fff;
    color: var(--tkg-ink);
}

.tkg-cart-shell .wp-block-woocommerce-cart {
    max-width: none;
    padding: 0;
}

.tkg-cart-shell .wc-block-cart {
    gap: 16px;
}

.tkg-cart-shell .wc-block-cart-items,
.tkg-cart-shell .wc-block-cart__sidebar,
.tkg-cart-shell .wc-block-components-sidebar-layout .wc-block-components-main {
    border: 1px solid var(--tkg-line);
    border-radius: var(--tkg-radius-lg);
    background: #fff;
}

.tkg-cart-shell .wc-block-components-sidebar-layout {
    align-items: start;
    gap: 16px;
    margin-bottom: 0 !important;
}

.tkg-cart-shell .wc-block-components-sidebar-layout .wc-block-components-main {
    width: 64%;
    padding: 8px 24px;
}

.tkg-cart-shell .wc-block-cart__sidebar {
    width: calc(36% - 16px);
    padding: 22px;
}

.tkg-cart-shell .wc-block-cart__sidebar::before {
    display: block;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--tkg-line);
    color: var(--tkg-muted);
    content: "Confira os valores antes de continuar";
    font-size: 13px;
    font-weight: 600;
}

.tkg-cart-shell .wc-block-cart-items__header {
    border-bottom-color: var(--tkg-line);
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.tkg-cart-shell .wc-block-cart-item__image img {
    border-radius: 8px;
    background: var(--tkg-surface);
}

.tkg-cart-shell .wc-block-components-product-name {
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.tkg-cart-shell .wc-block-components-product-metadata,
.tkg-cart-shell .wc-block-cart-item__remove-link {
    color: var(--tkg-muted);
    font-size: 13px;
}

.tkg-cart-shell .wc-block-components-quantity-selector {
    border-color: var(--tkg-line);
    border-radius: var(--tkg-radius-sm);
}

.tkg-cart-shell .wc-block-components-quantity-selector input {
    color: var(--tkg-ink);
}

.tkg-cart-shell .wc-block-components-totals-wrapper {
    border-top-color: var(--tkg-line);
}

.tkg-cart-shell .wc-block-components-totals-shipping {
    padding: 18px;
    border: 1px solid var(--tkg-line);
    border-radius: 8px;
    background: var(--tkg-surface);
}

.tkg-cart-shell .wc-block-components-totals-shipping__change-address__link {
    color: var(--tkg-ink);
    font-weight: 700;
    text-decoration-color: var(--tkg-accent);
    text-underline-offset: 3px;
}

.tkg-cart-shell .wc-block-cart__totals-title {
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 21px;
    font-weight: 700;
    text-transform: none;
}

.tkg-cart-shell :where(input, select, textarea):focus {
    outline: 3px solid rgb(251 177 45 / 35%);
    outline-offset: 1px;
    border-color: var(--tkg-accent-dark);
}

.tkg-cart-shell .wc-block-cart__empty-cart__title {
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(25px, 4vw, 36px);
    font-weight: 700;
}

@media (max-width: 782px) {
    .tkg-cart-shell {
        width: min(100% - 24px, 680px);
        margin-top: 20px;
    }

    .tkg-cart-intro {
        align-items: stretch;
        flex-direction: column;
    }

    .tkg-cart-intro > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .tkg-cart-actions--bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .tkg-cart-reference-layout .wc-block-cart {
        display: block;
    }

    .tkg-cart-shipping-card,
    .tkg-cart-reference-layout .wc-block-cart__sidebar {
        width: 100% !important;
        min-height: 0;
        margin-top: 16px;
    }

    .tkg-cart-reference-layout > .tkg-cart-actions--bottom .tkg-button {
        width: 100%;
    }

    .tkg-cart-reference-layout .wc-block-cart-item__image {
        width: 120px !important;
        min-width: 120px;
        padding-right: 12px !important;
    }

    .tkg-cart-reference-layout .wc-block-cart-item__image img {
        width: 108px !important;
        height: 108px !important;
    }

    .tkg-cart-shell .wc-block-components-sidebar-layout {
        display: block;
    }

    .tkg-cart-shell .wc-block-components-sidebar-layout .wc-block-components-main,
    .tkg-cart-shell .wc-block-cart__sidebar {
        width: 100%;
        padding: 16px;
    }

    .tkg-cart-shell .wc-block-cart__sidebar {
        margin-top: 16px;
    }

    .tkg-cart-shell .wc-block-cart-items td {
        padding-inline: 8px;
    }

    .tkg-cart-shell .wc-block-cart-item__wrap {
        gap: 8px;
    }

    .tkg-cart-shell .wc-block-components-product-name {
        font-size: 15px;
    }
}

@media (max-width: 460px) {
    .tkg-cart-actions--bottom {
        grid-template-columns: 1fr;
    }

    .tkg-button {
        width: 100%;
    }

    .tkg-cart-shell .wc-block-components-sidebar-layout .wc-block-components-main {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tkg-button {
        transition: none;
    }
}

/* Estrutura visual do checkout TKG. */
body.tkg-checkout-page main > .wp-block-post-title,
body.tkg-checkout-page .woocommerce-notices-wrapper,
body.tkg-checkout-page main > .woocommerce-message,
body.tkg-checkout-page main > .woocommerce-error,
body.tkg-checkout-page main > .woocommerce-info {
    display: none !important;
}

.tkg-checkout-flow {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 60px;
    color: var(--tkg-ink);
    font-family: Inter, Arial, sans-serif;
}

.tkg-checkout-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 26px;
    padding: 16px 20px;
    border: 1px solid var(--tkg-line);
    border-radius: var(--tkg-radius-lg);
    background: #fff;
    box-shadow: 0 10px 28px rgb(17 19 24 / 5%);
}

.tkg-checkout-stepper button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tkg-muted);
    font-size: 14px;
    font-weight: 700;
    text-align: left;
}

.tkg-checkout-stepper button span {
    display: inline-grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--tkg-line);
    border-radius: 50%;
    background: var(--tkg-surface);
}

.tkg-checkout-stepper button.is-active {
    color: var(--tkg-ink);
}

.tkg-checkout-stepper button.is-active span,
.tkg-checkout-stepper button.is-complete span {
    border-color: var(--tkg-accent);
    background: var(--tkg-accent);
    color: var(--tkg-ink);
}

.tkg-checkout-flow [data-tkg-step]:not(.is-active) {
    display: none !important;
}

.tkg-checkout-flow .wc-block-components-main {
    padding-right: 26px;
}

.tkg-checkout-identification,
.tkg-checkout-flow #contact-fields,
.tkg-checkout-flow #shipping-fields,
.tkg-checkout-flow #shipping-option,
.tkg-checkout-flow #payment-method {
    margin: 0 0 16px;
    padding: 26px 30px;
    border: 1px solid var(--tkg-line);
    border-radius: var(--tkg-radius-lg);
    background: #fff;
}

.tkg-checkout-flow[data-tkg-payment-expanded="0"] #payment-method .wc-block-components-radio-control-accordion-content {
    display: none !important;
}

.tkg-checkout-flow #radio-control-wc-payment-method-options-woo-mercado-pago-custom__content .mp-wallet-button-container-wrapper {
    display: none !important;
}

.tkg-checkout-flow .wc-block-checkout__actions_row { align-items: center; justify-content: space-between; gap: 12px; }
.tkg-checkout-flow .wc-block-checkout__actions_row .tkg-checkout-back--payment { flex: 0 0 auto; }
.tkg-checkout-flow .wc-block-checkout__actions_row .wc-block-components-checkout-place-order-button { width: auto; min-width: 190px; margin-left: auto; }
.tkg-checkout-flow #order-notes .wc-block-components-checkbox label { display: inline-flex; align-items: center; gap: 8px; width: auto; cursor: pointer; color: var(--tkg-ink); font-size: 14px; font-weight: 700; }
.tkg-checkout-flow #order-notes .wc-block-components-checkbox__input,
.tkg-checkout-flow #order-notes .wc-block-components-checkbox__mark { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
.tkg-checkout-flow #order-notes .wc-block-components-checkbox__label::before { content: "+"; display: inline-grid; width: 24px; height: 24px; place-items: center; border-radius: 6px; background: #fff4dc; color: #e89500; font-size: 22px; font-weight: 900; line-height: 1; }
.tkg-checkout-flow #order-notes .wc-block-components-checkbox__input:checked ~ .wc-block-components-checkbox__label::before { content: "−"; }

.tkg-checkout-identification p {
    margin: 0 0 10px;
    color: var(--tkg-accent-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.tkg-checkout-identification h1 {
    margin: 0 0 14px;
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(22px, 2vw, 26px);
    font-weight: 700;
    line-height: 1.25;
}

.tkg-checkout-identification span {
    color: var(--tkg-muted);
    font-size: 15px;
    line-height: 1.5;
}

.tkg-checkout-flow .wc-block-components-checkout-step__heading {
    margin: 0 0 18px;
}

.tkg-checkout-flow .wc-block-components-checkout-step__title {
    margin: 0;
    color: var(--tkg-ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: 700;
}

.tkg-checkout-flow .wc-block-checkout__guest-checkout-notice {
    margin: 8px 0 0;
    color: var(--tkg-muted);
    font-size: 13px;
}

.tkg-address-stages {
    margin: 0 0 22px;
    padding: 16px;
    border: 1px solid var(--tkg-line);
    border-radius: 10px;
    background: var(--tkg-surface);
}

.tkg-address-stages > p {
    margin: 0 0 12px;
    color: var(--tkg-muted);
    font-size: 13px;
    font-weight: 700;
}

.tkg-address-stages > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tkg-address-stages button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--tkg-muted);
    font-size: 13px;
    font-weight: 800;
    text-align: left;
}

.tkg-address-stages button span {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border: 1px solid var(--tkg-line);
    border-radius: 50%;
}

.tkg-address-stages button.is-active {
    color: var(--tkg-ink);
    box-shadow: 0 3px 12px rgb(17 19 24 / 7%);
}

.tkg-address-stages button.is-active span,
.tkg-address-stages button.is-complete span {
    border-color: var(--tkg-accent);
    background: var(--tkg-accent);
    color: var(--tkg-ink);
}

.tkg-checkout-flow #shipping-fields [data-tkg-address-stage]:not(.is-active) {
    display: none !important;
}

.tkg-address-stage-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
}

.tkg-address-stage-nav .tkg-checkout-next:disabled {
    cursor: not-allowed;
    filter: grayscale(.35);
    opacity: .48;
}

.tkg-checkout-flow #shipping-fields .wc-block-components-address-form__address_2-toggle {
    display: inline-block;
    cursor: pointer;
}

.tkg-checkout-flow #shipping-fields .wc-block-components-address-form__address_2-toggle::first-letter {
    color: #e89500;
    font-size: 21px;
    font-weight: 900;
}

.tkg-checkout-flow #shipping-fields .wc-block-components-address-form__address_2-toggle:focus-visible {
    outline: 2px solid rgb(232 149 0 / 35%);
    outline-offset: 2px;
}

.tkg-checkout-flow #shipping-fields .tkg-field-invalid input,
.tkg-checkout-flow #shipping-fields .tkg-field-invalid select {
    border-color: #cf2e2e !important;
    box-shadow: 0 0 0 1px #cf2e2e !important;
}

.tkg-checkout-flow #shipping-fields .tkg-field-invalid label {
    color: #b42318 !important;
}

.tkg-field-error {
    width: 100%;
    margin: 6px 0 0 !important;
    color: #b42318 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
}

.tkg-company-lookup-status {
    flex-basis: 100%;
    margin: -4px 0 8px !important;
    color: #216e39 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
}

.tkg-company-lookup-status.is-error {
    color: #b42318 !important;
}

.tkg-checkout-flow #shipping-fields [hidden] {
    display: none !important;
}

.tkg-checkout-flow #shipping-fields .wc-block-components-address-form__tkg-contribuinte-icms,
.tkg-checkout-flow #shipping-fields .wc-block-components-address-form__tkg-inscricao-estadual {
    flex-basis: 100%;
}

.tkg-checkout-flow #shipping-fields[data-tkg-customer-type="person"] .wc-block-components-address-form__tkg-contribuinte-icms,
.tkg-checkout-flow #shipping-fields[data-tkg-customer-type="person"] .wc-block-components-address-form__tkg-inscricao-estadual {
    display: none !important;
}

.tkg-cep-status {
    min-height: 20px;
    margin: 12px 0 0 !important;
    color: #216e39 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
}

.tkg-saved-address {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    padding: 20px;
    border: 1px solid #b9dfc6;
    border-radius: 10px;
    background: #f3fbf6;
}

.tkg-saved-address p,
.tkg-saved-address strong,
.tkg-saved-address span {
    margin: 0;
}

.tkg-saved-address p {
    color: #216e39;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.tkg-saved-address span {
    color: var(--tkg-muted);
    font-size: 14px;
}

.tkg-saved-address > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
}

.tkg-checkout-flow #shipping-fields[data-tkg-address-mode="saved"] .tkg-address-stages,
.tkg-checkout-flow #shipping-fields[data-tkg-address-mode="saved"] [data-tkg-address-stage],
.tkg-checkout-flow #shipping-fields[data-tkg-address-mode="saved"] .tkg-address-stage-nav,
.tkg-checkout-flow #shipping-fields[data-tkg-address-mode="edit"] .tkg-saved-address,
.tkg-checkout-flow #billing-fields,
.tkg-checkout-flow .wc-block-checkout__use-address-for-billing {
    display: none !important;
}

.tkg-checkout-flow #shipping-fields [data-tkg-autofilled="1"] {
    background: #f5f7f9;
    color: var(--tkg-muted);
}

.tkg-checkout-flow #shipping-fields select[data-tkg-autofilled="1"] {
    pointer-events: none;
}

.tkg-delivery-summary {
    display: grid;
    gap: 4px;
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px solid var(--tkg-line);
    border-radius: 8px;
    background: #f8fafb;
}

.tkg-delivery-summary strong,
.tkg-delivery-summary b {
    color: var(--tkg-ink);
}

.tkg-delivery-summary span {
    color: var(--tkg-muted);
    font-size: 13px;
}

.tkg-delivery-summary b {
    margin-top: 4px;
    font-size: 14px;
}

.tkg-checkout-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 20px 0 4px;
}

.tkg-checkout-back,
.tkg-checkout-next {
    min-height: 46px;
    padding: 12px 20px;
    border: 1px solid var(--tkg-line);
    border-radius: 6px;
    background: #fff;
    color: var(--tkg-ink);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.tkg-checkout-next {
    margin-left: auto;
    border-color: var(--tkg-accent);
    background: var(--tkg-accent);
}

.tkg-checkout-back:hover,
.tkg-checkout-next:hover {
    filter: brightness(.97);
}

.tkg-checkout-flow .wc-block-checkout__sidebar,
.tkg-checkout-flow .wc-block-components-sidebar {
    padding: 24px;
    border: 1px solid var(--tkg-line);
    border-radius: var(--tkg-radius-lg);
    background: #fff;
}

@media (max-width: 782px) {
    .tkg-checkout-stepper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tkg-checkout-flow .wc-block-components-main {
        padding-right: 0;
    }

    .tkg-checkout-identification,
    .tkg-checkout-flow #contact-fields,
    .tkg-checkout-flow #shipping-fields,
    .tkg-checkout-flow #shipping-option,
    .tkg-checkout-flow #payment-method {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .tkg-checkout-flow {
        width: min(100% - 20px, 1180px);
    }

    .tkg-checkout-stepper {
        gap: 8px;
        padding: 12px;
    }

    .tkg-checkout-stepper button {
        font-size: 12px;
    }

    .tkg-checkout-stepper button span {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }

    .tkg-address-stages > div {
        grid-template-columns: 1fr;
    }
}

/* TKG checkout v1.0.15: identificação e autenticação no fluxo Casa das Capotas. */
.tkg-checkout-flow #contact-fields {
    margin-bottom: 0;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.tkg-checkout-flow .tkg-identification-field {
    position: relative;
}

.tkg-checkout-flow .tkg-identification-field::before,
.tkg-checkout-flow .tkg-identification-field::after {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 24px;
    height: 24px;
    pointer-events: none;
    transform: translateY(-50%);
    content: "";
}

.tkg-checkout-flow .tkg-identification-field::before {
    left: 18px;
    background: center / 24px 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='4.5' width='19' height='15' rx='1.5'/%3E%3Cpath d='m3.5 6 8.5 6.2L20.5 6'/%3E%3C/svg%3E");
}

.tkg-checkout-flow .tkg-identification-field input {
    min-height: 64px;
    padding: 16px 56px 16px 58px !important;
    border: 1.5px solid #cbd2d9 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--tkg-ink);
    font-size: 18px !important;
    line-height: 1.25;
    box-shadow: none !important;
}

.tkg-checkout-flow .tkg-identification-field input::placeholder {
    color: #737373;
    opacity: 1;
}

.tkg-checkout-flow .tkg-identification-field input:focus {
    border-color: #f5a800 !important;
    outline: 2px solid rgb(245 168 0 / 16%);
    outline-offset: 1px;
}

.tkg-checkout-flow .tkg-identification-field label {
    display: none !important;
}

.tkg-checkout-flow .tkg-identification-field:has(input[aria-invalid="true"])::after {
    right: 18px;
    background: center / 24px 24px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 5l14 14M19 5 5 19'/%3E%3C/svg%3E");
}

.tkg-checkout-flow .tkg-identification-field input[aria-invalid="true"] {
    border-color: #ef4444 !important;
}

.tkg-identity-login {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #d9e0e7;
    border-radius: 8px;
    background: #f8fafc;
}

.tkg-identity-login[hidden] {
    display: none !important;
}

.tkg-identity-login__help,
.tkg-identity-login__alternative,
.tkg-identity-status {
    margin: 0 0 10px;
    color: var(--tkg-muted);
    font-size: 13px;
    line-height: 1.45;
}

.tkg-identity-login label span {
    display: block;
    margin-bottom: 6px;
    color: var(--tkg-ink);
    font-size: 13px;
    font-weight: 700;
}

.tkg-identity-login input[type="password"] {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #cbd2d9;
    border-radius: 6px;
    background: #fff;
}

.tkg-identity-login button {
    width: 100%;
    min-height: 46px;
    margin-top: 10px;
    border: 0;
    border-radius: 6px;
    background: var(--tkg-accent);
    color: var(--tkg-ink);
    font-weight: 800;
}

.tkg-identity-login button:disabled {
    cursor: wait;
    opacity: .65;
}

.tkg-identity-login .tkg-identity-new-customer {
    border: 1px solid #cbd2d9;
    background: #fff;
}

.tkg-identity-login .tkg-identity-new-customer[hidden] {
    display: none;
}

.tkg-identity-status {
    min-height: 19px;
    margin-top: 10px;
    color: #216e39;
    font-weight: 700;
}

.tkg-identity-status.is-error {
    color: #b42318;
}

.tkg-identity-login__alternative {
    margin: 8px 0 0;
}

.tkg-identity-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.tkg-checkout-social-login {
    margin-top: -1px;
    padding: 16px 22px 22px;
    border: 1px solid var(--tkg-line);
    border-top-color: #edf1f5;
    border-radius: 0 0 10px 10px;
    background: #fbfcfd;
}

.tkg-social-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    color: var(--tkg-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.tkg-social-login-divider::before,
.tkg-social-login-divider::after {
    flex: 1 1 auto;
    width: auto;
    height: 1px;
    background: var(--tkg-line);
    content: "";
}

.tkg-social-login-divider span {
    white-space: nowrap;
}

.tkg-social-login-title {
    margin: 0 0 14px;
    color: var(--tkg-muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.tkg-social-login-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tkg-social-login-buttons > .nsl-container,
.tkg-social-login-buttons .nsl-container-buttons {
    display: contents !important;
}

.tkg-social-login-buttons .nsl-button,
.tkg-social-facebook-pending {
    width: 100% !important;
    min-height: 46px;
    border-radius: 6px !important;
}

.tkg-social-facebook-pending {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    border: 0;
    background: #1877f2;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    opacity: .68;
}

.tkg-social-facebook-pending span {
    font-family: Arial, sans-serif;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

@media (max-width: 560px) {
    .tkg-social-login-buttons {
        grid-template-columns: 1fr;
    }
}


.tkg-checkout-flow .tkg-pix-payment-options { display: none; margin: 0 18px 18px; padding: 18px; border: 1px solid #b8dfd5; border-radius: 10px; background: #f3fbf8; color: var(--tkg-ink); }
.tkg-checkout-flow[data-tkg-payment-expanded="1"][data-tkg-payment-open-option="woo-mercado-pago-pix"] .tkg-pix-payment-options { display: block; }
.tkg-pix-payment-options > strong { display: block; margin-bottom: 12px; font-size: 15px; }
.tkg-pix-payment-options > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tkg-pix-payment-options span { display: flex; align-items: center; gap: 8px; padding: 12px; border: 1px solid #d4ebe5; border-radius: 8px; background: #fff; font-size: 13px; font-weight: 700; }
.tkg-pix-payment-options span b { color: #16826b; font-size: 17px; }
.tkg-pix-payment-options p { margin: 12px 0 0; color: var(--tkg-muted); font-size: 13px; line-height: 1.45; }
@media (max-width: 782px) { .tkg-pix-payment-options > div { grid-template-columns: 1fr; } }


/* TKG_CART_DESKTOP_ADDRESS_AND_ITEM_FREIGHT_20260729 */
@media (min-width: 981px) {
    body.woocommerce-cart .tkg-cart-address {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 112px !important;
        align-items: end !important;
        gap: 12px !important;
        margin: 10px 0 0 !important;
        padding: 10px 12px !important;
        border: 1px solid #e2e6e9 !important;
        border-radius: 8px !important;
        background: #f8f9fa !important;
    }
    body.woocommerce-cart .tkg-cart-address[hidden] { display: none !important; }
    body.woocommerce-cart .tkg-cart-address__location { min-width: 0 !important; display: grid !important; gap: 3px !important; }
    body.woocommerce-cart .tkg-cart-address__location strong { color: #111318 !important; font-size: 13px !important; line-height: 1.25 !important; }
    body.woocommerce-cart .tkg-cart-address__location small { color: #626b75 !important; font-size: 11px !important; line-height: 1.25 !important; }
    body.woocommerce-cart .tkg-cart-address__number { display: grid !important; gap: 4px !important; margin: 0 !important; }
    body.woocommerce-cart .tkg-cart-address__number span { color: #353b42 !important; font-size: 10px !important; font-weight: 800 !important; text-transform: uppercase !important; }
    body.woocommerce-cart #tkg-cart-number { width: 100% !important; height: 34px !important; min-height: 34px !important; margin: 0 !important; padding: 0 9px !important; border: 1px solid #cfd5da !important; border-radius: 7px !important; background: #fff !important; color: #111318 !important; font-size: 12px !important; box-sizing: border-box !important; }
    body.woocommerce-cart #tkg-cart-number:focus { border-color: #111318 !important; outline: 2px solid rgba(17, 19, 24, .1) !important; }
    body.woocommerce-cart .tkg-cart-item-breakdown { display: flex !important; flex-wrap: wrap !important; gap: 7px 14px !important; margin: 8px 0 0 !important; padding: 7px 9px !important; border-radius: 7px !important; background: #f5f6f7 !important; }
    body.woocommerce-cart .tkg-cart-item-breakdown span { color: #626b75 !important; font-size: 11px !important; line-height: 1.25 !important; }
    body.woocommerce-cart .tkg-cart-item-breakdown strong { margin-left: 4px !important; color: #111318 !important; font-size: 11px !important; font-weight: 800 !important; }
    body.woocommerce-cart .tkg-cart-item-breakdown__shipping.is-free strong { color: #157347 !important; }
}
