/* DaVila Barbearia: estilos do site público (inspirado no layout do Trafft, com o verde da marca) */
:root {
  --brand: #114b33;
  --brand-dark: #0b3423;
  --brand-soft: #e7f0eb;
  --brand-ring: #9cc2ae;
  --text: #1f2a26;
  --muted: #6b7671;
  --line: #e4e7e5;
  --bg-soft: #f6f7f6;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(16, 24, 20, .08), 0 1px 2px rgba(16, 24, 20, .04);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--text); background: #fff; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
button { font: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 12px; }

/* ---------- Header ---------- */
.header { position: sticky; top: 0; z-index: 30; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.header .container { display: flex; align-items: center; gap: 28px; height: 68px; }
.logo { width: 44px; height: 44px; border-radius: 3px; overflow: hidden; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.nav { display: flex; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a.active { border-bottom-color: var(--brand); }
.nav a:hover { color: var(--brand); }
.burger { display: none; margin-left: auto; background: none; border: 0; padding: 6px; }
.burger span { display: block; width: 32px; height: 3px; background: #6b6f73; border-radius: 3px; margin: 6px 0; }
.mobile-menu { display: none; }

/* ---------- Hero ---------- */
.hero { height: 172px; background: var(--brand) center/cover no-repeat; position: relative; overflow: hidden; }
.hero.placeholder { background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,.08) 0 2px, transparent 3px), linear-gradient(120deg, #0b3423, #1d6a49); background-size: 24px 24px, cover; display: flex; align-items: center; justify-content: center; }
.hero.placeholder::after { content: attr(data-title); color: #fff; font-size: 28px; font-weight: 700; letter-spacing: .5px; opacity: .95; }

/* ---------- Secção serviços (home) ---------- */
.section-title { font-size: 18px; font-weight: 600; margin: 20px 0 22px; }
.service-row { display: flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; background: #fff; }
.service-row .thumb { width: 162px; min-height: 82px; flex: none; }
.service-row .body { flex: 1; display: flex; justify-content: space-between; gap: 12px; padding: 12px 12px 12px 12px; }
.service-row h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; text-transform: uppercase; letter-spacing: .1px; }
.meta { color: var(--muted); font-size: 13px; }
.meta b { color: var(--text); font-weight: 500; margin-left: 4px; }
.loc { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 6px; }
.loc svg { width: 14px; height: 14px; color: #b0b6b3; }
.service-row .right { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 8px; }
.price { font-size: 15px; }
.btns { display: flex; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 18px; border-radius: 4px; border: 1px solid transparent; font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: #a9b9b1; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--text); border-color: #d6d9d8; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { height: 40px; font-size: 14px; padding: 0 22px; }
.btn-block { width: 100%; }

/* Imagem de serviço: se a foto faltar, mostra um padrão verde com uma tesoura */
.thumb { background: linear-gradient(135deg, #0b3423, #1d6a49); position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.thumb.noimg::after { content: ''; position: absolute; inset: 0; background: url('/img/scissors.svg') center/34px no-repeat; opacity: .55; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-soft); margin-top: 40px; padding: 26px 0 40px; }
.footer .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .logo { width: 50px; height: 50px; margin-bottom: 26px; }
.footer .right { text-align: right; display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
.footer .right a { text-decoration: none; }
.footer .shop { font-size: 16px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 20px; height: 20px; display: inline-flex; color: var(--brand); }

/* ---------- Localizações ---------- */
.loc-card { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
.loc-card .info { padding: 24px; }
.loc-card h2 { margin: 0 0 12px; font-size: 18px; }
.loc-card iframe { width: 100%; height: 100%; min-height: 320px; border: 0; }
.hours-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.hours-table td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours-table td:last-child { text-align: right; color: var(--muted); }
.hours-table tr.today td { font-weight: 600; color: var(--text); }

/* ---------- Fluxo de marcação ---------- */
.booking { display: grid; grid-template-columns: 1fr 282px; gap: 30px; align-items: start; margin-top: 24px; }
.card { background: #fff; border: 1px solid #eef0ef; border-radius: var(--radius); box-shadow: var(--shadow); }
.step { padding: 18px 18px 22px; min-height: 300px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.step-head h2 { font-size: 16px; font-weight: 600; margin: 0; flex: 1; }
.back { width: 32px; height: 32px; border: 1px solid #d6d9d8; border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.back:hover { border-color: var(--brand); }
.search { display: flex; align-items: center; gap: 6px; background: #eef0ef; border-radius: 16px; height: 32px; padding: 0 12px; color: var(--muted); }
.search input { border: 0; background: none; outline: none; font: inherit; font-size: 13px; width: 120px; }

.pick { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.pick .thumb { width: 66px; height: 66px; border-radius: 4px; overflow: hidden; flex: none; }
.pick .mid { flex: 1; }
.pick h3 { margin: 6px 0 4px; font-size: 15px; font-weight: 600; text-transform: uppercase; }
.pick .side { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 8px; }
.chip { background: #eef0ef; border-radius: 4px; padding: 2px 8px; font-size: 13px; font-weight: 500; }

.cal-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-size: 15px; text-transform: lowercase; }
.cal-title::first-letter { text-transform: lowercase; }
.arrows { display: flex; gap: 6px; }
.arrows button { width: 32px; height: 32px; border: 1px solid #d6d9d8; border-radius: 6px; background: #fff; display: inline-flex; align-items: center; justify-content: center; }
.arrows button:disabled { opacity: .4; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 9px; }
.cal-grid .dow { text-align: center; font-size: 12px; color: var(--muted); padding-bottom: 4px; }
.day { height: 56px; border: 1px solid var(--line); border-radius: 4px; background: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; color: var(--text); }
.day:hover:not(:disabled) { border-color: var(--brand); }
.day:disabled { border-color: transparent; color: #c5cac8; cursor: default; }
.day.other { visibility: hidden; }
.day.selected { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.day.today:not(.selected) { font-weight: 700; }
.times-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 14px; }
.times-head h3 { margin: 0; font-size: 16px; font-weight: 500; }
.tz { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; }
.times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.time { height: 38px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 13px; }
.time:hover { border-color: var(--brand); }
.time.selected { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.empty { color: var(--muted); font-size: 14px; padding: 12px 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; }
.field label .req { color: #e5484d; margin-right: 3px; }
.field input, .field textarea { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; font: inherit; font-size: 13px; outline: none; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.field input.invalid { border-color: #e5484d; }
.field .err { color: #e5484d; font-size: 12px; margin-top: 4px; }
.phone { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 4px; height: 32px; }
.phone:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.phone .cc { display: flex; align-items: center; gap: 6px; padding: 0 10px; font-size: 13px; color: var(--text); border-right: 1px solid var(--line); height: 100%; }
.phone input { border: 0 !important; box-shadow: none !important; height: 30px; }
.flag { width: 18px; height: 12px; border-radius: 1px; background: linear-gradient(90deg, #046a38 0 40%, #da291c 40%); }

.step-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 10px 18px; }
.step-foot .svc { display: flex; align-items: center; gap: 10px; font-size: 15px; text-transform: uppercase; }
.step-foot .svc .thumb { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; }

.review-list { border: 1px solid var(--line); border-radius: var(--radius); }
.review-list > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.review-list > div:last-child { border-bottom: 0; }
.review-list span:first-child { color: var(--muted); }
.note { background: var(--brand-soft); border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-top: 14px; }
.alert { background: #fdecec; color: #a3262b; border-radius: 6px; padding: 10px 12px; font-size: 13px; margin-top: 14px; }

.success { text-align: center; padding: 40px 20px; }
.success .check { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.success h2 { margin: 0 0 6px; font-size: 22px; }
.success p { color: var(--muted); margin: 0 0 4px; }

/* Detalhes da reserva (lado direito) */
.summary h2 { font-size: 16px; font-weight: 600; margin: 0; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.summary .items { padding: 0 8px; }
.summary .item { display: flex; gap: 8px; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.summary .item:last-child { border-bottom: 0; }
.summary .item svg { width: 16px; height: 16px; color: var(--brand); flex: none; margin-top: 1px; }
.summary .item.empty-item svg { color: #a5aba8; }
.summary .label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.summary .val { font-size: 13px; font-weight: 500; }
.summary .sub { font-size: 11px; color: var(--muted); margin-top: 4px; }
.summary .row { display: flex; justify-content: space-between; gap: 6px; }
.summary .row small { color: var(--muted); font-weight: 400; }
.summary .money { color: var(--brand); font-weight: 600; }
.summary .total { color: var(--brand); font-size: 17px; font-weight: 600; }
.sheet-bar { display: none; }

/* Skeleton */
.skel { background: linear-gradient(90deg, #eef0ef 25%, #f6f7f6 37%, #eef0ef 63%); background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 4px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Modal "Saiba mais" */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 20, 15, .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border-radius: 10px; max-width: 460px; width: 100%; overflow: hidden; }
.modal .thumb { height: 200px; }
.modal .content { padding: 18px; }
.modal h3 { margin: 0 0 8px; text-transform: uppercase; font-size: 17px; }
.modal p { color: var(--muted); margin: 0 0 14px; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .container { padding: 0 14px; }
  .header .container { height: 58px; }
  .nav { display: none; }
  .burger { display: block; }
  .mobile-menu.open { display: block; position: fixed; top: 58px; left: 0; right: 0; bottom: 0; background: #fff; z-index: 29; padding: 10px 14px; }
  .mobile-menu a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 16px; }
  .hero { height: 200px; }
  .section-title { font-size: 22px; margin: 18px 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-left: -14px; margin-right: -14px; padding-left: 14px; }
  .service-row { flex-direction: column; border-radius: 6px; }
  .service-row .thumb { width: 100%; height: 170px; }
  .service-row .body { flex-direction: column; padding: 14px 18px 16px; }
  .service-row h3 { font-size: 19px; }
  .service-row .meta, .service-row .loc { font-size: 15px; }
  .service-row .right { align-items: stretch; }
  .service-row .price { position: absolute; top: 12px; right: 12px; background: #eef0ef; border-radius: 6px; padding: 3px 9px; }
  .service-row { position: relative; }
  .service-row .btns .btn { flex: 1; height: 44px; font-size: 15px; }
  .booking { grid-template-columns: 1fr; margin-top: 12px; }
  .booking .step.card { border: 0; box-shadow: none; padding: 4px 0 90px; }
  .pick { flex-wrap: wrap; padding: 12px; }
  .pick .side { width: 100%; flex-direction: column; align-items: flex-start; }
  .pick .side .btn { width: 100%; height: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .times { grid-template-columns: repeat(2, 1fr); }
  .cal-grid { gap: 5px; }
  .day { height: 44px; }
  .step-foot { position: fixed; left: 0; right: 0; bottom: 44px; background: #fff; z-index: 20; }
  .step-foot .svc { display: none; }
  .step-foot .btn { width: 100%; height: 42px; }
  .loc-card { grid-template-columns: 1fr; }
  .footer .right { align-items: flex-start; text-align: left; }
  /* Detalhes da reserva vira "bottom sheet" */
  .summary-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; }
  .summary-wrap .summary { display: none; border-radius: 14px 14px 0 0; max-height: 70vh; overflow: auto; }
  .summary-wrap.open .summary { display: block; }
  .summary-wrap.open::before { content: ''; position: fixed; inset: 0; background: rgba(10,20,15,.4); z-index: -1; }
  .sheet-bar { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 44px; background: var(--brand); color: #fff; border: 0; border-radius: 12px 12px 0 0; padding: 0 16px; font-size: 15px; font-weight: 500; }
  .summary-wrap.open .sheet-bar { border-radius: 0; }
  .sheet-bar .chev { width: 18px; height: 18px; border-radius: 50%; background: #fff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; transition: transform .2s; }
  .summary-wrap.open .sheet-bar .chev { transform: rotate(180deg); }
  .page-booking .footer { display: none; }
}
