/* 
   ESTILOS DEDICADOS AO CHECKOUT
   ÁLBUM DA COPA 2026 - DESIGN PREMIUM
*/

:root {
    --primary-color: #25D366;
    --primary-hover: #1EAB52;
    --second-action: #FF6600;
    --second-action-hover: #E55B00;
    --text-main: #1A1A1A;
    --text-muted: #666666;
    --bg-light: #F4F3F8;
    --bg-white: #FFFFFF;
    --border-color: #E5E7EB;
    --error-color: #EF4444;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-premium: 0 10px 30px rgba(0,0,0,0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.urgency-bar {
    background: linear-gradient(90deg, #FF3300 0%, #FF6600 100%);
    color: #FFF;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container-urgency {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem; /* Ultra compacto */
    flex-wrap: wrap;
}

.timer-badge {
    background: rgba(0, 0, 0, 0.25);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace; /* Toque digital */
    font-size: 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
    min-width: 75px;
    display: inline-block;
}

@media (max-width: 480px) {
    .urgency-text { font-size: 0.8rem; }
    .timer-badge { font-size: 0.9rem; padding: 0.2rem 0.6rem; min-width: 60px; }
}

/* LAYOUT GRID */
.checkout-main {
    padding: 2rem 0 5rem;
}

.grid-checkout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: flex-start;
}

/* SEÇÕES GENÉRICAS */
.checkout-section {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-premium);
}

