:root {
    --buy-gold: #d0a001;
    --buy-gold-dark: #b8860b;
    --buy-green: #1b5e20;
    --buy-green-bright: #2e7d32;
    --buy-ink: #1e293b;
    --buy-muted: #94a3b8;
    --buy-border: #e2e8f0;
    --buy-bg: #f1f5f9;
    --buy-white: #fff;
}

* { box-sizing: border-box; }

body.buy-page {
    margin: 0;
    min-height: 100vh;
    font-family: "Lexend", system-ui, sans-serif;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(46, 125, 50, .12), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(208, 160, 1, .1), transparent 50%),
        var(--buy-bg);
    color: var(--buy-ink);
}

.buy-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.buy-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    background: linear-gradient(135deg, #2e7d32, #1b5e20 60%, #0d3b1e);
    color: #fff;
}

.buy-top a {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
}

.buy-top img { height: 48px; width: auto; }

.buy-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 72rem;
    margin: 0 auto;
    padding: 1rem 1rem 7.5rem;
    flex: 1;
}

@media (min-width: 1024px) {
    .buy-layout {
        grid-template-columns: 2fr 3fr;
        gap: 1.25rem;
        padding: 1.5rem 1rem 2rem;
        align-items: start;
        margin-top: auto;
        margin-bottom: auto;
    }
    .buy-panel-side { display: block; }
    .buy-bottom-nav { display: none; }
    .buy-checkout-bar { position: static; inset: auto; padding: .75rem 0 0; }
}

.buy-panel {
    background: var(--buy-white);
    border-radius: .75rem;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
}

.buy-panel-side { display: none; padding: 1.25rem; }
.buy-panel-main { padding: 0; }
.buy-panel-main .buy-inner { padding: 1rem 1rem 1.25rem; }

.buy-how {
    background: var(--buy-gold);
    color: #fff;
    text-align: center;
    font-size: .85rem;
    padding: .55rem;
    font-weight: 600;
}

.buy-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}

.buy-head h1 {
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
}

.buy-dots { display: flex; gap: .35rem; align-items: center; }
.buy-dot {
    height: 8px;
    border-radius: 999px;
    background: #cbd5e1;
    width: 8px;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.buy-dot.is-active {
    width: 32px;
    background: var(--buy-gold);
    cursor: default;
}

.buy-carousel {
    position: relative;
    border-radius: .5rem;
    overflow: hidden;
    background: #f8fafc;
    aspect-ratio: 442 / 312;
    max-height: 340px;
}

@media (min-width: 1024px) {
    .buy-carousel { max-height: none; min-height: 275px; }
}

.buy-carousel img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none;
    background: #fff;
}
.buy-carousel img.is-active { display: block; }

.buy-section-title {
    margin: .75rem 0 .5rem;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
}

.buy-product {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    border: 1px solid var(--buy-border);
    border-radius: .5rem;
    padding: .65rem .75rem;
    background: #fff;
}

.buy-thumb {
    position: relative;
    flex-shrink: 0;
}

.buy-thumb img {
    max-height: 52px;
    width: auto;
    max-width: 72px;
    object-fit: contain;
    border-radius: .35rem;
}

.buy-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--buy-gold);
    color: #fff;
    font-size: 6pt;
    padding: 2px 8px;
    border-radius: 999px;
    border: 3px solid #f1f5f9;
    white-space: nowrap;
}

.buy-product-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    gap: .5rem;
}

.buy-price {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--buy-gold);
}
.buy-price-sub {
    display: block;
    font-size: .7rem;
    color: var(--buy-muted);
    margin-top: 2px;
}

.qty {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-shrink: 0;
}

.qty button {
    min-width: 44px;
    min-height: 44px;
    border-radius: .5rem;
    border: 1px solid var(--buy-border);
    background: #fff;
    color: var(--buy-gold);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}
.qty button.plus {
    background: var(--buy-gold);
    border-color: var(--buy-gold);
    color: #fff;
}
.qty button:disabled { opacity: .45; cursor: not-allowed; }
.qty span {
    min-width: 1.25rem;
    text-align: center;
    font-weight: 700;
}

.buy-checkout-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 4rem;
    z-index: 40;
    padding: .5rem 1rem;
    background: linear-gradient(180deg, transparent, rgba(241, 245, 249, .92) 30%, var(--buy-bg));
}

