:root {
  --bg: #0d0d0d;
  --bg2: #151515;
  --card: #1b1b1b;
  --line: #2a2a2a;
  --text: #f4efe7;
  --muted: #a39d94;
  --accent: #efe4d2;
  --accent-ink: #111;
  --ok: #4cc27a;
  --wa: #25d366;
  --danger: #ff7a6b;
  --radius: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform .12s ease, opacity .2s ease, background .2s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .35; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: #3a3a3a; color: var(--text); }
.btn-small { min-height: 40px; font-size: 14px; padding: 0 16px; background: var(--accent); color: var(--accent-ink); }
.btn-lg { min-height: 56px; font-size: 17px; width: 100%; max-width: 360px; }
.btn-wa { background: var(--wa); color: #06210f; }

/* ---------- Topo ---------- */
.hero {
  text-align: center;
  padding: 40px 20px 36px;
  background:
    radial-gradient(120% 70% at 50% 0%, #2a2620 0%, rgba(13,13,13,0) 70%),
    var(--bg);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.hero-logo { width: 168px; height: 168px; filter: drop-shadow(0 12px 30px rgba(0,0,0,.6)); }
.hero-kicker { margin: 8px 0 0; color: var(--muted); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.hero-title { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 56px; line-height: .95; margin: 0; letter-spacing: .02em; }
.hero-sub { margin: 0 0 10px; color: #cfc8bd; max-width: 320px; }

/* ---------- Seções ---------- */
main { max-width: 640px; margin: 0 auto; }
.section { padding: 32px 20px; border-top: 1px solid var(--line); }
.section-title { font-family: "Bebas Neue", Impact, sans-serif; font-weight: 400; font-size: 36px; letter-spacing: .03em; margin: 0 0 4px; }
.section-hint { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.cat-title { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }

.svc-list { list-style: none; margin: 0; padding: 0; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.svc-list li + li { border-top: 1px solid var(--line); }
.svc-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px; background: none; border: 0; text-align: left; min-height: 60px;
}
.svc-row:active { background: #232323; }
.svc-name { font-weight: 500; }
.svc-meta { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.svc-meta small { color: var(--muted); font-size: 13px; }

.barber-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.barber-card {
  background: var(--card); border-radius: var(--radius); padding: 18px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.barber-card img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 2px solid #333; }

.hours { list-style: none; margin: 12px 0 0; padding: 0; background: var(--card); border-radius: var(--radius); }
.hours li { display: flex; justify-content: space-between; padding: 13px 16px; }
.hours li + li { border-top: 1px solid var(--line); }
.hours li.today { color: var(--accent); font-weight: 600; }
.hours em { font-style: normal; font-size: 11px; background: var(--accent); color: var(--accent-ink); padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 1px; }

.address { margin: 6px 0 14px; color: #d6cfc4; }
.map { border-radius: var(--radius); overflow: hidden; background: var(--card); aspect-ratio: 4/3; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.4) contrast(1.05); }
.row-btns { display: flex; gap: 10px; margin-top: 12px; }
.row-btns .btn { flex: 1; }

.footer { text-align: center; padding: 36px 20px calc(110px + var(--safe-b)); border-top: 1px solid var(--line); color: #cfc8bd; }
.footer img { margin: 0 auto 10px; }
.footer p { margin: 4px 0; }

.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: linear-gradient(to top, rgba(13,13,13,.98) 60%, rgba(13,13,13,0));
  display: flex; justify-content: center;
  transform: translateY(110%); transition: transform .25s ease;
}
.sticky-cta.show { transform: none; }

/* ---------- Agenda (tela cheia) ---------- */
.booking {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column;
  animation: up .22s ease;
}
.booking[hidden] { display: none; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.bk-head { display: flex; align-items: center; gap: 6px; padding: 10px 8px 8px; max-width: 640px; width: 100%; margin: 0 auto; }
.bk-head-text { flex: 1; min-width: 0; text-align: center; }
.bk-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.bk-step { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.bk-back, .bk-close { width: 44px; height: 44px; border-radius: 50%; background: none; border: 0; display: grid; place-items: center; }
.bk-back:active, .bk-close:active { background: #222; }
.bk-back.invisible { visibility: hidden; }
.bk-progress { height: 3px; background: var(--line); }
.bk-progress span { display: block; height: 100%; width: 25%; background: var(--accent); transition: width .25s ease; }

.bk-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 16px 24px; max-width: 640px; width: 100%; margin: 0 auto; }

/* serviços selecionáveis */
.bk-cat { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 18px 4px 8px; font-weight: 600; }
.bk-cat:first-child { margin-top: 0; }
.bk-svc {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px; margin-bottom: 8px; min-height: 64px;
  background: var(--card); border: 1.5px solid transparent; border-radius: 12px;
}
.bk-svc .tick { width: 24px; height: 24px; flex: none; border-radius: 7px; border: 2px solid #4a4a4a; display: grid; place-items: center; }
.bk-svc .tick svg { opacity: 0; }
.bk-svc .info { flex: 1; min-width: 0; }
.bk-svc .info b { display: block; font-weight: 600; }
.bk-svc .info small { color: var(--muted); }
.bk-svc .price { font-weight: 600; white-space: nowrap; }
.bk-svc.on { border-color: var(--accent); background: #221f1a; }
.bk-svc.on .tick { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.bk-svc.on .tick svg { opacity: 1; }

/* barbeiros */
.bk-barbers { display: grid; gap: 12px; }
.bk-barber {
  display: flex; align-items: center; gap: 16px; padding: 14px; text-align: left;
  background: var(--card); border: 1.5px solid transparent; border-radius: var(--radius); width: 100%;
}
.bk-barber img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.bk-barber b { font-size: 18px; display: block; }
.bk-barber small { color: var(--muted); }
.bk-barber.on { border-color: var(--accent); background: #221f1a; }

/* dias */
.bk-days {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  scroll-snap-type: x proximity; scrollbar-width: none;
}
.bk-days::-webkit-scrollbar { display: none; }
.bk-day {
  flex: none; width: 62px; padding: 10px 0; border-radius: 12px; text-align: center;
  background: var(--card); border: 1.5px solid transparent; scroll-snap-align: start;
}
.bk-day span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; }
.bk-day b { display: block; font-size: 22px; font-weight: 700; line-height: 1.2; }
.bk-day.on { background: var(--accent); color: var(--accent-ink); }
.bk-day.on span { color: #4a4238; }
.bk-day:disabled { opacity: .3; }
.bk-day:disabled b { text-decoration: line-through; }

.bk-slots-title { margin: 8px 2px 12px; color: var(--muted); font-size: 14px; }
.bk-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 340px) { .bk-slots { grid-template-columns: repeat(3, 1fr); } }
.bk-slot {
  min-height: 46px; border-radius: 10px; background: var(--card); border: 1.5px solid transparent;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.bk-slot.on { background: var(--accent); color: var(--accent-ink); }
.bk-empty { grid-column: 1 / -1; text-align: center; padding: 28px 12px; color: var(--muted); background: var(--card); border-radius: 12px; }
.bk-empty a { color: var(--accent); }
.skeleton { min-height: 46px; border-radius: 10px; background: linear-gradient(90deg, #1b1b1b, #262626, #1b1b1b); background-size: 200% 100%; animation: sk 1.1s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }

/* resumo + form */
.bk-summary { background: var(--card); border-radius: var(--radius); padding: 6px 16px; margin-bottom: 18px; text-align: left; width: 100%; }
.bk-summary div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; }
.bk-summary div + div { border-top: 1px solid var(--line); }
.bk-summary span { color: var(--muted); flex: none; }
.bk-summary b { text-align: right; font-weight: 600; }
#bkForm label { display: block; font-size: 14px; color: #cfc8bd; margin: 0 0 6px 2px; }
#bkForm input {
  width: 100%; min-height: 52px; padding: 0 14px; margin-bottom: 16px;
  border-radius: 12px; border: 1.5px solid #333; background: var(--bg2); color: var(--text);
  font-size: 17px; /* 16px+ evita zoom no iPhone */
}
#bkForm input:focus { outline: none; border-color: var(--accent); }
.hp { position: absolute !important; left: -9999px; height: 0; width: 0; opacity: 0; }
.bk-error { color: var(--danger); min-height: 1.2em; margin: 0; font-size: 15px; }

/* confirmado */
.bk-done { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding-top: 8px; }
.bk-done h3 { margin: 4px 0 8px; font-size: 24px; }
.bk-check { width: 72px; height: 72px; border-radius: 50%; background: var(--ok); color: #062311; display: grid; place-items: center; animation: pop .35s ease; }
@keyframes pop { 0% { transform: scale(.4); } 80% { transform: scale(1.08); } 100% { transform: none; } }
.bk-done .btn-ghost { width: 100%; max-width: 360px; }

/* rodapé da agenda */
.bk-foot {
  border-top: 1px solid var(--line); background: var(--bg2);
  padding: 12px 16px calc(12px + var(--safe-b));
  display: flex; align-items: center; gap: 12px;
}
.bk-foot-info { flex: 1; min-width: 0; font-size: 14px; color: var(--muted); line-height: 1.3; }
.bk-foot-info b { color: var(--text); font-size: 16px; display: block; }
.bk-foot .btn { min-width: 140px; }
.bk-foot[hidden] { display: none; }

@media (min-width: 700px) {
  .hero { padding-top: 64px; }
  .hero-title { font-size: 72px; }
  .bk-foot { justify-content: center; }
  .bk-foot-info { max-width: 460px; }
}