.section-title-sm {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.step-number {
    background: var(--second-action);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* FORMULÁRIOS */
.form-group {
    margin-bottom: 1.25rem;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--second-action);
    box-shadow: 0 0 0 4px rgba(255, 102, 0, 0.1);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.error-text {
    color: var(--error-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* FRETE */
.shipping-highlight {
    background: rgba(37, 211, 102, 0.1);
    border: 2px dashed var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.delivery-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
}

.delivery-icon img {
    height: 55px; /* Aumentado de 40px */
    width: auto;
}

.shipping-info {
    flex-grow: 1;
}

.shipping-info strong {
    display: block;
    color: var(--primary-hover);
    white-space: nowrap; /* Garante uma única linha */
    line-height: 1.1; /* Aproxima o subtitulo */
    margin-bottom: 2px;
}

.shipping-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.shipping-badge {
    background: var(--primary-color);
    color: white;
    font-weight: 900;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* COLUNA DIREITA: RESUMO */
.summary-box {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
    position: sticky;
    top: 5rem;
}

.product-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-image img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.product-price {
    margin-top: 0.5rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-right: 0.5rem;
}

.current-price {
    color: #10B981;
    font-weight: 800;
    font-size: 1.15rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.5rem 0;
}

/* QUANTIDADE */
.quantity-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.qty-controls button {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.qty-controls button:hover {
    background: #e5e7eb;
}

.qty-controls input {
    width: 40px;
    text-align: center;
    border: none;
    font-weight: 700;
}

/* ORDER BUMP */
.order-bump {
    background-color: #FFF9F5;
    border: 2px solid #FFE5D0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: pulseBorder 2s infinite;
}

@keyframes pulseBorder {
    0% { border-color: #FFE5D0; }
    50% { border-color: var(--second-action); }
    100% { border-color: #FFE5D0; }
}

.bump-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.bump-header input {
    width: 20px;
    height: 20px;
    accent-color: var(--second-action);
}

.bump-flex {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.bump-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #FFE5D0;
}

.bump-text {
    flex: 1;
}

.bump-content p {
    font-size: 0.85rem;
    line-height: 1.3;
}

.economy-tag {
    display: block;
    font-size: 0.75rem;
    color: #10B981;
    font-weight: 700;
    margin-top: 0.2rem;
}

/* TOTAL */
.order-total-area {
    margin-bottom: 1.5rem;
}

.total-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.total-line.final {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-main);
    margin-top: 1rem;
    border-top: 2px solid var(--border-color);
    padding-top: 0.5rem;
}

.free-text {
    color: var(--primary-color);
    font-weight: 700;
}

.installments-teaser {
    text-align: right;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* CTA */
.cta-button {
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 900;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.3);
    transition: transform 0.2s;
}

.cta-button.orange {
    background: linear-gradient(90deg, #FF3300 0%, #FF6600 100%);
}

.cta-button:hover {
    transform: scale(1.02);
}

/* BADGES */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 700;
}

.trust-item img {
    width: 24px;
    margin-bottom: 0.25rem;
}

/* TELA DE PAGAMENTO PIX */
#payment-view {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.checkout-main.is-paying .grid-checkout {
    display: block; /* Força coluna única para centralizar QR Code */
}

.payment-instructions p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.qr-code-container {
    background: #ffffff; /* Fundo branco puro para contraste */
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.5rem;
    margin: 0 auto 1.5rem;
    max-width: 280px; /* Aumentado para melhor leitura */
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#pix-qr-code {
    width: 100%;
    height: 100%;
    max-width: 250px;
    display: block;
    image-rendering: pixelated; /* Evita desfoque */
}

.pix-loader-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.copy-paste-area {
    text-align: left;
    margin-bottom: 1.5rem;
}

.copy-paste-area label {
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.copy-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.copy-input-wrapper input {
    flex: 1;
    padding: 0.75rem;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.85rem;
    background: #f3f4f6;
    color: var(--text-muted);
}

#btn-copy-pix {
    padding: 0 1rem;
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

#btn-copy-pix:hover {
    opacity: 0.8;
}

.payment-status-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #166534;
    font-weight: 700;
    font-size: 0.9rem;
}

.status-pulse {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    animation: statusPulse 1.5s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.pix-expiration {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
}

.btn-link:hover {
    color: var(--text-main);
}

/* ALERTA DE CPF */
.cpf-warning-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.6rem 0.85rem; /* Reduzido */
    margin-bottom: 1rem; /* Reduzido */
    display: flex;
    align-items: center; /* Centraliza verticalmente o ícone com o texto curto */
    gap: 0.5rem; /* Reduzido */
    text-align: left;
}

.cpf-warning-box svg {
    color: #d97706;
    flex-shrink: 0;
    width: 16px; /* Reduzido */
    height: 16px; /* Reduzido */
}

.cpf-warning-box p {
    margin: 0;
    font-size: 0.75rem; /* Reduzido */
    color: #92400e;
    line-height: 1.3;
}

.cpf-warning-box strong {
    color: #78350f;
}

/* LOGO TOPO PIX */
.pix-brand-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Ajuste mobile para a logo */
@media (max-width: 768px) {
    .pix-brand-header {
        margin-bottom: 0.75rem;
        margin-top: -0.5rem;
    }
    .pix-brand-header img {
        max-width: 120px;
    }
}

.pix-brand-header img {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.tutorial-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tutorial-step:last-child {
    margin-bottom: 0;
}

.step-icon {
    background: var(--text-main);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 900;
    flex-shrink: 0;
    margin-top: 2px;
}

.tutorial-step p {
    font-size: 0.85rem;
    color: var(--text-main);
}

.tutorial-step p strong {
    color: var(--second-action);
}

/* LOADER PARA CEP */
.loader-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--second-action);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 35px;
    top: 40px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay-parent {
    position: relative;
}

.footer-brand-logo {
    text-align: center;
    padding: 0.5rem 1rem 0; /* Espaço reduzido para aproximar da seção acima */
    opacity: 1; /* Removida transparência para deixar mais viva */
}

.footer-brand-logo img {
    max-width: 180px; /* Aumentado de 120px */
    height: auto;
}

/* FOOTER */
.checkout-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* RESPONSIVIDADE */
@media (max-width: 992px) {
    .grid-checkout {
        grid-template-columns: 1fr;
    }
    
    .checkout-main {
        padding-top: 1rem;
    }
    
    .summary-box {
        position: static;
        margin-bottom: 2rem;
    }
}