.buy-checkout-inner {
    max-width: 32rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: .75rem;
    border-radius: .5rem;
    padding: .6rem .75rem;
    background: #fff;
    border: 1px solid var(--buy-border);
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.summary-card-clear {
    justify-content: space-between;
}
.summary-text { min-width: 0; }
.summary-money {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: #1b5e20;
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
    line-height: 1;
}
.summary-card-clear .summary-badge {
    position: static;
}
.summary-card .label { margin: 0; font-size: .8rem; font-weight: 700; }
.summary-card .hint { margin: 0; font-size: .72rem; color: var(--buy-muted); }
.summary-total {
    margin-left: 0;
    font-size: 1.2rem;
    font-weight: 800;
    color: #14532d;
    white-space: nowrap;
}

.buy-actions { display: flex; gap: .5rem; }
.buy-actions button,
.buy-actions a.btn-gold,
.buy-actions a.btn-green {
    flex: 1;
    border: 0;
    border-radius: .5rem;
    padding: .85rem .5rem;
    font-weight: 700;
    font-size: .8rem;
    color: #fff;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: inherit;
}
.buy-actions .btn-gold { background: var(--buy-gold); }
.buy-actions .btn-green { background: var(--buy-green-bright); }
.buy-actions button:disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}
.buy-actions button:not(:disabled):hover,
.buy-actions a.btn-gold:hover,
.buy-actions a.btn-green:hover { filter: brightness(.96); }

.loja-side-bar {
    position: static;
    inset: auto;
    padding: .75rem 0 0;
    background: transparent;
    z-index: auto;
}

.buy-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4rem;
    background: #fff;
    border-radius: 1.25rem 1.25rem 0 0;
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .08);
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    padding: 0 .5rem;
}

.buy-bottom-nav a,
.buy-bottom-nav span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: #64748b;
    font-size: 9pt;
    height: 100%;
}
.buy-bottom-nav .is-active {
    color: var(--buy-gold);
    font-weight: 700;
}
.buy-bottom-nav svg { width: 22px; height: 22px; }

.buy-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--buy-muted);
}

.buy-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: rgba(15, 23, 42, .45);
    padding: 1rem;
}
.buy-modal.is-open { display: flex; }

@media (min-width: 768px) {
    .buy-modal { align-items: center; }
}

.buy-modal-card {
    width: 100%;
    max-width: 28rem;
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    max-height: 90vh;
    overflow: auto;
}

.buy-modal-card h2 {
    margin: 0 0 .25rem;
    font-size: 1.1rem;
}
.buy-modal-card .sub {
    margin: 0 0 1rem;
    font-size: .8rem;
    color: var(--buy-muted);
}

.buy-field { margin-bottom: .75rem; }
.buy-field label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    margin-bottom: .25rem;
}
.buy-field input {
    width: 100%;
    border: 1px solid var(--buy-border);
    border-radius: .5rem;
    padding: .7rem .75rem;
    font: inherit;
}
.buy-field input:focus {
    outline: 2px solid rgba(208, 160, 1, .35);
    border-color: var(--buy-gold);
}

.buy-modal-actions {
    display: flex;
    gap: .5rem;
    margin-top: 1rem;
}
.buy-modal-actions button {
    flex: 1;
    border: 0;
    border-radius: .5rem;
    padding: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.buy-modal-actions .cancel {
    background: #f1f5f9;
    color: #334155;
}
.buy-modal-actions .confirm {
    background: var(--buy-green-bright);
    color: #fff;
}

.buy-result {
    display: none;
    margin-top: 1rem;
    padding: .85rem;
    border-radius: .5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    font-size: .85rem;
}
.buy-result.is-visible { display: block; }
.buy-result .titulos {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .5rem 0;
}
.buy-result .titulos span {
    background: #fff;
    border: 1px solid #86efac;
    border-radius: .35rem;
    padding: .2rem .45rem;
    font-weight: 700;
    font-size: .75rem;
}
.buy-pix {
    margin-top: .5rem;
    padding: .65rem;
    background: #fff;
    border-radius: .4rem;
    word-break: break-all;
    font-family: ui-monospace, monospace;
    font-size: .8rem;
}
.buy-alert {
    display: none;
    margin-bottom: .75rem;
    padding: .65rem .75rem;
    border-radius: .5rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: .8rem;
}
.buy-alert.is-visible { display: block; }

.buy-meta {
    margin: 0 0 .75rem;
    font-size: .75rem;
    color: var(--buy-muted);
}

.is-hidden { display: none !important; }

#viewCart {
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.cart-body {
    flex: 1;
    padding: 1rem 1rem 8.5rem;
    max-width: 28rem;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 1024px) {
    .cart-body { padding-bottom: 1.25rem; }
    #viewCart .cart-footer {
        position: static;
        border-top: 2px solid var(--buy-border);
        border-radius: 0;
        box-shadow: none;
    }
    #viewShop .buy-checkout-bar { bottom: 0; }
}

