:root {
    --green: #16853b;
    --green-dark: #0f6b2e;
    --ink: #202020;
    --muted: #6b6b6b;
    --line: #e4e4e4;
    --surface: #ffffff;
    --page: #f4f4f2;
    --warning: #fff4cf;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: "Poppins", Arial, sans-serif;
}

.topbar {
    background: #111;
    color: #fff;
    padding: 16px 20px;
}
.topbar-inner {
    width: min(100%, 920px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    text-decoration: none;
}
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.secure { color: #cfcfcf; font-size: 13px; }

.shell { width: min(94%, 920px); margin: 28px auto 48px; }
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}
.step {
    padding: 10px 8px;
    border-radius: 10px;
    background: #e5e5e5;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.step.active, .step.done { background: var(--green); color: #fff; }

.grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 20px; }
.card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
}
h1 { margin: 0 0 6px; font-size: clamp(24px, 5vw, 32px); }
h2 { margin: 0 0 16px; font-size: 20px; }
.subtitle { margin: 0 0 22px; color: var(--muted); }

.product { display: grid; grid-template-columns: 116px 1fr; gap: 18px; align-items: center; }
.product img { width: 116px; height: 116px; border-radius: 16px; object-fit: cover; }
.product h2 { margin-bottom: 6px; }
.price { color: var(--green); font-size: 23px; font-weight: 800; }
.free-shipping { display: inline-block; margin-top: 8px; color: var(--green); font-size: 13px; font-weight: 700; }

label { display: block; margin: 0 0 7px; font-size: 14px; font-weight: 700; }
input, select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    border: 1px solid #cfcfcf;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--green);
    outline: 3px solid rgba(22,133,59,.12);
}
.field { margin-bottom: 15px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-address { grid-template-columns: 2fr .65fr; }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    cursor: pointer;
}
.choice input { width: auto; min-height: 0; margin: 0; }
.choice span { font-size: 14px; font-weight: 600; }

.quantity { display: flex; align-items: center; gap: 9px; margin-top: 16px; }
.quantity label { margin: 0; }
.quantity input { width: 72px; min-height: 40px; text-align: center; }

.summary-line { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.summary-line:last-of-type { border-bottom: 0; }
.summary-total { font-size: 20px; font-weight: 800; }
.muted, small { color: var(--muted); }

.button {
    display: block;
    width: 100%;
    margin-top: 14px;
    padding: 14px 18px;
    border: 0;
    border-radius: 11px;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.button:hover { background: var(--green-dark); }
.button.secondary { background: #444; }
.button.link { background: transparent; color: #333; border: 1px solid #ccc; }

.notice { margin-top: 16px; padding: 12px; border-radius: 10px; background: #eef7f1; color: #155b2d; font-size: 13px; }
.error { padding: 12px; border-radius: 10px; background: #fde8e8; color: #9b1c1c; }
.center { text-align: center; }
.qr { display: block; width: 240px; max-width: 85%; height: auto; margin: 16px auto; }
.pix { min-height: 92px; resize: none; font-family: monospace; font-size: 12px; }
.status { margin: 18px 0 4px; padding: 12px; border-radius: 10px; background: var(--warning); color: #755900; }
.status.paid { background: #dff7e6; color: #12652c; }
.delivery-summary { margin-top: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.delivery-summary strong { display: block; margin-bottom: 4px; }

@media (max-width: 720px) {
    .grid { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .row, .row-address { grid-template-columns: 1fr; gap: 0; }
    .product { grid-template-columns: 88px 1fr; gap: 13px; }
    .product img { width: 88px; height: 88px; }
    .secure { display: none; }
}
