* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    margin: 0;
    background: #f5f6f8;
    color: #1f2937;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

/* HEADER */
.topbar {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

.logo {
    font-weight: 700;
    font-size: 24px;
    color: #111827;
}

.trust {
    font-size: 14px;
    color: #15803d;
    font-weight: 600;
}

/* CHECKOUT CONTAINER */
.checkout-container {
    display: grid;
    grid-template-columns: 1.65fr 1fr;
    gap: 40px;
    margin: 40px auto;
}

/* FORMULÁRIO */
.form-section {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}

.checkout-header {
    text-align: center;
    margin-bottom: 30px;
}

.step {
    background: #22c55e;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
}

.checkout-header h1 {
    font-size: 28px;
    margin-bottom: 6px;
}

.checkout-header p {
    color: #16a34a;
    font-weight: 600;
}

h2 {
    margin: 30px 0 12px;
    font-size: 20px;
    color: #111827;
}

.input-group {
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #555;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* QUANTIDADE */
.quantity-box {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 30px;
}

.qty-option {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.qty-option input {
    position: absolute;
    opacity: 0;
}

.qty-option:hover {
    border-color: #86efac;
}

/* 🔥 ESTA É A PARTE IMPORTANTE */
.qty-option input:checked + span {
    display: block;
}

.qty-option:has(input:checked) {
    border-color: #22c55e;
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(34,197,94,0.15);
}

.popular {
    border-color: #16a34a;
    position: relative;
}

.popular-badge {
    position: absolute;
    top: -10px;
    right: 12px;
    background: #f59e0b;
    color: white;
    font-size: 10px;
    padding: 2px 10px;
    border-radius: 20px;
    font-weight: bold;
}

.save {
    color: #16a34a;
    font-weight: bold;
}

/* PIX */
.payment-box {
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    margin-bottom: 20px;
}

.pix-line {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.pix-line i {
    color: #16a34a;
}

/* BOTÃO */
button {
    width: 100%;
    background: #22c55e;
    color: white;
    padding: 18px;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

button:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

/* RESUMO PRODUTO */
.produto-section {
    position: relative;
}

.product-card {
    background: white;
    padding: 28px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    position: sticky;
    top: 30px;
    text-align: center;
}

.product-card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 16px;
}

.price .old {
    text-decoration: line-through;
    color: #999;
    font-size: 15px;
}

.current {
    font-size: 32px;
    font-weight: 700;
    color: #16a34a;
    display: block;
}

.benefits p {
    text-align: left;
    margin: 8px 0;
    font-size: 14px;
}

.total {
    margin: 24px 0;
    font-size: 20px;
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.guarantee-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: 10px;
    margin-top: 16px;
    font-size: 14px;
}

.stock-warning {
    margin-top: 16px;
    color: #dc2626;
    font-weight: bold;
}

/* SECURITY */
.security {
    text-align: center;
    font-size: 13px;
    color: #555;
    margin-top: 20px;
}

/* MOBILE */
@media(max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }
    .quantity-box {
        grid-template-columns: 1fr;
    }
}