@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --accent: #A87C4F;
  --accent-hover: #8f684152;
  --accent-light: #f3ece2;
  --green: #2EB034;
  --green-light: #e6f7e7;
  --border: #e2ded6;
  --text: #241a0e;
  --text-soft: #6b5f4f;
  --text-muted: #a89c89;
  --error: #d32f2f;
  --bg-page: #faf8f5;
  --bg-card: #ffffff;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(30,20,10,0.06), 0 8px 24px -18px rgba(30,20,10,0.25);
  --max: 1100px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-page);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ---------- header ---------- */
.co-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.co-header-inner {
  max-width: 900px; margin: 0 auto; height: 58px;
  display: flex; align-items: center; justify-content: space-between;
}
.co-header .brand { font-weight: 800; font-size: 1.05rem; color: var(--accent); letter-spacing: -.01em; }
.co-header .secure {
  display: flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 600; color: var(--text-soft);
}
.co-header .secure svg { width: 15px; height: 15px; stroke: var(--green); fill: none; stroke-width: 2; }

/* ---------- layout ---------- */
.co-container { max-width: var(--max); margin: 26px auto; padding: 0 16px 60px; }

.stepper { display: flex; align-items: center; justify-content: center; gap: 0; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 7px; }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%; background: #e8e2d6; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700;
  transition: all .2s ease; flex-shrink: 0;
}
.step.active .step-dot { background: var(--accent); color: #fff; }
.step.done .step-dot { background: var(--green); color: #fff; }
.step-label { font-size: .76rem; font-weight: 600; color: var(--text-muted); }
.step.active .step-label { color: var(--text); }
.step.done .step-label { color: var(--green); }
.step-sep { width: 36px; height: 2px; background: #e8e2d6; margin: 0 8px; }
.step-sep.done { background: var(--green); }

.co-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.co-main { display: flex; flex-direction: column; gap: 16px; }
.co-sidebar { position: sticky; top: 20px; }

/* ---------- form card ---------- */
.co-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px 24px; }
.co-card-title { font-size: 1rem; font-weight: 800; margin-bottom: 20px; }

.form-step { display: none; flex-direction: column; gap: 14px; }
.form-step.active { display: flex; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { position: relative; }
.field label { display: block; font-size: .82rem; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.field label .req { color: var(--error); }
.field input, .field select {
  width: 100%; padding: 11px 0; background: transparent; border: none;
  border-bottom: 1.5px solid #d8d0c2; font-family: inherit; font-size: 1.02rem; font-weight: 500;
  color: var(--text); outline: none; transition: border-color .15s ease;
}
.field input::placeholder { color: #bbb; }
.field input:focus, .field select:focus { border-bottom-color: var(--accent); }
.field .cep-status { font-size: .72rem; margin-top: 4px; min-height: 1em; font-weight: 600; }
.field .cep-status.ok { color: var(--green); }
.field .err { display: block; font-size: .72rem; color: var(--error); margin-top: 4px; min-height: 1em; }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 16px 20px; border: none; border-radius: var(--radius); font-family: inherit;
  font-size: .92rem; font-weight: 800; text-transform: uppercase; letter-spacing: .5px;
  transition: all .2s ease;
}
.btn-primary { background: var(--accent); color: #fff; margin-top: 6px; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .55; cursor: default; }
.btn-ghost {
  background: transparent; color: var(--text-soft); border: 1px solid var(--border);
  text-transform: none; letter-spacing: 0; font-weight: 600; font-size: .84rem; margin-top: 8px;
}
.btn-ghost:hover { background: #f5f2ec; }

/* ---------- shipping ---------- */
.shipping-option {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); margin-bottom: 8px; cursor: pointer; transition: all .15s ease;
}
.shipping-option:hover { border-color: #c9bfa9; }
.shipping-option.selected { border-color: var(--accent); background: var(--accent-light); }
.shipping-radio {
  width: 19px; height: 19px; border-radius: 50%; border: 2px solid #ccc; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.shipping-option.selected .shipping-radio { border-color: var(--accent); }
.shipping-option.selected .shipping-radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.shipping-info { flex: 1; }
.shipping-name { font-size: .87rem; font-weight: 700; }
.shipping-time { font-size: .72rem; color: var(--text-muted); }
.shipping-price { font-size: .87rem; font-weight: 800; color: var(--green); }

/* ---------- order bump ---------- */
.order-bump-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer;
  transition: all .2s ease; background: #fff;
}
.order-bump-card:hover { border-color: #c9bfa9; }
.order-bump-card.selected { border-color: var(--green); background: var(--green-light); box-shadow: 0 0 0 1px var(--green); }
.order-bump-check {
  width: 22px; height: 22px; border-radius: 5px; border: 2px solid #ccc; background: #fff;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all .15s ease;
}
.order-bump-card.selected .order-bump-check { background: var(--green); border-color: var(--green); }
.order-bump-check::after {
  content: ''; display: none; width: 6px; height: 10px; border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg); margin-top: -2px;
}
.order-bump-card.selected .order-bump-check::after { display: block; }
.order-bump-img { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.order-bump-info { flex: 1; min-width: 0; }
.order-bump-name { font-size: .85rem; font-weight: 700; }
.order-bump-desc { font-size: .74rem; color: var(--text-soft); margin-top: 2px; }
.order-bump-price { font-size: .88rem; font-weight: 800; color: var(--green); white-space: nowrap; }

/* ---------- pix box ---------- */
.pix-box { border: 1.5px solid var(--green); border-radius: var(--radius); overflow: hidden; background: #f5fbf5; margin-top: 6px; }
.pix-box-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: #eef8ef; border-bottom: 1px solid #d9f0da; }
.pix-radio { width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pix-radio::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.pix-box-head strong { font-size: .92rem; font-weight: 800; }
.pix-box-head span { font-size: .78rem; color: var(--text-soft); }
.pix-lines { padding: 14px 16px; }
.pix-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: .84rem; color: var(--text-soft); }
.pix-row.total { border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px; font-weight: 800; font-size: 1.02rem; color: var(--text); }
.pix-row.total span:last-child { color: var(--green); }

/* ---------- order summary sidebar ---------- */
.summary-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 3px solid var(--accent); overflow: hidden; }
.summary-title { display: flex; align-items: center; gap: 8px; padding: 15px 18px; border-bottom: 1px solid #f0ece3; font-size: .88rem; font-weight: 800; }
.summary-title svg { width: 17px; height: 17px; stroke: var(--accent); fill: none; stroke-width: 2; }
.summary-toggle { display: none; width: 100%; align-items: center; justify-content: space-between; padding: 14px 18px; background: none; border: none; }
.summary-toggle-left { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 700; }
.summary-toggle-right { display: flex; align-items: center; gap: 6px; font-weight: 800; color: var(--accent); font-size: .92rem; }
.summary-body { padding: 14px 18px 16px; }

.summary-product { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid #f0ece3; }
.summary-product img { width: 56px; height: 56px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border); flex-shrink: 0; }
.summary-product-info { flex: 1; min-width: 0; }
.summary-product-name { font-size: .82rem; font-weight: 700; line-height: 1.3; }
.summary-product-qty { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.summary-product-price { font-size: .88rem; font-weight: 800; color: var(--accent); white-space: nowrap; }

.summary-totals-row { display: flex; justify-content: space-between; font-size: .82rem; padding: 4px 0; color: var(--text-soft); }
.summary-totals-row .green { color: var(--green); font-weight: 700; }
.summary-total { display: flex; justify-content: space-between; padding: 10px 0 2px; margin-top: 6px; border-top: 1px solid #f0ece3; font-weight: 800; font-size: 1rem; }
.summary-secure { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: .68rem; color: var(--text-muted); padding-top: 10px; }
.summary-secure svg { width: 12px; height: 12px; stroke: #bbb; fill: none; stroke-width: 2; }

/* ---------- pix payment page ---------- */
.pix-page-card { background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px 24px; text-align: center; max-width: 420px; margin: 0 auto; }
.pix-qr { width: 220px; height: 220px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.pix-qr img { width: 100%; height: 100%; object-fit: contain; }
.pix-code { width: 100%; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); font-size: .76rem; color: var(--text-soft); background: var(--bg-page); word-break: break-all; margin-bottom: 12px; resize: none; font-family: inherit; }
.pix-timer { font-weight: 800; font-size: 1.4rem; color: var(--accent); margin: 8px 0; }
.pix-status { font-size: .84rem; color: var(--text-soft); margin-bottom: 16px; }
.pix-status.is-paid { color: var(--green); font-weight: 700; }
.copy-feedback { font-size: .78rem; color: var(--green); font-weight: 600; margin-top: 8px; min-height: 1em; }

/* ---------- footer ---------- */
.co-footer { text-align: center; font-size: .72rem; color: var(--text-muted); padding: 20px 16px 40px; }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .co-grid { grid-template-columns: 1fr; }
  .co-sidebar { position: static; order: -1; margin-bottom: 6px; }
  .summary-title { display: none; }
  .summary-toggle { display: flex; }
  .summary-body { max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0; transition: max-height .3s ease, padding .3s ease; }
  .summary-body.open { max-height: 480px; padding: 14px 18px 16px; }
}
@media (max-width: 560px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .step-label { display: none; }
  .step-sep { width: 24px; }
  .co-card { padding: 20px 16px; }
}
