/* =========================================================
   Página pública do salão (tema dinâmico com as cores do salão)
   As variáveis --p (principal) e --s (secundária) são definidas
   em tempo de execução a partir do cadastro do salão.
   ========================================================= */
.pub {
  --p: #9c4668; --s: #2b1d2f;
  --p-soft: color-mix(in srgb, var(--p) 10%, white);
  --p-line: color-mix(in srgb, var(--p) 22%, white);
  --pub-bg: color-mix(in srgb, var(--p) 3%, #fbfafb);
  background: var(--pub-bg); min-height: 100vh; color: var(--ink); padding-bottom: 90px;
}
.pub .btn-primary { background: var(--p); }
.pub .btn-primary:hover { background: color-mix(in srgb, var(--p) 82%, black); }
.pub :focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 35%, transparent); }
.pub-wrap { max-width: 980px; margin: 0 auto; padding: 0 1.25rem; }

.owner-bar { background: var(--side); color: #fff; font-size: .86rem; }
.owner-bar .pub-wrap { display: flex; align-items: center; gap: .8rem; min-height: 44px; flex-wrap: wrap; padding-top: .3rem; padding-bottom: .3rem; }
.owner-bar a { color: #fff; font-weight: 700; }

.pub-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--pub-bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.pub-top.scrolled { border-bottom-color: var(--line); }
.pub-top .pub-wrap { display: flex; align-items: center; gap: .7rem; height: 60px; }
.pub-top .t-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; opacity: 0; transition: opacity .2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pub-top.scrolled .t-name { opacity: 1; }
.pub-top .btn { margin-left: auto; }

.pub-hero { position: relative; }
.pub-cover { height: 300px; background: linear-gradient(135deg, var(--p), var(--s)); position: relative; overflow: hidden; }
.pub-cover img { width: 100%; height: 100%; object-fit: cover; }
.pub-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.35)); }
.pub-cover .monogram { position: absolute; right: -2rem; bottom: -4rem; font-family: var(--font-display); font-size: 22rem; line-height: 1; color: rgba(255,255,255,.1); font-style: italic; pointer-events: none; }
.pub-id { position: relative; margin-top: -64px; z-index: 2; }
.pub-logo { width: 116px; height: 116px; border-radius: 30px; background: #fff; border: 5px solid var(--pub-bg); display: grid; place-items: center; overflow: hidden; font-family: var(--font-display); font-size: 2.8rem; font-weight: 600; color: var(--p); box-shadow: var(--shadow-2); }
.pub-logo img { width: 100%; height: 100%; object-fit: cover; }
.pub-name { font-family: var(--font-display); font-weight: 500; font-size: clamp(2.4rem, 7vw, 4rem); line-height: 1; letter-spacing: -.02em; margin: 1rem 0 .6rem; }
.pub-desc { color: var(--ink-2); max-width: 62ch; font-size: 1.02rem; }
.pub-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.4rem; }
.pub-meta a, .pub-meta span { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .8rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.pub-meta a:hover { border-color: var(--p); color: var(--p); }
.pub-meta .rating { color: var(--ink); }
.pub-meta .rating svg { color: #d59a21; fill: #d59a21; }
.pub-cta { display: flex; gap: .6rem; flex-wrap: wrap; }
.pub-cta .btn-lg { min-width: 240px; }

.branch-pick { margin-top: 1.25rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; font-size: .9rem; }
.branch-pick button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 99px; padding: .45rem .9rem; font-weight: 600; cursor: pointer; font-size: .88rem; }
.branch-pick button.active { background: var(--s); border-color: var(--s); color: #fff; }

.pub-nav { position: sticky; top: 60px; z-index: 15; background: var(--pub-bg); margin-top: 2rem; border-bottom: 1px solid var(--line); }
.pub-nav .pub-wrap { display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding-top: .5rem; padding-bottom: .5rem; }
.pub-nav .pub-wrap::-webkit-scrollbar { display: none; }
.pub-nav a { white-space: nowrap; padding: .45rem .85rem; border-radius: 99px; font-weight: 600; font-size: .9rem; color: var(--ink-2); text-decoration: none; }
.pub-nav a:hover { background: var(--p-soft); color: var(--p); }

.pub-sec { padding: 2.6rem 0 .5rem; scroll-margin-top: 120px; }
.pub-sec > .pub-wrap > h2 { font-family: var(--font-display); font-weight: 500; font-size: 2rem; letter-spacing: -.01em; margin-bottom: .3rem; }
.pub-sec .sec-sub { color: var(--muted); margin-bottom: 1.2rem; }

.promo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.promo { border-radius: 22px; padding: 1.3rem; background: var(--s); color: #fff; display: flex; flex-direction: column; gap: .5rem; position: relative; overflow: hidden; }
.promo.alt { background: var(--surface); color: var(--ink); border: 1px solid var(--p-line); }
.promo .p-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .65rem; border-radius: 99px; background: var(--p); color: #fff; font-size: .78rem; font-weight: 700; }
.promo h3 { font-size: 1.3rem; margin: .3rem 0 0; }
.promo .p-prices { display: flex; align-items: baseline; gap: .6rem; }
.promo .p-prices s { opacity: .65; }
.promo .p-prices strong { font-size: 2rem; letter-spacing: -.02em; }
.promo .p-when { font-size: .88rem; opacity: .8; }
.promo .btn { margin-top: .5rem; align-self: flex-start; }
.promo:not(.alt) .btn-primary { background: #fff; color: var(--s); }

.cat-tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .8rem; scrollbar-width: none; }
.cat-tabs button { white-space: nowrap; border: 1px solid var(--line-strong); background: var(--surface); padding: .45rem .9rem; border-radius: 99px; font-weight: 600; font-size: .88rem; cursor: pointer; }
.cat-tabs button.active { background: var(--p); border-color: var(--p); color: #fff; }
.svc-list { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.svc:last-child { border-bottom: 0; }
.svc h3 { margin: 0 0 .15rem; font-size: 1.02rem; }
.svc p { margin: 0; color: var(--muted); font-size: .88rem; }
.svc .svc-meta { font-size: .82rem; color: var(--muted); margin-top: .3rem; display: flex; gap: .4rem; align-items: center; }
.svc .svc-right { text-align: right; display: grid; gap: .4rem; justify-items: end; }
.svc .svc-price { font-weight: 800; font-size: 1.05rem; }
.svc .svc-price s { font-weight: 500; color: var(--faint); font-size: .85rem; margin-right: .3rem; }
.svc-with-img { grid-template-columns: 64px minmax(0, 1fr) auto; }
.svc-img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }

.pro-row { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.pro { flex: 0 0 210px; scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.2rem; display: flex; flex-direction: column; gap: .4rem; }
.pro .avatar { margin-bottom: .4rem; }
.pro h3 { margin: 0; font-size: 1rem; }
.pro .role { color: var(--p); font-weight: 600; font-size: .86rem; }
.pro p { color: var(--muted); font-size: .85rem; margin: 0; }
.pro .btn { margin-top: auto; }

.combo-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.combo { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 1.3rem; display: flex; flex-direction: column; gap: .6rem; }
.combo h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0; }
.combo ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; font-size: .92rem; }
.combo li { display: flex; gap: .45rem; align-items: center; }
.combo li svg { color: var(--p); }
.combo .save { display: inline-block; padding: .2rem .6rem; border-radius: 99px; background: var(--p-soft); color: var(--p); font-weight: 700; font-size: .78rem; }

.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.prod { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; }
.prod-img { aspect-ratio: 1; background: var(--p-soft); display: grid; place-items: center; color: var(--p); overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-img .ph { font-family: var(--font-display); font-size: 2.6rem; font-style: italic; opacity: .55; }
.prod-body { padding: .9rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.prod-body h3 { font-size: .95rem; margin: 0; }
.prod-body .price { font-weight: 800; }
.prod-body .btn { margin-top: auto; }
.prod-off { font-size: .78rem; color: var(--muted); }

.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem; }
.hours-list { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: .6rem 1.1rem; }
.hours-list div { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hours-list div:last-child { border-bottom: 0; }
.hours-list div.today { font-weight: 800; color: var(--p); }
.loc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem; display: grid; gap: .4rem; }
.map-art { height: 150px; border-radius: 14px; background:
  radial-gradient(circle at 60% 45%, var(--p) 0 7px, transparent 8px),
  radial-gradient(circle at 60% 45%, color-mix(in srgb, var(--p) 30%, transparent) 0 22px, transparent 23px),
  linear-gradient(90deg, transparent 48%, #fff 48% 52%, transparent 52%),
  linear-gradient(0deg, transparent 58%, #fff 58% 62%, transparent 62%),
  linear-gradient(35deg, transparent 30%, #fff 30% 33%, transparent 33%),
  color-mix(in srgb, var(--p) 8%, #eef0ec); margin-bottom: .5rem; }

.rev-summary { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.rev-summary .num { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1rem; }
.rev { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.1rem; }
.rev p { margin: .5rem 0; color: var(--ink-2); }
.rev small { color: var(--muted); }

.pub-foot { margin-top: 3rem; padding: 2rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.pub-foot .pub-wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.social { display: flex; gap: .4rem; }
.social a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

.sticky-book { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, var(--pub-bg) 70%, transparent); display: none; }
.sticky-book .btn { width: 100%; box-shadow: var(--shadow-3); }

.unavailable { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 2rem; }
.unavailable h1 { font-family: var(--font-display); font-weight: 500; font-size: 2.2rem; }

/* ---------- Fluxo de agendamento ---------- */
.bk { max-width: 640px; margin: 0 auto; padding: 1rem 1.1rem 7rem; }
.bk-top { display: flex; align-items: center; gap: .6rem; padding: .6rem 0 1rem; }
.bk-top .who { font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; }
.bk-top .who small { display: block; font-family: var(--font); font-weight: 500; font-size: .78rem; color: var(--muted); }
.bk-progress { display: flex; gap: .3rem; margin-bottom: 1.4rem; }
.bk-progress span { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.bk-progress span.on { background: var(--p); }
.bk h1 { font-family: var(--font-display); font-weight: 500; font-size: 2rem; margin-bottom: .2rem; }
.bk .step-sub { color: var(--muted); margin-bottom: 1.2rem; }
.opt-list { display: grid; gap: .6rem; }
.opt { display: flex; align-items: center; gap: .9rem; width: 100%; text-align: left; padding: 1rem; border-radius: 18px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color .15s; }
.opt:hover { border-color: var(--p-line); }
.opt.active { border-color: var(--p); background: var(--p-soft); }
.opt .grow { flex: 1; min-width: 0; }
.opt strong { display: block; font-size: 1rem; }
.opt small { color: var(--muted); display: block; font-size: .85rem; }
.opt .opt-price { font-weight: 800; text-align: right; white-space: nowrap; }
.opt .opt-price s { display: block; font-size: .78rem; font-weight: 500; color: var(--faint); }
.opt .any-icon { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--p-soft); color: var(--p); flex-shrink: 0; }
.bk-group { margin: 1.3rem 0 .5rem; font-weight: 700; color: var(--muted); font-size: .88rem; }
.date-strip { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem .1rem .6rem; scroll-snap-type: x proximity; scrollbar-width: thin; }
.date-btn { flex: 0 0 66px; scroll-snap-align: start; padding: .6rem .3rem; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; display: grid; gap: .1rem; text-align: center; }
.date-btn small { font-size: .74rem; color: var(--muted); font-weight: 600; }
.date-btn strong { font-size: 1.35rem; line-height: 1.1; }
.date-btn.active { border-color: var(--p); background: var(--p); color: #fff; }
.date-btn.active small { color: rgba(255,255,255,.85); }
.date-btn:disabled { opacity: .35; cursor: not-allowed; }
.slot-group h3 { font-size: .9rem; color: var(--muted); margin: 1.2rem 0 .5rem; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: .5rem; }
.slots button { min-height: 46px; border-radius: 12px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; font-size: .95rem; cursor: pointer; }
.slots button:hover { border-color: var(--p); }
.slots button.active { background: var(--p); border-color: var(--p); color: #fff; }
.no-slots { padding: 1.2rem; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-row small { color: var(--muted); font-weight: 600; font-size: .82rem; }
.summary-row strong { text-align: right; }
.summary-row.total { background: var(--p-soft); }
.summary-row.total strong { font-size: 1.3rem; color: var(--p); }
.bk-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: var(--surface); border-top: 1px solid var(--line); padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom, 0px)); }
.bk-bar .inner { max-width: 640px; margin: 0 auto; display: flex; gap: .8rem; align-items: center; }
.bk-bar .sel { flex: 1; min-width: 0; font-size: .85rem; color: var(--muted); }
.bk-bar .sel strong { display: block; color: var(--ink); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-done { text-align: center; padding-top: 1rem; }
.bk-done .big-check { width: 84px; height: 84px; border-radius: 50%; background: var(--p); color: #fff; display: grid; place-items: center; margin: 0 auto 1.2rem; }
.bk-done .code { display: inline-block; padding: .35rem .9rem; border-radius: 99px; background: var(--p-soft); color: var(--p); font-weight: 800; letter-spacing: .04em; margin-bottom: 1.2rem; }
.bk-done .summary { text-align: left; margin-bottom: 1.2rem; }
.bk-actions { display: grid; gap: .6rem; }
.returning { padding: .8rem 1rem; border-radius: 14px; background: var(--p-soft); color: var(--ink-2); font-size: .9rem; margin-bottom: 1rem; }
.star-input { display: flex; gap: .4rem; justify-content: center; margin: 1rem 0; }
.star-input button { border: 0; background: none; cursor: pointer; color: var(--line-strong); padding: .2rem; }
.star-input button.on { color: #d59a21; }
.star-input button.on svg { fill: currentColor; }
.bk-bar .sel-line { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bar.final .sel { display: none; }
.bk-bar.final .btn { flex: 1; }
