/* --- RESET E ESTRUTURA BLINDADA --- */

.hass-checkout-clean {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1000px;
    margin: 40px auto;
    color: #333;
    justify-content: center;
    background: transparent !important;
}

.hass-checkout-clean * {
    box-sizing: border-box !important;
}

/* LAYOUT COLUNAS */
.hass-sidebar {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    order: 1;
}

.hass-main-form {
    flex: 1.5;
    min-width: 300px;
    background: #fff !important;
    padding: 25px !important;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    order: 2;
}

/* RESPONSIVO MOBILE */
@media (max-width: 900px) {
    .hass-checkout-clean { flex-direction: column !important; }
    .hass-sidebar { width: 100% !important; max-width: 100% !important; margin-bottom: 20px; }
    .hass-main-form { width: 100% !important; order: 2; }
}

/* SIDEBAR: SEU PEDIDO */
.hass-order-summary {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 8px;
    padding: 25px !important;
}

.hass-order-summary h3 {
    margin-top: 0;
    font-size: 18px !important;
    color: #333 !important;
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 20px;
    text-align: left !important;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.prod-img {
    width: 60px;
    height: 60px;
    background: #e2e6ea;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #6c757d;
}

.prod-img .dashicons { font-size: 30px; width: 30px; height: 30px; }
.prod-details { flex-grow: 1; text-align: left; }
.prod-name { display: block; font-weight: 700 !important; font-size: 15px !important; color: #212529; }
.prod-desc { display: block; font-size: 13px !important; color: #6c757d; }
.prod-price { font-weight: 700 !important; color: #333; font-size: 16px; }
.divider { border: 0; border-top: 1px solid #dee2e6; margin: 20px 0; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: #495057; }
.total-row { display: flex; justify-content: space-between; font-size: 22px !important; font-weight: 800 !important; color: #212529 !important; margin-top: 15px; }
.trust-badges { text-align: center; margin-top: 25px; font-size: 12px; color: #868e96; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* FORMULÁRIO */
.hass-main-form h3 {
    font-size: 24px !important;
    margin-bottom: 30px !important;
    color: #212529 !important;
    text-align: left !important;
    font-weight: 700 !important;
}

.form-group { margin-bottom: 20px; width: 100%; }
.form-row { display: flex; gap: 20px; width: 100%; }
.half { width: 50% !important; flex: 1; }
.expiry-row { display: flex; gap: 10px; align-items: center; }

label {
    display: block !important;
    margin-bottom: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #495057 !important;
    text-align: left !important;
}

/* INPUTS E TEXTAREA */
input.clean-input, select.clean-input, textarea.clean-input {
    width: 100% !important;
    min-height: 45px !important;
    padding: 10px 15px !important;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    font-size: 15px !important;
    background: #fff !important;
    color: #495057 !important;
    box-shadow: none !important;
    outline: none !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

textarea.clean-input {
    resize: vertical;
    font-family: inherit !important;
}

input.clean-input:focus, select.clean-input:focus, textarea.clean-input:focus {
    border-color: #00c853 !important;
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.15) !important;
}

.form-divider {
    font-size: 13px;
    color: #adb5bd;
    border-bottom: 1px solid #eee;
    margin: 30px 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    text-align: left;
}

/* SELETOR DE PAGAMENTO */
.payment-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.pay-tab {
    flex: 1;
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    padding: 15px !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-weight: 600 !important;
    color: #495057 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    font-size: 14px !important;
    box-shadow: none !important;
}

.pay-tab:hover { background: #f8f9fa !important; border-color: #ced4da !important; }
.pay-tab.active {
    border-color: #00c853 !important;
    color: #00c853 !important;
    background: rgba(0, 200, 83, 0.04) !important;
    box-shadow: 0 2px 5px rgba(0, 200, 83, 0.1) !important;
}

.pay-tab .dashicons { font-size: 20px; width: 20px; height: 20px; margin: 0; }

.payment-body {
    display: none;
}

.payment-body.active {
    display: block;
}

.info-alert {
    background: #e8f5e9 !important;
    border: 1px solid #c8e6c9 !important;
    color: #1b5e20 !important;
    padding: 15px !important;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
}

.info-alert.gray { background: #f8f9fa !important; border-color: #dee2e6 !important; color: #6c757d !important; }

/* BOTÃO VERDE */
button#btn-comprar {
    width: 100% !important;
    background: #00c853 !important;
    color: #fff !important;
    border: none !important;
    padding: 18px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    border-radius: 6px !important;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 200, 83, 0.3) !important;
    transition: transform 0.2s, background 0.2s;
}

button#btn-comprar:hover {
    background: #00e676 !important;
    transform: translateY(-2px);
}

button#btn-comprar:disabled {
    background: #ced4da !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none !important;
}

.footer-secure { text-align: center; margin-top: 15px; font-size: 12px; color: #adb5bd; }

/* RESULTADO DO PAGAMENTO - QR CODE PIX */
#hass-response {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    margin-top: 30px;
}

#hass-response h3 {
    margin-top: 0;
    font-size: 24px;
    color: #00c853;
}

#hass-response img {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
    animation: fadeInScale 0.5s ease-in-out;
}

#hass-response textarea {
    font-family: 'Courier New', monospace;
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 5px;
    resize: none;
}

#hass-response textarea:focus {
    outline: 2px solid #00c853;
    background: #f0fdf4;
}

#hass-response button {
    background: #00c853;
    color: #fff;
    border: none;
    padding: 15px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

#hass-response button:hover {
    background: #00e676;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 200, 83, 0.3);
}

/* Animação do QR Code */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.clean-result {
    margin-top: 25px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* OPÇÕES DE FRETE (ESPAÇAMENTO CORRIGIDO) */
#shipping-options {
    margin-top: 15px;
    margin-bottom: 20px;
}

.shipping-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 15px;
}

.shipping-option:hover {
    background: #f9fafb;
    border-color: #bbb;
}

.shipping-option input[type="radio"] {
    margin: 0;
    margin-right: 12px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.shipping-option > div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.shipping-option span {
    display: inline-block;
}

.shipping-option strong {
    font-size: 14px;
    color: #212529;
}

.shipping-option .price-tag {
    margin-left: auto;
    padding-left: 20px;
    font-weight: 700;
    font-size: 15px;
    color: #333;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsivo para frete */
@media (max-width: 500px) {
    .shipping-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .shipping-option .price-tag {
        margin-left: 30px;
        padding-left: 0;
    }
}
