/* ===========================================================
   Checkout GVNTRCK — Card styles
   =========================================================== */

.cgv-card {
    --cgv-primary: #131b2e;
    --cgv-accent: #006c49;
    --cgv-card-bg: #ffffff;
    --cgv-text: #191c1e;
    --cgv-muted: #45464d;
    --cgv-border: #c6c6cd;
    --cgv-input-bg: #f7f9fb;
    --cgv-summary-bg: #eceef0;
    --cgv-radius: 12px;
    --cgv-radius-sm: 8px;
    --cgv-shadow: 0 4px 15px rgba(19, 27, 46, 0.06);

    background: var(--cgv-card-bg);
    color: var(--cgv-text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    border: var(--cgv-border-width, 1px) solid var(--cgv-border);
    border-radius: var(--cgv-radius);
    box-shadow: var(--cgv-shadow);
    padding: 28px;
    max-width: var(--cgv-max-width, 480px);
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.cgv-card *,
.cgv-card *::before,
.cgv-card *::after {
    box-sizing: border-box;
}

.cgv-card .material-symbols-outlined,
.cgv-card .cgv-icon {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 22px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

.cgv-empty-warning,
.cgv-no-gateway {
    background: #fff3cd;
    color: #664d03;
    padding: 14px 16px;
    border-radius: var(--cgv-radius-sm);
    font-size: 14px;
}
.cgv-empty-warning p {
    margin: 0 0 12px;
}
.cgv-empty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: var(--cgv-radius-sm);
    background: var(--cgv-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}
.cgv-empty-button:hover,
.cgv-empty-button:focus {
    color: #fff;
    filter: brightness(1.06);
}
/* Sections */
.cgv-section {
    margin-bottom: 28px;
}
.cgv-section:last-of-type {
    margin-bottom: 16px;
}
.cgv-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.cgv-section-header .cgv-icon {
    color: var(--cgv-primary);
    font-size: 24px;
}
.cgv-section-title,
.cgv-card-title {
    font-family: 'Hanken Grotesk', 'Inter', sans-serif;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--cgv-primary);
    margin: 0;
}
.cgv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* Fields */
.cgv-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.cgv-field-full {
    grid-column: 1 / -1;
}
.cgv-field-half {
    grid-column: span 1;
}
.cgv-field-hidden {
    display: none !important;
}
.cgv-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--cgv-muted);
    margin-bottom: 6px;
}
.cgv-req {
    color: var(--cgv-accent);
    margin-left: 2px;
}
.cgv-input,
.cgv-card select.cgv-input,
.cgv-card .input-text,
.cgv-card .payment_box input[type="text"],
.cgv-card .payment_box input[type="tel"],
.cgv-card .payment_box input[type="email"],
.cgv-card .payment_box input[type="number"],
.cgv-card .payment_box input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    background: var(--cgv-input-bg);
    border: 1px solid var(--cgv-border);
    border-radius: var(--cgv-radius-sm);
    font-size: 15px;
    color: var(--cgv-text);
    font-family: inherit;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    outline: none;
}
.cgv-input::placeholder,
.cgv-card .payment_box input::placeholder {
    color: #9aa0a6;
}
.cgv-input:focus,
.cgv-card select.cgv-input:focus,
.cgv-card .payment_box input:focus {
    border-color: var(--cgv-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cgv-accent) 18%, transparent);
    background: #fff;
}

