:root {
    --ifpc-bg: #f4f6fb;
    --ifpc-surface: #ffffff;
    --ifpc-surface-soft: #f8f9fc;
    --ifpc-text: #131827;
    --ifpc-muted: #697087;
    --ifpc-line: #e7eaf1;
    --ifpc-primary: #ff3d79;
    --ifpc-primary-2: #8b5cf6;
    --ifpc-success: #17b26a;
    --ifpc-dark: #0b1020;
    --ifpc-shadow: 0 20px 60px rgba(28, 35, 58, .10);
}

body:is(.ifpc-premium-checkout,.woocommerce-checkout) {
    background: var(--ifpc-bg) !important;
    color: var(--ifpc-text) !important;
    padding: 0 !important;
}

body:is(.ifpc-premium-checkout,.woocommerce-checkout) .gc-header__wrapper,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .gc-footer,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .gc-scroll__to-top,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .entry-header,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .edit-link,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .imf-bottom-nav,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #wpadminbar + .gc-header__wrapper {
    display: none !important;
}

body:is(.ifpc-premium-checkout,.woocommerce-checkout) #main,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .main,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .content,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) article,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .entry-content,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.ifpc-page-shell,
.ifpc-page-shell * { box-sizing: border-box; }

.ifpc-page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 40px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.ifpc-checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 58px;
    margin-bottom: 16px;
}

.ifpc-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ifpc-text) !important;
    text-decoration: none !important;
}

.ifpc-brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--ifpc-primary), var(--ifpc-primary-2));
    box-shadow: 0 10px 24px rgba(236, 72, 153, .24);
}
.ifpc-brand-mark svg { width: 22px; height: 22px; }
.ifpc-brand strong { display: block; font-size: 16px; line-height: 1.1; letter-spacing: -.02em; }
.ifpc-brand small { display: block; margin-top: 3px; color: var(--ifpc-muted); font-size: 10px; font-weight: 650; }

.ifpc-header-secure {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    color: #546074;
    border: 1px solid var(--ifpc-line);
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    font-size: 11px;
    font-weight: 750;
}
.ifpc-status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ifpc-success); box-shadow: 0 0 0 4px rgba(23,178,106,.10); }

