:root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --border: #e2e5ea;
    --text: #1f2328;
    --text-muted: #6b7280;
    --accent: #16a34a;
    --accent-hover: #15803d;
    --danger: #dc2626;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.wrapper { max-width: 640px; margin: 0 auto; min-height: 100vh; }

.topbar {
    width: 100%;
    border-bottom: 1px solid var(--border);
    background-color: var(--panel);
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-inner {
    max-width: 640px;
    margin: 0 auto;
    padding: 20px;
}
.brand { font-weight: 800; font-size: 20px; color: var(--text); text-decoration: none; }

.steps { display: flex; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.steps .active { color: var(--accent); font-weight: 700; }
.steps a { color: inherit; text-decoration: none; }
.steps a:hover { text-decoration: underline; }

.content { padding: 24px 20px 100px; }

h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.subtitle { color: var(--text-muted); margin-bottom: 24px; }

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 20px;
}

.product-card-border {
    border-radius: calc(var(--radius) + 1px);
    padding: 1px;
    background: linear-gradient(270deg, var(--accent), var(--accent-teal), var(--accent));
    background-size: 400% 400%;
    animation: neon-flow 6s ease infinite;
    margin-bottom: 20px;
}

@keyframes neon-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .product-card-border {
        animation: none;
    }
}

.product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--panel);
    border-radius: var(--radius);
}

.product-card .product-info {
    flex: 1;
    min-width: 0;
}

.product-card .product-photo {
    flex: 0 0 40%;
    border-radius: 8px;
    overflow: hidden;
}
.product-card .product-photo img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.product-info h3 { margin: 0 0 6px; font-size: 16px; }
.product-info p { margin: 0; color: var(--text-muted); font-size: 14px; }

.price-strike { text-decoration: line-through; color: var(--text-muted); margin-right: 6px; font-size: 14px; }
.price-offer { color: var(--danger); font-weight: 700; font-size: 18px; }
.price-normal { font-weight: 700; font-size: 18px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px; /* 16px+ evita zoom automático no iOS Safari ao focar o campo */
    font-family: inherit;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239A97AB' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.form-group select option {
    background: var(--panel);
    color: var(--text);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
.form-hint { color: var(--text-muted); font-size: 12px; margin-top: 4px; }

.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    border-radius: 8px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--panel); color: var(--text); border: 1px solid var(--border); }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }
.btn:disabled:hover { background: var(--accent); }

.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: -2px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .btn-spinner { animation: none; }
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.summary-line.total { font-weight: 800; font-size: 18px; border-bottom: none; padding-top: 16px; }

.alert { padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-error { background: rgba(248, 113, 113, 0.12); color: #FCA5A5; border: 1px solid rgba(248, 113, 113, 0.3); }
.alert-success { background: rgba(45, 212, 191, 0.12); color: #5EEAD4; border: 1px solid rgba(45, 212, 191, 0.3); }

.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }

/* Tooltip de aviso (ex: prazo de entrega estimado em frete.php) - ícone
   "!" com balão de texto que aparece no hover/foco. Usa o teclado
   (tabindex + :focus) pra funcionar em touch sem JS: toque foca o
   elemento no iOS/Android. */
.tooltip-wrap { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: help; }
.tooltip-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 16px; height: 16px; border-radius: 50%;
    background: rgba(248, 113, 113, 0.15); color: var(--danger);
    font-size: 11px; font-weight: 800; flex: none; border: 1px solid rgba(248, 113, 113, 0.4);
}
.tooltip-box {
    display: none;
    position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
    background: #F5F5F7; color: #15151F; font-size: 11px; line-height: 1.4;
    padding: 8px 10px; border-radius: 6px; width: 210px; z-index: 5;
    box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.tooltip-wrap:hover .tooltip-box, .tooltip-wrap:focus .tooltip-box { display: block; }

.confirmation-icon { font-size: 48px; text-align: center; margin-bottom: 16px; }

.hero { margin-bottom: 24px; }

.whatsapp-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 18px 20px;
    border-radius: var(--radius);
    border: none;
    background: #25D366;
    color: #ffffff;
    font-weight: 800;
    font-size: 17px;
    text-decoration: none;
    text-align: left;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
    animation: whatsapp-cta-pulse 2.2s ease-in-out infinite;
}
.whatsapp-cta:hover { background: #1ebe5a; }
.whatsapp-cta svg { flex-shrink: 0; }
.whatsapp-cta .whatsapp-cta-sub {
    display: block;
    font-weight: 500;
    font-size: 12.5px;
    opacity: 0.9;
    margin-top: 2px;
}
@keyframes whatsapp-cta-pulse {
    0%, 100% { box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35); }
    50% { box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6); }
}
@media (prefers-reduced-motion: reduce) {
    .whatsapp-cta { animation: none; }
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 900;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease;
}
.whatsapp-float:hover {
    transform: scale(1.08);
}
.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25D366;
    animation: whatsapp-pulse 12s ease-out infinite;
    z-index: -1;
}
@keyframes whatsapp-pulse {
    0% { transform: scale(1); opacity: 0; }
    2% { opacity: 0.6; }
    15% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float::before {
        animation: none;
        display: none;
    }
}
@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
}
.hero-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ---------- Promoções ---------- */
.promo-section {
    margin-bottom: 8px;
}
.promo-title {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--accent);
}