/* Payment tabs */
.cgv-tabs {
    display: flex;
    border: 1px solid var(--cgv-border);
    border-radius: var(--cgv-radius-sm);
    overflow: hidden;
    margin-bottom: 16px;
}
.cgv-tab {
    flex: 1 1 0;
    appearance: none;
    border: 0;
    background: #fff;
    color: var(--cgv-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 8px;
    cursor: pointer;
    border-right: 1px solid var(--cgv-border);
    transition: background-color .15s ease, color .15s ease, transform .1s ease;
}
.cgv-tab:last-child { border-right: 0; }
.cgv-tab:hover { background: #f2f4f6; }
.cgv-tab:active { transform: scale(.97); }
.cgv-tab.is-active {
    background: var(--cgv-primary);
    color: #fff;
}

/* Payment block (re-style standard WC structure).
 * Uses descendant selectors from .cgv-card so styles survive the AJAX
 * fragment replacement that WooCommerce performs on update_order_review. */
.cgv-card #payment {
    background: transparent;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
.cgv-card .wc_payment_methods {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    background: transparent;
    border: 0;
}
.cgv-card .wc_payment_method {
    list-style: none;
    margin: 0;
    padding: 0;
    background: transparent;
}
/* Hide native radio + label (tabs control selection visually). */
.cgv-card .wc_payment_method > input[type="radio"],
.cgv-card .wc_payment_method > label {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.cgv-card .payment_box {
    background: var(--cgv-input-bg);
    border: 1px solid var(--cgv-border);
    border-radius: var(--cgv-radius-sm);
    padding: 14px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--cgv-muted);
}
.cgv-card .payment_box p { margin: 0 0 10px; }
.cgv-card .payment_box p:last-child { margin-bottom: 0; }
.cgv-card .payment_box input,
.cgv-card .payment_box select {
    margin-top: 4px;
}
.cgv-card .payment_box label {
    font-size: 13px;
    color: var(--cgv-muted);
    display: block;
    margin-bottom: 4px;
}
.cgv-card .payment_box::before { display: none !important; }

/* Summary */
.cgv-summary {
    background: var(--cgv-summary-bg);
    border-radius: var(--cgv-radius-sm);
    padding: 14px 16px;
    margin: 18px 0;
}
.cgv-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: var(--cgv-muted);
}
.cgv-summary-row + .cgv-summary-row {
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--cgv-border);
}
.cgv-summary-total {
    color: var(--cgv-primary);
    font-weight: 600;
}
.cgv-summary-total strong {
    font-family: 'Hanken Grotesk', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--cgv-primary);
}
.cgv-summary .amount {
    color: inherit;
    font-weight: inherit;
}
.cgv-cart-items {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cgv-border);
}
.cgv-cart-item {
    display: grid;
    gap: 10px;
}
.cgv-cart-item + .cgv-cart-item {
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--cgv-border) 70%, transparent);
}
.cgv-cart-item-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}
.cgv-cart-item-name {
    color: var(--cgv-primary);
    font-weight: 600;
}
.cgv-cart-item-name a {
    color: inherit;
    text-decoration: none;
}
.cgv-cart-item-name a:hover {
    text-decoration: underline;
}
.cgv-cart-item-price {
    white-space: nowrap;
    color: var(--cgv-primary);
    font-weight: 700;
}
.cgv-cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.cgv-qty-control {
    display: inline-grid;
    grid-template-columns: 34px 48px 34px;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--cgv-border);
    border-radius: var(--cgv-radius-sm);
    background: #fff;
}
.cgv-qty-btn,
.cgv-coupon-apply,
.cgv-coupon-chip,
.cgv-remove-item {
    appearance: none;
    font: inherit;
    cursor: pointer;
}
.cgv-qty-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: #fff;
    color: var(--cgv-primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}
.cgv-qty-btn:hover {
    background: var(--cgv-input-bg);
}
.cgv-qty-input {
    width: 48px;
    height: 34px;
    border: 0;
    border-left: 1px solid var(--cgv-border);
    border-right: 1px solid var(--cgv-border);
    text-align: center;
    font: inherit;
    color: var(--cgv-text);
    background: #fff;
    -moz-appearance: textfield;
    appearance: textfield;
}
.cgv-qty-input::-webkit-outer-spin-button,
.cgv-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cgv-remove-item {
    border: 0;
    background: transparent;
    color: #93000a;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 0;
}
.cgv-remove-item:hover {
    text-decoration: underline;
}
.cgv-coupon {
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--cgv-border);
}
.cgv-coupon-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}
.cgv-coupon-apply {
    border: 0;
    border-radius: var(--cgv-radius-sm);
    padding: 0 14px;
    background: var(--cgv-primary);
    color: #fff;
    font-weight: 600;
}
.cgv-coupon-apply:hover {
    filter: brightness(1.06);
}
.cgv-applied-coupons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.cgv-coupon-chip {
    border: 1px solid var(--cgv-border);
    border-radius: 999px;
    background: #fff;
    color: var(--cgv-primary);
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 600;
}
.cgv-cart-feedback {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: var(--cgv-radius-sm);
    background: #fdecea;
    color: #93000a;
    border: 1px solid #f5c2c7;
    font-size: 14px;
}
.cgv-card.is-updating {
    opacity: .72;
    pointer-events: none;
}

/* Submit button */
.cgv-submit-wrap {
    margin-top: 4px;
}
.cgv-submit {
    width: 100%;
    background: var(--cgv-accent);
    color: #fff;
    border: 0;
    padding: 16px 18px;
    border-radius: var(--cgv-radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: filter .15s ease, transform .1s ease, box-shadow .15s ease;
    text-transform: none;
}
.cgv-submit:hover { filter: brightness(1.08); }
.cgv-submit:active { transform: scale(.985); }
.cgv-submit .cgv-icon { font-size: 20px; }

/* Pulse animation */
@keyframes cgv-pulse-glow {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cgv-accent) 45%, transparent); }
    70%  { box-shadow: 0 0 0 12px color-mix(in srgb, var(--cgv-accent) 0%, transparent); }
    100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--cgv-accent) 0%, transparent); }
}
.cgv-pulse .cgv-submit {
    animation: cgv-pulse-glow 2.2s infinite;
}