.cart-back {
    border: 0;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0 0 .75rem;
}

.cart-item {
    background: #fff;
    border-radius: .75rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
    padding: 1rem 1rem 1rem 1rem;
    margin-bottom: 1rem;
}

.cart-item-top {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
}

.cart-item-info {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.cart-item-info img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: .25rem;
    flex-shrink: 0;
}

.cart-item-title {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    color: var(--buy-gold);
}

.cart-item-date {
    margin: 0;
    font-size: .7rem;
    color: var(--buy-muted);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}

.cart-item-total {
    margin: 0;
    font-size: .85rem;
    font-weight: 700;
    color: #0f172a;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: .65rem;
    border: 1px solid #e5e7eb;
    border-radius: .5rem;
    padding: .4rem .55rem;
}

.cart-qty button {
    width: 18px;
    height: 18px;
    border: 0;
    background: transparent;
    color: var(--buy-gold);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-qty span {
    font-size: .8rem;
    font-weight: 700;
    min-width: 1rem;
    text-align: center;
}

.cart-label {
    display: block;
    margin-bottom: .35rem;
    font-size: .8rem;
    font-weight: 600;
    color: #111827;
}

.cart-input {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: .5rem;
    padding: .85rem 1rem;
    font: inherit;
    font-size: .85rem;
    background: #f9fafb;
    color: #111827;
}

.cart-input:focus {
    outline: 2px solid rgba(208, 160, 1, .35);
    border-color: var(--buy-gold);
    background: #fff;
}

.cart-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 4rem;
    z-index: 45;
    background: #fff;
    padding: .85rem 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
}

.cart-terms {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .75rem;
    color: #94a3b8;
    cursor: pointer;
}

.cart-terms input {
    width: 1.15rem;
    height: 1.15rem;
    margin-top: 1px;
    accent-color: var(--buy-green-bright);
    flex-shrink: 0;
}

.cart-terms a {
    color: var(--buy-green-bright);
    text-decoration: underline;
}

.cart-pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cart-pay-hint {
    margin: 0;
    font-size: .75rem;
    color: #94a3b8;
}

.cart-pay-total {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.btn-pay {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    border: 0;
    border-radius: .4rem;
    padding: .8rem 1.75rem;
    font-weight: 700;
    font-size: .85rem;
    color: #fff;
    background: var(--buy-green-bright);
    cursor: pointer;
}

.btn-pay:disabled {
    background: #a0aec0;
    cursor: not-allowed;
}

.btn-pay:not(:disabled):hover {
    filter: brightness(.96);
}

body.is-cart #viewShop .buy-checkout-bar,
body.is-cart .buy-bottom-nav {
    /* bottom nav still visible on mobile */
}

@media (max-width: 1023px) {
    body.is-cart .buy-checkout-bar { display: none; }
}

/* Modal PIX (SweetAlert2) */
.pix-swal { border-radius: 1rem !important; padding: 1.25rem !important; }
.pix-modal-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    overflow: hidden;
}
.pix-modal-title {
    margin: 0;
    font-weight: 800;
    font-size: 1.25rem;
    color: #0f172a;
}
.pix-qr {
    width: 200px;
    height: 200px;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: .5rem;
    background: #fff;
}
.pix-actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    width: 100%;
}
.pix-emv-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 1rem;
    border-radius: 999px;
    font-size: .75rem;
    color: #334155;
    cursor: default;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}
.pix-copy-btn {
    background: #2e7d32;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 1rem;
    width: 100%;
    cursor: pointer;
    font-weight: 700;
    font-size: .875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}