.promo-countdown-border {
    display: inline-block;
    border-radius: 10px;
    padding: 2px;
    background: linear-gradient(270deg, var(--accent), var(--accent-teal), var(--accent));
    background-size: 400% 400%;
    animation: neon-flow 3s ease infinite;
    margin-bottom: 16px;
}
.promo-countdown {
    display: block;
    background: var(--panel);
    color: var(--text);
    font-weight: 700;
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
}

.product-card-border-promo {
    animation: neon-flow 3s ease infinite, promo-pulse 1.2s ease-in-out infinite;
}

@keyframes promo-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
    50% {
        box-shadow: 0 0 22px 6px rgba(139, 92, 246, 0.85);
    }
}

@media (prefers-reduced-motion: reduce) {
    .product-card-border-promo {
        animation: none;
        box-shadow: 0 0 14px 2px rgba(139, 92, 246, 0.5);
    }
}

/* Mobile: telas estreitas (a grande maioria do tráfego) */
@media (max-width: 480px) {
    .topbar { padding: 16px; }
    .content { padding: 20px 16px 90px; }

    .steps {
        gap: 8px;
        font-size: 11px;
        flex-wrap: wrap;
    }

    .product-card {
        padding: 14px;
        gap: 12px;
    }

    .panel { padding: 18px; }

    h1 { font-size: 19px; }
    .price-offer, .price-normal { font-size: 16px !important; }
}

/* ---------- Página de pagamento (checkout transparente Asaas) ---------- */

.resumo-fixo {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.resumo-fixo-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.resumo-fixo-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 12px;
    min-width: 0;
}
.resumo-fixo-nome {
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resumo-fixo-total {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent);
    flex-shrink: 0;
}

.selos-confianca {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    margin-bottom: 20px;
}
.selo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--text-muted);
}
.selo-icone { font-size: 15px; }

.escolha-titulo {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 14px;
}

.metodos-pagamento {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}
.metodo-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    font-family: inherit;
}
.metodo-card:hover { border-color: rgba(139, 92, 246, 0.4); }
.metodo-card.ativo {
    border-color: var(--accent);
    background: rgba(139, 92, 246, 0.08);
}
.metodo-icone { font-size: 26px; }
.metodo-nome { font-weight: 700; font-size: 14px; color: var(--text); }
.metodo-sub { font-size: 11px; color: var(--text-muted); }
.metodo-badge {
    background: rgba(45, 212, 191, 0.15);
    color: var(--accent-teal);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    margin-top: 2px;
}

.metodo-explicacao {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 16px;
}
.metodo-explicacao p {
    margin: 0;
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

.bin-info {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--accent-teal);
    font-weight: 600;
}

.cvv-tranquilizador {
    font-size: 12px;
    color: var(--text-muted);
    margin: -6px 0 16px;
}

.campo-com-icone { position: relative; }
.campo-com-icone input { padding-left: 58px !important; }
.bandeira-icone {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    z-index: 1;
}
.bandeira-icone.visivel { opacity: 1; }
.bandeira-visa { background: #1A1F71; }
.bandeira-mastercard { background: linear-gradient(90deg, #EB001B 50%, #F79E1B 50%); }
.bandeira-amex { background: #2E77BC; }
.bandeira-elo { background: #FFCB05; color: #3A3A3A; }
.bandeira-hipercard { background: #B3131B; }
.bandeira-diners { background: #0079BE; font-size: 7.5px; }
.bandeira-discover { background: #FF6000; }

@media (max-width: 480px) {
    .metodo-icone { font-size: 22px; }
    .metodo-nome { font-size: 12.5px; }
    .selos-confianca { gap: 8px 14px; }
    .selo { font-size: 11px; }
}