/* Trust badges */
.cgv-badges {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    margin-top: 22px;
    padding-top: 4px;
}
.cgv-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--cgv-muted);
    transition: color .15s ease;
    text-align: center;
    flex: 1;
}
.cgv-badge .cgv-icon {
    font-size: 22px;
}
.cgv-badge-text {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.cgv-badge:hover { color: var(--cgv-accent); }

/* Notices (WC may inject .woocommerce-error / -message) */
.cgv-card .woocommerce-NoticeGroup,
.cgv-card .woocommerce-error,
.cgv-card .woocommerce-message,
.cgv-card .woocommerce-info {
    list-style: none;
    margin: 0 0 14px;
    padding: 12px 14px 12px 44px;
    border-radius: var(--cgv-radius-sm);
    font-size: 14px;
    border: 1px solid transparent;
    position: relative;
}
.cgv-card .woocommerce-error::before,
.cgv-card .woocommerce-message::before,
.cgv-card .woocommerce-info::before {
    left: 16px;
    top: 14px;
}
.cgv-card .woocommerce-error {
    background: #fdecea;
    color: #93000a;
    border-color: #f5c2c7;
}
.cgv-card .woocommerce-message,
.cgv-card .woocommerce-info {
    background: #e7f5ed;
    color: #00513a;
    border-color: #b6e0c8;
}

/* Loading state — overlay added by wc-checkout.js */
.cgv-card .blockUI.blockOverlay {
    border-radius: var(--cgv-radius);
}

/* Responsive */
@media (max-width: 520px) {
    .cgv-card {
        padding: 20px;
        border-radius: 12px;
    }
    .cgv-section-title,
    .cgv-card-title { font-size: 18px; }
    .cgv-tab { font-size: 13px; padding: 11px 4px; }
    .cgv-summary-total strong { font-size: 20px; }
    .cgv-cart-item-main,
    .cgv-cart-item-actions,
    .cgv-coupon-row {
        grid-template-columns: 1fr;
        display: grid;
    }
    .cgv-cart-item-price {
        white-space: normal;
    }
    .cgv-badges { gap: 6px; }
    .cgv-badge-text { font-size: 9px; }
}

/* ===========================================================
   Split Layout (Duas Colunas)
   =========================================================== */
.cgv-split-left {
    display: flex;
    flex-direction: column;
    text-align: center;
}
.cgv-left-logo-wrap {
    margin-bottom: 15px;
}
.cgv-left-logo-wrap img,
.cgv-checkout-logo-img {
    width: var(--cgv-logo-width, auto);
    height: var(--cgv-logo-height, auto);
    max-height: var(--cgv-logo-max-height, 48px);
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.cgv-checkout-logo-text {
    font-family: 'Hanken Grotesk', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--cgv-primary);
    text-decoration: none;
    text-align: center;
    display: block;
}
.cgv-left-secure-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(19, 27, 46, 0.04);
    color: var(--cgv-muted);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    margin: 0 auto 25px;
    width: fit-content;
}
.cgv-left-secure-badge .cgv-icon {
    color: #00875a;
    font-size: 16px;
}
.cgv-left-product-image-wrap {
    max-width: 280px;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(19, 27, 46, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.cgv-left-product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cgv-left-product-name {
    font-family: 'Hanken Grotesk', 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--cgv-primary);
    margin: 0 auto 25px;
    text-align: center;
}
.cgv-left-summary-table {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
}
.cgv-left-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--cgv-muted);
    padding: 10px 0;
}
.cgv-left-summary-label {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cgv-left-summary-label .cgv-icon {
    font-size: 18px;
    color: var(--cgv-muted);
}
.cgv-left-summary-value {
    font-weight: 600;
    color: var(--cgv-primary);
}
.cgv-left-item-row {
    border-bottom: 1px solid var(--cgv-border);
    padding-bottom: 14px;
    margin-bottom: 6px;
}
.cgv-left-discount-row {
    color: #00875a;
    border-bottom: 1px solid var(--cgv-border);
    padding-bottom: 14px;
    margin-bottom: 6px;
}
.cgv-left-discount-value {
    color: #00875a;
}
.cgv-left-total-row {
    font-size: 16px;
    font-weight: 700;
    color: var(--cgv-primary);
    padding-top: 14px;
}
.cgv-left-total-row .cgv-left-summary-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}
.cgv-left-cart-total {
    font-family: 'Hanken Grotesk', 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--cgv-primary);
}

@media (min-width: 992px) {
    .cgv-card.cgv-layout-split {
        max-width: 1100px;
        padding: 0;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }
    .cgv-card.cgv-layout-split .cgv-split-container {
        display: grid;
        grid-template-columns: 1fr 1.15fr;
        gap: 50px;
        align-items: start;
    }
    .cgv-card.cgv-layout-split .cgv-split-left {
        position: sticky;
        top: 40px;
        padding: 20px;
    }
    .cgv-card.cgv-layout-split .cgv-split-right {
        background: var(--cgv-card-bg);
        border: var(--cgv-border-width, 1px) solid var(--cgv-border);
        border-radius: var(--cgv-radius);
        box-shadow: var(--cgv-shadow);
        padding: 28px;
    }
}

@media (max-width: 991px) {
    .cgv-split-container {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    .cgv-split-left {
        padding-bottom: 25px;
        border-bottom: 1px dashed var(--cgv-border);
        margin-bottom: 5px;
    }
}