.ifpc-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 28px;
    align-items: center;
    padding: 28px 30px;
    color: #fff;
    border-radius: 24px;
    background:
        radial-gradient(circle at 88% 12%, rgba(139,92,246,.35), transparent 28%),
        radial-gradient(circle at 8% 92%, rgba(255,61,121,.20), transparent 30%),
        linear-gradient(135deg, #0b1020, #15162a 55%, #21152c);
    box-shadow: 0 22px 62px rgba(15, 19, 40, .16);
}
.ifpc-eyebrow { display: block; margin-bottom: 8px; color: #ff8fb2; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.ifpc-hero h1 { margin: 0 !important; color: #fff !important; font-size: clamp(25px, 3.3vw, 38px) !important; line-height: 1.07 !important; letter-spacing: -.04em; font-weight: 850 !important; }
.ifpc-hero p { max-width: 610px; margin: 10px 0 0 !important; color: rgba(255,255,255,.66) !important; font-size: 14px; line-height: 1.55; }

.ifpc-trust-grid { display: grid; gap: 9px; }
.ifpc-trust-item { display: flex; align-items: center; gap: 11px; min-height: 59px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.10); border-radius: 15px; background: rgba(255,255,255,.055); backdrop-filter: blur(6px); }
.ifpc-trust-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.09); color: #7ee2ac; font-size: 12px; font-weight: 900; }
.ifpc-trust-item strong, .ifpc-trust-item small { display: block; }
.ifpc-trust-item strong { color: #fff; font-size: 12px; }
.ifpc-trust-item small { margin-top: 2px; color: rgba(255,255,255,.54); font-size: 10px; }

.ifpc-progress { display: flex; align-items: center; justify-content: center; gap: 10px; max-width: 520px; margin: 18px auto 20px; }
.ifpc-progress > div { display: flex; align-items: center; gap: 7px; color: #a1a7b6; font-size: 10px; font-weight: 800; }
.ifpc-progress span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d8dce7; background: #fff; }
.ifpc-progress .is-active { color: #34394b; }
.ifpc-progress .is-active span { border-color: rgba(255,61,121,.28); color: #fff; background: linear-gradient(135deg, var(--ifpc-primary), var(--ifpc-primary-2)); }
.ifpc-progress i { width: 54px; height: 1px; background: #dfe3eb; }

.ifpc-checkout-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr); gap: 22px; align-items: start; }
.ifpc-left-column, .ifpc-right-column { min-width: 0; }
.ifpc-right-column { position: sticky; top: 18px; }

.ifpc-panel { padding: 22px; border: 1px solid var(--ifpc-line); border-radius: 22px; background: var(--ifpc-surface); box-shadow: var(--ifpc-shadow); }
.ifpc-panel-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.ifpc-panel-heading--compact { margin-bottom: 10px; }
.ifpc-step-badge { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--ifpc-primary), var(--ifpc-primary-2)); font-size: 12px; font-weight: 900; box-shadow: 0 8px 18px rgba(236,72,153,.18); }
.ifpc-panel-heading h2 { margin: 0 !important; color: var(--ifpc-text) !important; font-size: 17px !important; line-height: 1.2 !important; font-weight: 850 !important; letter-spacing: -.02em; }
.ifpc-panel-heading p { margin: 4px 0 0 !important; color: var(--ifpc-muted) !important; font-size: 11px; line-height: 1.45; }

.ifpc-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 12px; }
.ifpc-field-grid .form-row-wide, .ifpc-field-grid #billing_email_field, .ifpc-field-grid #billing_address_1_field, .ifpc-field-grid #billing_address_2_field { grid-column: 1 / -1; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row { float: none !important; width: 100% !important; margin: 0 0 13px !important; padding: 0 !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row label { display: block !important; margin: 0 0 6px !important; color: #596073 !important; font-size: 11px !important; font-weight: 760 !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row .required { color: var(--ifpc-primary) !important; text-decoration: none !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row input.input-text,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row textarea,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row select,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .select2-container .select2-selection--single {
    width: 100% !important;
    min-height: 48px !important;
    border: 1px solid #dfe3eb !important;
    border-radius: 12px !important;
    background: #fff !important;
    color: var(--ifpc-text) !important;
    font-size: 14px !important;
    box-shadow: 0 1px 2px rgba(15,23,42,.025) !important;
    outline: none !important;
    transition: border-color .18s, box-shadow .18s !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row input.input-text,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row textarea,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row select { padding: 12px 13px !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row input.input-text:focus,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row textarea:focus,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .form-row select:focus { border-color: #b88af7 !important; box-shadow: 0 0 0 4px rgba(139,92,246,.08) !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .select2-container .select2-selection--single .select2-selection__rendered { line-height: 46px !important; padding: 0 13px !important; color: var(--ifpc-text) !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .select2-container .select2-selection--single .select2-selection__arrow { height: 46px !important; right: 8px !important; }

.ifpc-shipping-fields:empty, .ifpc-additional-fields:empty { display: none; }
.ifpc-additional-fields h3, #ship-to-different-address { margin: 8px 0 14px !important; font-size: 13px !important; }

.ifpc-help-card { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; margin-top: 14px; padding: 14px 16px; border: 1px solid #e4e7ef; border-radius: 16px; background: rgba(255,255,255,.7); }
.ifpc-help-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #6d42d7; background: #f0eaff; font-weight: 900; }
.ifpc-help-card strong { display: block; font-size: 12px; }
.ifpc-help-card p { margin: 2px 0 0 !important; color: var(--ifpc-muted) !important; font-size: 10px; }
.ifpc-help-card a { padding: 8px 11px; border-radius: 9px; color: #6040be !important; background: #f4f0ff; text-decoration: none !important; font-size: 10px; font-weight: 800; }

.ifpc-order-summary-title { display: flex; justify-content: space-between; align-items: center; padding: 10px 0 9px; border-bottom: 1px solid var(--ifpc-line); color: #4b5264; font-size: 11px; font-weight: 800; }
.ifpc-item-count { color: #969dad; font-size: 10px; font-weight: 700; }
.ifpc-items-list { display: grid; gap: 0; }
.ifpc-order-item { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px 0; border-bottom: 1px solid #eef0f5; }
.ifpc-product-thumb { width: 50px; height: 50px; overflow: hidden; border-radius: 12px; background: #f1f3f8; }
.ifpc-product-thumb img { width: 100% !important; height: 100% !important; object-fit: cover !important; margin: 0 !important; }
.ifpc-product-info { min-width: 0; }
.ifpc-product-info strong { display: block; overflow: hidden; color: #242938; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; }
.ifpc-product-info small { display: block; margin-top: 3px; color: #969dac; font-size: 9px; }
.ifpc-product-info dl { margin: 4px 0 0 !important; color: #969dac; font-size: 9px; }
.ifpc-product-info dt, .ifpc-product-info dd { display: inline; float: none !important; margin: 0 !important; padding: 0 !important; }
.ifpc-product-price { color: #272c3b; font-size: 11px; font-weight: 850; white-space: nowrap; }

.ifpc-totals { padding: 10px 0 0; }
.ifpc-totals > div { display: flex; justify-content: space-between; gap: 18px; padding: 6px 0; color: #6f7688; font-size: 11px; }
.ifpc-totals strong { color: #303544; font-weight: 800; }
.ifpc-totals .ifpc-grand-total { margin-top: 7px; padding-top: 13px; border-top: 1px solid var(--ifpc-line); align-items: baseline; color: #1d2231; font-size: 14px; font-weight: 850; }
.ifpc-grand-total strong { color: var(--ifpc-text); font-size: 21px; letter-spacing: -.03em; }
.ifpc-totals .woocommerce-shipping-totals { display: table-row; }

.ifpc-payment-wrap { margin-top: 18px !important; padding-top: 17px; border-top: 1px solid var(--ifpc-line); background: transparent !important; }
.ifpc-payment-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 9px; }
.ifpc-payment-heading strong { color: #2a2f3e; font-size: 12px; }
.ifpc-payment-heading small { color: #989ead; font-size: 9px; }

body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment ul.payment_methods { display: grid !important; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; list-style: none !important; background: transparent !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .wc_payment_method { position: relative; margin: 0 !important; padding: 0 !important; border: 1px solid #e0e4ec !important; border-radius: 14px !important; background: #fff !important; overflow: hidden; transition: border-color .18s, box-shadow .18s, transform .18s; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .wc_payment_method:hover { border-color: #cfd4df !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .wc_payment_method.ifpc-selected { border-color: rgba(255,61,121,.55) !important; box-shadow: 0 0 0 3px rgba(255,61,121,.06); }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .wc_payment_method > input.input-radio { position: absolute !important; opacity: 0 !important; pointer-events: none !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .wc_payment_method > label { display: flex !important; align-items: center !important; gap: 9px !important; min-height: 48px; margin: 0 !important; padding: 10px 12px !important; color: #333848 !important; cursor: pointer; font-size: 11px !important; font-weight: 800 !important; }
.ifpc-radio-ui { width: 17px; height: 17px; flex: 0 0 17px; border: 1.5px solid #bfc5d1; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 4px #fff; }
.ifpc-selected .ifpc-radio-ui { border-color: var(--ifpc-primary); background: var(--ifpc-primary); }
.ifpc-gateway-title { min-width: 0; flex: 1; }
.ifpc-gateway-icon { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.ifpc-gateway-icon img, body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .wc_payment_method > label img { width: auto !important; max-width: 74px !important; max-height: 24px !important; margin: 0 !important; object-fit: contain !important; }

body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .payment_box { margin: 0 10px 10px !important; padding: 12px !important; border: 0 !important; border-radius: 11px !important; background: #f7f8fb !important; color: #61687a !important; font-size: 10px !important; line-height: 1.5 !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .payment_box:before { display: none !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .payment_box p { margin: 0 0 8px !important; color: inherit !important; font-size: inherit !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .payment_box img[src*="pix-banco-central"] { display: block !important; width: auto !important; max-width: 130px !important; max-height: 54px !important; height: auto !important; margin: 5px 0 9px !important; object-fit: contain !important; }

/* Mercado Pago: somente apresentação; nunca forçamos elementos mp-hidden a aparecer. */
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .mp-checkout-custom-container,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment #mp-checkout-custom-root,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .mp-checkout-custom-card-form { max-width: 100% !important; width: 100% !important; box-sizing: border-box !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment iframe { max-width: 100% !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .mp-checkout-custom-card-flags img { max-width: 42px !important; max-height: 22px !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .mp-input, body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment [class*="mp-input"] { border-radius: 10px !important; }

body:is(.ifpc-premium-checkout,.woocommerce-checkout) #payment .place-order { margin: 14px 0 0 !important; padding: 0 !important; background: transparent !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-terms-and-conditions-wrapper { margin: 0 0 11px; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-privacy-policy-text { display: none !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-privacy-policy-text a,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-terms-and-conditions-link { color: #7045d2 !important; font-weight: 800; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) label.woocommerce-form__label-for-checkbox { display: flex !important; align-items: flex-start; gap: 8px; color: #646b7c !important; font-size: 10px !important; line-height: 1.45; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) input[type="checkbox"] { accent-color: var(--ifpc-primary); }

.ifpc-before-submit-note { display: flex; align-items: center; gap: 9px; margin: 10px 0; padding: 10px 11px; border-radius: 11px; background: #f4fbf7; color: #406451; }
.ifpc-before-submit-note > span { font-size: 15px; }
.ifpc-before-submit-note p { margin: 0 !important; }
.ifpc-before-submit-note strong, .ifpc-before-submit-note small { display: block; }
.ifpc-before-submit-note strong { color: #356048; font-size: 10px; }
.ifpc-before-submit-note small { margin-top: 2px; color: #6d8777; font-size: 8.5px; }

body:is(.ifpc-premium-checkout,.woocommerce-checkout) #place_order { position: relative; float: none !important; width: 100% !important; min-height: 54px; margin: 0 !important; padding: 14px 18px !important; border: 0 !important; border-radius: 13px !important; background: linear-gradient(135deg, var(--ifpc-primary), var(--ifpc-primary-2)) !important; color: #fff !important; font-size: 13px !important; font-weight: 900 !important; letter-spacing: -.01em; text-transform: none !important; box-shadow: 0 13px 28px rgba(225, 61, 127, .23) !important; cursor: pointer; transition: transform .18s, box-shadow .18s, filter .18s !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #place_order:hover { transform: translateY(-1px); box-shadow: 0 17px 34px rgba(225,61,127,.29) !important; filter: saturate(1.05); }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #place_order.is-processing { opacity: .76; pointer-events: none; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) #place_order.is-processing:after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 9px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: ifpcSpin .65s linear infinite; }
@keyframes ifpcSpin { to { transform: rotate(360deg); } }
.ifpc-legal-mini { margin-top: 8px; color: #a0a5b2; text-align: center; font-size: 8.5px; line-height: 1.45; }

.ifpc-bottom-security { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ifpc-bottom-security > div { display: grid; grid-template-columns: auto 1fr; column-gap: 7px; padding: 10px 11px; border: 1px solid #e6e9f0; border-radius: 13px; background: rgba(255,255,255,.72); }
.ifpc-bottom-security span { grid-row: 1 / 3; font-size: 13px; }
.ifpc-bottom-security strong { color: #52596c; font-size: 9.5px; }
.ifpc-bottom-security small { margin-top: 2px; color: #9298a8; font-size: 8px; line-height: 1.35; }

.ifpc-checkout-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 19px; padding: 0 3px; color: #969cab; font-size: 9px; }
.ifpc-checkout-footer nav { display: flex; gap: 13px; }
.ifpc-checkout-footer a { color: #777e90 !important; text-decoration: none !important; font-weight: 700; }

body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-error,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-info,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-message,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-NoticeGroup { width: min(1180px, calc(100% - 32px)); margin: 12px auto !important; border: 1px solid #e4e7ef !important; border-radius: 13px !important; background: #fff !important; color: #4d5466 !important; box-shadow: 0 12px 32px rgba(31,38,62,.07) !important; font-size: 11px !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .woocommerce-error { border-color: #ffd0dc !important; background: #fff8fa !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .blockUI.blockOverlay { border-radius: 14px; }

@media (max-width: 920px) {
    .ifpc-page-shell { width: min(100% - 20px, 720px); padding-top: 10px; }
    .ifpc-checkout-grid { grid-template-columns: 1fr; }
    .ifpc-right-column { position: static; }
    .ifpc-hero { grid-template-columns: 1fr; padding: 23px 21px; }
    .ifpc-trust-grid { grid-template-columns: repeat(3, 1fr); }
    .ifpc-trust-item { align-items: flex-start; min-height: 92px; flex-direction: column; }
}

@media (max-width: 620px) {
    body:is(.ifpc-premium-checkout,.woocommerce-checkout) { padding-bottom: 20px !important; }
    .ifpc-page-shell { width: calc(100% - 14px); }
    .ifpc-checkout-header { min-height: 50px; margin-bottom: 9px; padding: 0 4px; }
    .ifpc-header-secure { padding: 7px 9px; font-size: 9px; }
    .ifpc-brand-mark { width: 36px; height: 36px; }
    .ifpc-brand strong { font-size: 14px; }
    .ifpc-brand small { font-size: 9px; }
    .ifpc-hero { padding: 20px 17px; border-radius: 18px; }
    .ifpc-hero h1 { font-size: 25px !important; }
    .ifpc-hero p { font-size: 12px; }
    .ifpc-trust-grid { grid-template-columns: 1fr; gap: 7px; }
    .ifpc-trust-item { min-height: 0; flex-direction: row; align-items: center; }
    .ifpc-progress { gap: 6px; margin: 13px auto 15px; }
    .ifpc-progress b { display: none; }
    .ifpc-progress i { width: 42px; }
    .ifpc-panel { padding: 15px; border-radius: 17px; }
    .ifpc-panel-heading { margin-bottom: 14px; }
    .ifpc-field-grid { grid-template-columns: 1fr; }
    .ifpc-field-grid > * { grid-column: 1 / -1 !important; }
    .ifpc-help-card { grid-template-columns: auto 1fr; }
    .ifpc-help-card a { grid-column: 1 / -1; text-align: center; }
    .ifpc-order-item { grid-template-columns: 44px minmax(0,1fr) auto; gap: 8px; }
    .ifpc-product-thumb { width: 44px; height: 44px; }
    .ifpc-bottom-security { grid-template-columns: 1fr; }
    .ifpc-checkout-footer { flex-direction: column; justify-content: center; text-align: center; }
}


/* ===== 1.1.0: Gecko / legacy fallback ===== */
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-fallback-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout).ifpc-legacy-fallback .entry-content > .ifpc-fallback-shell { margin-top: 18px; margin-bottom: 34px; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-card { padding: 28px; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    color: var(--ifpc-text) !important;
    font-size: 14px !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form > h3 {
    margin: 0 0 10px !important;
    color: var(--ifpc-text) !important;
    font-size: 18px !important;
    font-weight: 850 !important;
    letter-spacing: -.02em;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form > p,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form > table,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form > ul { margin-left: 0 !important; margin-right: 0 !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    margin: 14px 0 18px !important;
    border: 1px solid var(--ifpc-line) !important;
    border-radius: 16px !important;
    background: #fff !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form table th,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form table td {
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid #eef0f5 !important;
    background: #fff !important;
    color: #34394a !important;
    font-size: 12px !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form table thead th {
    background: #f8f9fc !important;
    color: #707789 !important;
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form table tr:last-child th,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form table tr:last-child td { border-bottom: 0 !important; }
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-payment-list {
    margin: 16px 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-payment-list > li {
    padding: 16px !important;
    border: 1px solid #e2e6ef !important;
    border-radius: 16px !important;
    background: #fbfcfe !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-pix-brand-image,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) img[src*="pix-banco-central"],
body:is(.ifpc-premium-checkout,.woocommerce-checkout) img[alt*="Pix Banco Central" i] {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 150px !important;
    max-height: 64px !important;
    margin: 10px 0 14px !important;
    object-fit: contain !important;
}
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form #place_order,
body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-checkout-form button[name="woocommerce_checkout_place_order"] {
    width: 100% !important;
    min-height: 56px !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: linear-gradient(135deg, var(--ifpc-primary), var(--ifpc-primary-2)) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    box-shadow: 0 14px 30px rgba(225,61,127,.24) !important;
}
@media (max-width: 760px) {
    body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-fallback-shell { width: min(100% - 18px, 680px); }
    body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-legacy-card { padding: 16px; }
    body:is(.ifpc-premium-checkout,.woocommerce-checkout) .ifpc-fallback-hero { grid-template-columns: 1fr; padding: 22px 18px; border-radius: 20px; }
}


/* ===== 1.2.0: conflito Gecko/Yasaf + métodos de pagamento + alinhamento ===== */

/* O bloco institucional agora vem DEPOIS do checkout. */
.ifpc-post-checkout-trust {
    margin-top: 22px;
}
.ifpc-post-checkout-trust .ifpc-checkout-header {
    margin-top: 0;
}
.ifpc-post-checkout-trust .ifpc-progress {
    margin-bottom: 0;
}

/* O checkout legado do Gecko traz #order_review_heading/#order_review com float/width
   e o Yasaf Modal Checkout pode tentar aplicar grid em paralelo. Aqui o Premium Checkout
   assume integralmente o layout e deixa Finalizar + Sua compra no mesmo eixo. */
body.ifpc-premium-checkout .ifpc-legacy-checkout-form,
body.ifpc-premium-checkout form.checkout.woocommerce-checkout.ifpc-legacy-checkout-form {
    display: block !important;
    grid-template-columns: none !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
}

body.ifpc-premium-checkout .ifpc-legacy-checkout-form > h3,
body.ifpc-premium-checkout .ifpc-legacy-checkout-form #order_review_heading {
    float: none !important;
    clear: both !important;
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    text-align: left !important;
    color: var(--ifpc-text) !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
    font-weight: 850 !important;
    letter-spacing: -.02em !important;
}
body.ifpc-premium-checkout .ifpc-legacy-checkout-form #order_review_heading {
    margin-top: 22px !important;
}
body.ifpc-premium-checkout .ifpc-legacy-checkout-form > h3::before,
body.ifpc-premium-checkout .ifpc-legacy-checkout-form #order_review_heading::before {
    display: none !important;
    content: none !important;
}

body.ifpc-premium-checkout .ifpc-legacy-checkout-form #order_review,
body.ifpc-premium-checkout .ifpc-legacy-checkout-form #customer_details,
body.ifpc-premium-checkout .ifpc-legacy-checkout-form .col2-set,
body.ifpc-premium-checkout .ifpc-legacy-checkout-form .col-1,
body.ifpc-premium-checkout .ifpc-legacy-checkout-form .col-2 {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Blindagem dos gateways: o HTML do Mercado Pago está no DOM e o SDK cria os iframes,
   então nenhuma regra antiga pode esconder o <li> ou o label do cartão. */
body.ifpc-premium-checkout #payment,
body.ifpc-premium-checkout #payment ul.payment_methods {
    overflow: visible !important;
    max-height: none !important;
}
body.ifpc-premium-checkout #payment ul.payment_methods > li.wc_payment_method,
body.ifpc-premium-checkout #payment .wc_payment_method.ifpc-payment-visible,
body.ifpc-premium-checkout #payment .payment_method_woo-mercado-pago-custom {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}
body.ifpc-premium-checkout #payment ul.payment_methods > li.wc_payment_method > label,
body.ifpc-premium-checkout #payment .payment_method_woo-mercado-pago-custom > label {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center !important;
    width: 100% !important;
    min-height: 48px !important;
    color: #333848 !important;
}

/* O radio é a fonte da verdade para a caixa do método. Isso evita estados em que outro
   plugin deixa a caixa selecionada escondida ou a caixa não selecionada aberta. */
body.ifpc-premium-checkout #payment .wc_payment_method > input.input-radio:not(:checked) ~ .payment_box {
    display: none !important;
}
body.ifpc-premium-checkout #payment .wc_payment_method > input.input-radio:checked ~ .payment_box {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Mercado Pago: preserva as classes mp-hidden/mp-display-none do próprio SDK; quando o root
   já estiver montado, deixa o formulário ocupar a largura disponível. */
body.ifpc-premium-checkout #payment .payment_method_woo-mercado-pago-custom #mp-checkout-custom-root:not(.mp-hidden):not(.mp-display-none),
body.ifpc-premium-checkout #payment .payment_method_woo-mercado-pago-custom .mp-checkout-container:not(.mp-hidden):not(.mp-display-none) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
}
body.ifpc-premium-checkout #payment .payment_method_woo-mercado-pago-custom iframe {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
}

@media (max-width: 760px) {
    .ifpc-post-checkout-trust { margin-top: 14px; }
    body.ifpc-premium-checkout .ifpc-legacy-checkout-form #order_review_heading { margin-top: 18px !important; }
}


/* ===== 1.4.0: Mercado Pago no checkout DIRETO ===== */
/* Mantemos ymc-native-checkout para aproveitar a inicialização do Mercado Pago do modal,
   mas o layout continua 100% sob controle do Premium Checkout. */
body.ifpc-premium-checkout.ymc-native-checkout form.checkout,
body.ifpc-premium-checkout.ymc-native-checkout form.woocommerce-checkout,
body.ifpc-premium-checkout.ymc-native-checkout .ifpc-legacy-checkout-form {
    display: block !important;
    grid-template-columns: none !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    column-gap: 0 !important;
    row-gap: 0 !important;
}
body.ifpc-premium-checkout.ymc-native-checkout #order_review_heading,
body.ifpc-premium-checkout.ymc-native-checkout #order_review,
body.ifpc-premium-checkout.ymc-native-checkout #customer_details {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: none !important;
    grid-column: auto !important;
    grid-row: auto !important;
}

/* Reverte qualquer regra global/customizada que esconda o cartão no checkout tradicional. */
body.ifpc-premium-checkout #payment li.payment_method_woo-mercado-pago-custom,
body.ifpc-premium-checkout.ymc-native-checkout #payment li.payment_method_woo-mercado-pago-custom,
html body.ifpc-premium-checkout #payment ul.payment_methods > li.payment_method_woo-mercado-pago-custom {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    inset: auto !important;
    float: none !important;
    clear: both !important;
    width: 100% !important;
    height: auto !important;
    min-height: 48px !important;
    max-height: none !important;
    overflow: visible !important;
    transform: none !important;
    translate: none !important;
    clip: auto !important;
    clip-path: none !important;
    pointer-events: auto !important;
}
body.ifpc-premium-checkout #payment li.payment_method_woo-mercado-pago-custom > label,
body.ifpc-premium-checkout.ymc-native-checkout #payment li.payment_method_woo-mercado-pago-custom > label {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    min-height: 48px !important;
    transform: none !important;
    clip: auto !important;
    clip-path: none !important;
    pointer-events: auto !important;
}

/* 1.5.0 — checkout legado: evita flash do segundo botão/privacidade antes da limpeza JS. */
body.ifpc-premium-checkout form.checkout .ifpc-stale-place-order-holder,
body.ifpc-premium-checkout .woocommerce-privacy-policy-text,
body.ifpc-premium-checkout .gc-footer {
    display: none !important;
}


/* ===== 1.6.1: Nome obrigatório + aceite explícito dos termos ===== */
body.ifpc-premium-checkout #billing_email_field,
body.ifpc-premium-checkout #billing_first_name_field,
body.ifpc-premium-checkout .ifpc-field-email,
body.ifpc-premium-checkout .ifpc-field-name {
    float: none !important;
    clear: both !important;
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 14px !important;
}
body.ifpc-premium-checkout #billing_first_name_field label,
body.ifpc-premium-checkout #billing_email_field label {
    display: block !important;
}
body.ifpc-premium-checkout #billing_first_name,
body.ifpc-premium-checkout #billing_email {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
}

body.ifpc-premium-checkout .ifpc-terms-box {
    display: block !important;
    width: 100% !important;
    margin: 12px 0 14px !important;
    padding: 12px 13px !important;
    border: 1px solid #e3e6ee !important;
    border-radius: 12px !important;
    background: #fafbfe !important;
    box-sizing: border-box !important;
}
body.ifpc-premium-checkout .ifpc-terms-label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 9px !important;
    margin: 0 !important;
    color: #50586b !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    font-weight: 650 !important;
    cursor: pointer !important;
}
body.ifpc-premium-checkout .ifpc-terms-checkbox {
    flex: 0 0 auto !important;
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    margin: 0 !important;
    accent-color: var(--ifpc-primary) !important;
}
body.ifpc-premium-checkout .ifpc-terms-label span {
    display: inline !important;
}
body.ifpc-premium-checkout .ifpc-terms-label a {
    color: #7045d2 !important;
    font-weight: 800 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
}


/* 1.6.1 — força a caixa exclusiva de termos a permanecer visível no checkout direto. */
body.ifpc-premium-checkout [data-ifpc-terms-box='1'],
body.ifpc-premium-checkout .ifpc-terms-box {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}
body.ifpc-premium-checkout #ifpc_terms_accept.ifpc-terms-checkbox {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    pointer-events: auto !important;
}

/* 1.7.0 — country selector drives payment availability. */
body.ifpc-premium-checkout #billing_country_field,
body.ifpc-premium-checkout .ifpc-field-country {
    float: none !important;
    clear: both !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 14px !important;
}
body.ifpc-premium-checkout #billing_country,
body.ifpc-premium-checkout .ifpc-field-country select {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
}
