/* Make It Home OS — visual replicado do catálogo real (makeithome.com.br):
   creme + forest #514721 + bronze #D4A357, Playfair Display + Poppins */
:root {
  --bg: #fdfcfb;            /* cream */
  --bg-2: #f5f2ef;          /* sand */
  --sand-light: #faf8f6;
  --card: #ffffff;
  --card-soft: #faf7f2;
  --ink: #1f1d19;           /* charcoal */
  --ink-2: #5a5654;
  --line: #e8e4e1;
  --forest: #514721;
  --forest-dark: #443b17;
  --bronze: #d4a357;
  --bronze-dark: #a56b26;
  --bronze-light: #f5ede0;
  --price: #e5432e;
  --green: #2e7d32;
  --green-soft: #e8f5e9;
  --green-room: #4e7d49;
  --wa: #25d366;
  --red: #d32f2f;

  --shadow: 0 2px 12px rgba(3, 3, 1, .06);
  --shadow-hover: 0 8px 24px rgba(3, 3, 1, .12);
  --radius: 16px;
  --display: 'Playfair Display', Georgia, serif;
  --sans: 'Poppins', -apple-system, sans-serif;

  /* aliases usados pelo app */
  --gold: var(--bronze);
  --gold-2: var(--bronze-dark);
  --gold-soft: var(--bronze-light);
  --ink-inv: #ffffff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; min-height: 100vh; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 15px; color: var(--ink); }
a { color: var(--bronze-dark); text-decoration: none; }
::selection { background: var(--bronze); color: #fff; }

.topbar {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 3px solid var(--bronze); box-shadow: 0 1px 0 var(--line);
  padding: 10px 22px; display: flex; align-items: center; gap: 14px;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; }
.topbar .brand img { height: 48px; width: auto; }
.topbar .brand .tag { font-size: 10.5px; color: var(--ink-2); letter-spacing: .28em; text-transform: uppercase; padding-top: 4px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 12.5px; color: var(--ink-2); text-align: right; line-height: 1.35; }
.topbar .who b { color: var(--forest); font-weight: 600; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 34px 22px 140px; animation: fadein .3s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.center { text-align: center; }

h1.display, h2.display {
  font-family: var(--display); font-weight: 500; color: var(--forest); letter-spacing: -.5px; line-height: 1.15;
}
h1.display { font-size: clamp(32px, 5vw, 48px); }
h2.display { font-size: clamp(24px, 3.6vw, 32px); }
.eyebrow { font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; color: var(--bronze-dark); font-weight: 600; margin-bottom: 12px; }
.sub { color: var(--ink-2); font-size: 15px; max-width: 580px; margin: 10px auto 0; }
.sub b { color: var(--forest); font-weight: 600; }
.rule { width: 64px; height: 3px; background: var(--bronze); margin: 18px auto; border-radius: 3px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--forest); color: #fff;
  padding: 14px 28px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(81, 71, 33, .22);
}
.btn:hover { background: var(--forest-dark); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(81, 71, 33, .3); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--ink); border: 2px solid var(--line); box-shadow: none; }
.btn.ghost:hover { border-color: var(--forest); color: var(--forest); background: #fff; }
.btn.wa { background: var(--wa); box-shadow: 0 4px 14px rgba(37, 211, 102, .3); }
.btn.wa:hover { background: #1fb457; }
.btn.small { padding: 9px 18px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.field { margin-bottom: 15px; text-align: left; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #b3ada7; letter-spacing: .04em; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(212, 163, 87, .15); }

.notice {
  display: flex; gap: 14px; background: var(--bronze-light); border: 1px solid #eaddc4;
  border-radius: var(--radius); padding: 18px 20px; text-align: left; font-size: 13.5px; color: #6b5636;
}
.notice svg { flex: none; margin-top: 2px; color: var(--bronze-dark); }
.notice b { display: block; margin-bottom: 4px; letter-spacing: .14em; font-size: 11.5px; text-transform: uppercase; color: var(--bronze-dark); }

.grid { display: grid; gap: 18px; }
.grid.g2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ambientes (Sua Casa) — cards com selo verde como no site */
.room-card { text-align: center; padding: 30px 20px; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; cursor: pointer; border-width: 2px; }
.room-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--bronze); }
.room-card .icon-box { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; color: var(--forest); transition: background .2s, color .2s; }
.room-card h3 { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); }
.room-card .meta { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; }
.room-card:has(.badge.ok) { border-color: var(--green-room); }
.room-card:has(.badge.ok) .icon-box { background: var(--green-room); color: #fff; }
.room-card .del { position: absolute; top: 10px; right: 10px; color: #c5beb5; padding: 6px; border-radius: 8px; }
.room-card .del:hover { color: var(--red); background: #fdeeec; }
.room-card.add { border: 2px dashed #d8d2ca; background: transparent; box-shadow: none; color: var(--ink-2); display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 186px; }
.room-card.add:hover { color: var(--forest); border-color: var(--forest); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.zero { background: var(--bg-2); color: var(--ink-2); }
.badge.gold { background: var(--bronze-light); color: var(--bronze-dark); }

/* seleção de produtos */
.cat-tabs { display: flex; gap: 8px; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }
.cat-tab { padding: 9px 22px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: #fff; }
.cat-tab.active { background: var(--forest); border-color: var(--forest); color: #fff; }

.product { display: flex; flex-direction: column; padding: 0; overflow: hidden; background: var(--card-soft); border: 3px solid #fff; box-shadow: var(--shadow); }
.product:hover { box-shadow: var(--shadow-hover); }
.product .ph { height: 190px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--bronze); position: relative; overflow: hidden; }
.product .ph img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product .ph .qtytag { position: absolute; top: 10px; right: 10px; background: var(--forest); color: #fff; }
.product .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product h4 { font-size: 14px; font-weight: 700; line-height: 1.4; min-height: 40px; color: var(--ink); }
.product .price { font-size: 20px; font-weight: 700; color: var(--price); }
.product .price small { font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
.product .combo-name { font-size: 12px; color: var(--ink-2); line-height: 1.45; min-height: 17px; }
.vlabel { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); font-weight: 700; }
.variants { display: flex; flex-wrap: wrap; gap: 6px; max-height: 106px; overflow-y: auto; scrollbar-width: thin; }
.chip { padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 12.5px; font-weight: 600; background: #fff; color: var(--ink-2); }
.chip.active { border-color: var(--forest); background: var(--forest); color: #fff; }
.qtyrow { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.stepper button { width: 40px; height: 38px; font-size: 18px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.stepper button:hover { background: var(--bg-2); color: var(--forest); }
.stepper .qty { min-width: 34px; text-align: center; font-weight: 700; font-size: 15px; color: var(--forest); }
.saved-flash { font-size: 11.5px; color: var(--green); display: flex; align-items: center; gap: 5px; opacity: 0; transition: opacity .3s; font-weight: 600; }
.saved-flash.show { opacity: 1; }

/* barra fixa do pedido — como o rodapé do site real */
.orderbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(3, 3, 1, .06);
  padding: 13px 22px; display: flex; align-items: center; gap: 16px;
}
.orderbar .total { font-size: 19px; font-weight: 700; color: var(--forest); }
.orderbar .items { font-size: 12.5px; color: var(--ink-2); }
.orderbar .save-state { font-size: 11.5px; color: var(--green); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.orderbar .spacer { flex: 1; }
.orderbar .btn { padding: 11px 24px; }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); margin-bottom: 18px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); } .crumbs a:hover { color: var(--forest); }
.crumbs .sep { color: #cfc8bf; }
.crumbs b { color: var(--forest); font-weight: 600; }

/* progresso da categoria — barra forest como no site */
.progress { max-width: 480px; height: 5px; margin: 16px auto 6px; background: var(--line); border-radius: 5px; overflow: hidden; }
.progress .bar { height: 100%; background: var(--forest); border-radius: 5px; transition: width .4s ease; }

/* resumo */
.summary-room { margin-bottom: 26px; }
.summary-room h3 { font-family: var(--display); font-size: 23px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.sline { display: flex; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.sline .n { flex: 1; color: var(--ink); font-weight: 500; }
.sline .v { color: var(--ink-2); font-size: 12.5px; font-weight: 400; }
.sline .p { font-weight: 700; white-space: nowrap; color: var(--forest); }
.sline .rm { color: #c5beb5; padding: 4px 6px; border-radius: 6px; flex: none; }
.sline .rm:hover { color: var(--red); background: #fdeeec; }
.totalline { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 0; font-size: 17px; font-weight: 600; }
.totalline .amount { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--forest); }

/* pagamento */
.pay-opt { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.pay-opt .icon-box { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--bronze-light); color: var(--bronze-dark); display: flex; align-items: center; justify-content: center; }
.pay-opt h4 { font-size: 14.5px; margin-bottom: 3px; color: var(--ink); font-weight: 700; }
.pay-opt p { font-size: 13px; color: var(--ink-2); }
.pay-opt p b { color: var(--forest); }

/* whatsapp destaque na landing */
.wa-panel { background: linear-gradient(150deg, #14582e, #1f7a43); color: #eafff0; border-radius: var(--radius); padding: 28px; text-align: center; box-shadow: 0 14px 34px rgba(20, 90, 47, .22); }
.wa-panel h3 { font-family: var(--display); font-size: 26px; font-weight: 600; margin-bottom: 6px; }
.wa-panel p { font-size: 13.5px; color: #c4e8cf; max-width: 420px; margin: 0 auto 16px; }
.wa-panel .field input { background: rgba(255, 255, 255, .12); border-color: transparent; color: #fff; }
.wa-panel .field input::placeholder { color: #a9d3b6; }
.wa-panel .btn.wa { background: #fff; color: #17703a; box-shadow: 0 8px 22px rgba(0, 0, 0, .18); font-size: 15px; padding: 14px 30px; }
.wa-pulse { position: relative; }
.wa-pulse::after { content: ''; position: absolute; inset: -7px; border-radius: 999px; border: 2px solid rgba(37, 211, 102, .5); animation: pulse 1.8s ease-out infinite; pointer-events: none; }
@keyframes pulse { 0% { transform: scale(.94); opacity: .9; } 100% { transform: scale(1.18); opacity: 0; } }

.landing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: stretch; margin-top: 34px; }
@media (max-width: 860px) { .landing-grid { grid-template-columns: 1fr; } }

.muted { color: var(--ink-2); font-size: 13px; }
.mt1 { margin-top: 10px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 34px; }
.mb1 { margin-bottom: 10px; } .mb2 { margin-bottom: 20px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row .grow { flex: 1; }

.toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--forest); color: #fff; padding: 12px 24px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 99; box-shadow: 0 10px 26px rgba(3, 3, 1, .25);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--red); }

.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--ink-2); padding: 40px 0; font-size: 14px; }
.empty svg { color: #d8d2ca; }

/* fab whatsapp */
.fab-wa {
  position: fixed; right: 20px; bottom: 90px; z-index: 70; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .4);
}

/* ---------- fluxo: quiz, progresso, conclusão, checkout ---------- */
.hero-step { max-width: 640px; margin: 7vh auto 0; }
.icon-box.big { width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 22px; background: var(--bronze-light); display: flex; align-items: center; justify-content: center; color: var(--bronze-dark); }
.ok-pulse { background: var(--green-soft) !important; color: var(--green) !important; animation: okpulse 1.6s ease-out 1; }
@keyframes okpulse { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }

.quiz-row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--bg-2); }
.quiz-row:last-child { border-bottom: none; }
.quiz-row .qicon { color: var(--forest); display: flex; }
.quiz-row .qname { flex: 1; font-size: 15px; font-weight: 500; color: var(--ink); }

.choice { text-align: center; padding: 36px 26px; cursor: pointer; transition: transform .2s, border-color .2s, box-shadow .2s; border-width: 2px; }
.choice:hover { transform: translateY(-3px); border-color: var(--forest); box-shadow: var(--shadow-hover); }
.choice h3 { font-family: var(--display); font-size: 25px; font-weight: 600; margin: 14px 0 6px; color: var(--ink); }
.choice p { font-size: 13.5px; color: var(--ink-2); max-width: 300px; margin: 0 auto; }

.video-wrap { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.skeleton .ph { animation: shimmer 1.4s ease infinite; background: var(--bg-2); }
.skeleton .sk-line { height: 12px; border-radius: 6px; background: var(--bg-2); margin-bottom: 10px; animation: shimmer 1.4s ease infinite; }
.skeleton .sk-line.w60 { width: 60%; }
@keyframes shimmer { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

/* ================= admin ================= */
.admin-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0; }
.admin-nav button { padding: 10px 20px; border-radius: 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.admin-nav button.active { background: var(--forest); color: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); padding: 10px 12px; border-bottom: 2px solid var(--line); font-weight: 700; }
td { padding: 11px 12px; border-bottom: 1px solid var(--bg-2); vertical-align: middle; }
tr:hover td { background: var(--sand-light); }
.ticon { color: var(--bronze-dark); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 26px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.kpi .n { font-size: 30px; font-family: var(--display); font-weight: 700; color: var(--forest); }
.kpi .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); margin-top: 4px; font-weight: 600; }
.audit-line { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--bg-2); font-size: 13px; color: var(--ink); }
.audit-line .t { color: var(--ink-2); font-size: 11.5px; white-space: nowrap; padding-top: 2px; }
.audit-line .a { font-weight: 700; color: var(--bronze-dark); text-transform: uppercase; font-size: 10px; letter-spacing: .08em; padding-top: 3px; white-space: nowrap; }

.dash-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-list { display: flex; flex-direction: column; }
.dash-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--bg-2); font-size: 13.5px; }
.dash-item:last-child { border-bottom: none; }
.dash-item img { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
.dash-item .n { flex: 1; min-width: 0; }
.dash-item .n b { display: block; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-item .n span { font-size: 12px; color: var(--ink-2); }
.dash-item .val { font-weight: 700; color: var(--forest); white-space: nowrap; }
.section-title { font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }

dialog { border: none; background: #fff; color: var(--ink); border-radius: var(--radius); box-shadow: 0 30px 80px rgba(3, 3, 1, .3); padding: 0; max-width: 560px; width: calc(100% - 40px); }
dialog::backdrop { background: rgba(31, 29, 25, .45); backdrop-filter: blur(3px); }
dialog .dlg-head { padding: 20px 26px 0; display: flex; align-items: center; }
dialog .dlg-head h3 { font-family: var(--display); font-size: 25px; font-weight: 600; flex: 1; color: var(--forest); }
dialog .dlg-body { padding: 18px 26px 26px; max-height: 70vh; overflow: auto; }

@media (max-width: 640px) {
  .wrap { padding: 22px 16px 150px; }
  .card { padding: 20px; }
  .topbar .brand img { height: 38px; }
  .orderbar { flex-wrap: wrap; gap: 8px 14px; padding: 11px 16px; }
  .orderbar .save-state { display: none; }
}