.pix-copy-btn:hover { filter: brightness(.95); }
.pix-tips {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0 .5rem;
    margin-top: .5rem;
    width: 100%;
}
.pix-tip {
    display: flex;
    gap: .75rem;
    align-items: center;
    text-align: left;
}
.pix-tip svg { color: #d0a001; flex-shrink: 0; }
.pix-tip p { margin: 0; font-size: .75rem; color: #64748b; }
.pix-titulos { margin-top: .25rem; }
.pix-total { margin: 0; font-size: .85rem; color: #334155; }

/* Visualizador de cartelas — foco em código e dezenas */
.buy-modality {
    display: flex;
    gap: .5rem;
    margin-bottom: .85rem;
    flex-wrap: wrap;
}
.buy-mod-btn {
    flex: 1;
    min-width: 140px;
    padding: .8rem .9rem;
    border: 2px solid #c9a227;
    border-radius: 12px;
    background: #fff;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.buy-mod-btn.is-active {
    border-color: #1b5e20;
    background: #e8f5e9;
}
.buy-mod-btn strong { font-size: .95rem; color: #0f172a; }
.buy-mod-price { font-size: 1rem; color: #14532d; font-weight: 800; }
.buy-mod-desc { font-size: .75rem; font-weight: 500; color: #64748b; }

.buy-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1px solid var(--buy-border);
    border-radius: .75rem;
    margin-bottom: 1rem;
}

.buy-review-note { margin: 0 0 .65rem; }
.buy-status {
    margin: 0 0 .65rem;
    padding: .65rem .75rem;
    border-radius: .55rem;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.35;
}
.buy-status.is-loading { background: #eff6ff; color: #1d4ed8; }
.buy-status.is-ok { background: #ecfdf5; color: #047857; }
.buy-status.is-erro { background: #fef2f2; color: #b91c1c; }
.buy-status.is-info { background: #f8fafc; color: #334155; }

.buy-inner-review { padding-bottom: 7.5rem; }

.cartela-viewer {
    position: relative;
    border-radius: .75rem;
    overflow: hidden;
    background: #f1f5f0;
    border: 1px solid #d7e3d7;
    min-height: 0;
    padding: .65rem;
    display: flex;
    align-items: center;
}

.cartela-viewer-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #14532d;
    font-size: .9rem;
    font-weight: 700;
    background: rgba(241, 245, 240, .92);
    z-index: 2;
}

.cartela-slide-wrap {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
}

.cartela-card {
    flex: 0 0 min(88vw, 300px);
    scroll-snap-align: center;
    background: transparent;
    border-radius: .85rem;
    padding: 0;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border-color .15s;
}

.cartela-card.is-selected,
.cartela-card.is-active-slide {
    border-color: #1b5e20;
}

.cartela-online {
    border-radius: .7rem;
    overflow: hidden;
    background: #fff;
    color: #0f172a;
    padding: .85rem .9rem 1rem;
    border: 1px solid #e2e8e2;
}

.cartela-online-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .45rem;
}

.cartela-online-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
}

.cartela-online-idx {
    font-size: .68rem;
    font-weight: 700;
    color: #fff;
    background: #1b5e20;
    border-radius: 999px;
    padding: .15rem .5rem;
}

.cartela-code-block {
    margin-bottom: .7rem;
    padding: .55rem .65rem;
    border-radius: .55rem;
    background: #14532d;
    color: #fff;
}
.cartela-code-label {
    display: block;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .8;
    margin-bottom: .1rem;
}
.cartela-online-id {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .03em;
    margin: 0;
    color: #fff;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
}

.cartela-block-label {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: .4rem;
}

.cartela-online-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .4rem;
}

.cartela-num {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: .45rem;
    background: #f8faf8;
    border: 1px solid #c5d8c5;
    color: #14532d;
    font-weight: 800;
    font-size: .95rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cartela-card.is-tripla { flex: 0 0 min(92vw, 340px); }
.cartela-card.is-simples { flex: 0 0 min(88vw, 300px); }

.cartela-chances {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.cartela-chance {
    padding: .45rem .4rem .5rem;
    border-radius: .5rem;
    background: #f8faf8;
    border: 1px solid #e2e8e2;
}
.cartela-chance-lab {
    display: block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1b5e20;
    margin-bottom: .35rem;
}

.btn-alterar-card {
    display: block;
    width: 100%;
    margin-top: .75rem;
    border: 1.5px solid #1b5e20;
    border-radius: .5rem;
    background: #fff;
    color: #14532d;
    font-weight: 700;
    font-size: .82rem;
    padding: .7rem .75rem;
    cursor: pointer;
    font-family: inherit;
    min-height: 44px;
}
.btn-alterar-card:hover { background: #e8f5e9; }

.cartela-tripla-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: .35rem;
}

.cartela-mini {
    background: #f8faf8;
    border: 1px solid #e2e8e2;
    border-radius: .4rem;
    padding: .28rem .3rem .35rem;
}

.cartela-mini-lab {
    display: block;
    font-size: .55rem;
    font-weight: 800;
    letter-spacing: .04em;
    color: #1b5e20;
    margin-bottom: .15rem;
}

.cartela-mini-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: .15rem;
}

.cartela-mini-grid .cartela-num {
    font-size: .58rem;
    border-radius: .22rem;
    aspect-ratio: 1.15;
}

.comp-tripla {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .3rem;
}

.comp-mini-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .15rem;
}

.comp-mini-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: .25rem;
    font-size: .55rem;
    font-weight: 800;
    color: #14532d;
    padding: .12rem 0;
}

.cartela-toolbar {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .65rem;
}

.btn-alterar,
.btn-trocar {
    border: 1.5px solid #1b5e20;
    border-radius: .55rem;
    background: #fff;
    color: #14532d;
    font-weight: 700;
    font-size: .88rem;
    padding: .85rem 1rem;
    cursor: pointer;
    font-family: inherit;
    min-height: 48px;
}

.btn-alterar:hover:not(:disabled),
.btn-trocar:hover:not(:disabled) { background: #e8f5e9; }
.btn-alterar:disabled,
.btn-trocar:disabled {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
}

.cartela-hint {
    margin: 0;
    font-size: .78rem;
    color: #64748b;
    line-height: 1.4;
}

.cart-review-box {
    margin: .75rem 0 1rem;
    padding: .85rem .9rem;
    border-radius: .75rem;
    background: #fff;
    border: 1px solid var(--buy-border);
}
.cart-review-title {
    margin: 0 0 .55rem;
    font-size: .85rem;
    font-weight: 800;
    color: #0f172a;
}
.cart-review-list {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.cart-review-item {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    padding: .45rem .55rem;
    border-radius: .45rem;
    background: #f8faf8;
}
.cart-review-item strong {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    color: #14532d;
}
.cart-review-item span {
    font-size: .75rem;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}
.cart-lock-note {
    margin: .65rem 0 0;
    font-size: .75rem;
    color: #92400e;
    line-height: 1.4;
}

/* Comprovante pós-compra */
.comp-wrap {
    text-align: left;
    color: #0f172a;
}

.comp-header { margin-bottom: .75rem; }
.comp-kicker {
    margin: 0;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}
.comp-title {
    margin: .2rem 0 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #14532d;
}

.comp-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: .75rem;
    padding: .65rem .85rem;
    margin-bottom: .85rem;
}

.comp-row {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .4rem 0;
    border-bottom: 1px solid #eef2f7;
    font-size: .8rem;
}
.comp-row:last-child { border-bottom: 0; }
.comp-row span { color: #64748b; }
.comp-row strong { color: #0f172a; text-align: right; }
.comp-row-total strong { color: #14532d; font-size: .95rem; }

.comp-section { margin-bottom: .85rem; }
.comp-section-title {
    margin: 0 0 .5rem;
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
}

.comp-titulos {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    max-height: 220px;
    overflow-y: auto;
}

.comp-titulo {
    border: 1px solid #e2e8f0;
    border-radius: .65rem;
    padding: .55rem .65rem;
    background: #fff;
}

.comp-titulo-id {
    font-weight: 800;
    font-size: .85rem;
    color: #14532d;
    margin-bottom: .4rem;
}

.comp-chances {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.comp-chance span {
    display: block;
    font-size: .68rem;
    font-weight: 800;
    color: #14532d;
    margin-bottom: .2rem;
}

.comp-titulo-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .25rem;
}

.comp-titulo-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    border-radius: .3rem;
    font-size: .65rem;
    font-weight: 800;
    color: #14532d;
    padding: .2rem 0;
}

.comp-tip {
    margin: .55rem 0 0;
    font-size: .72rem;
    color: #64748b;
    line-height: 1.4;
}

.comp-swal .pix-qr { margin: 0 auto .5rem; }

@media (min-width: 480px) {
    .cartela-card { flex-basis: min(55vw, 300px); }
}

@media (min-width: 768px) {
    .cartela-card { flex: 0 0 300px; }
    .cartela-online-id { font-size: 1.5rem; }
    .cartela-num { font-size: 1.05rem; }
    .buy-inner-review { padding-bottom: 1.5rem; }
}

@media (min-width: 1024px) {
    .cartela-viewer { min-height: 0; }
    .cartela-card { flex: 0 0 320px; }
}
