/* ══════════════════════════════════════════════════════════
   Public customer pages: shop page, booking flow, review page
   ══════════════════════════════════════════════════════════ */

:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ink: #0d0d0d;
  --ink-2: #404040;
  --muted: #5C5C5C;      /* 5.9:1 on the grey page */
  --line: #e5e5e5;
  --line-soft: #f0f0f0;
  --page: #ffffff;
  --page-grey: #f2f2f2;
  --card: #ffffff;
  --accent: #4F46E5;     /* white text on it: 6.3:1 */
  --accent-hover: #4338CA;
  --accent-soft: #EEF2FF;
  --star: #A16207;      /* 4.9:1 on white; 3.9:1 against an empty star */
  --open: #166534;
  --closed: #9A3412;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow: none;        /* flat UI */
  --shadow-lg: none;
  --gutter: 32px;

  /* Component tokens read by components.css */
  --c-ink: #0d0d0d;
  --c-ink-2: #404040;
  --c-muted: #5C5C5C;
  --ctl-fill: #F2F2F2;
  --ctl-fill-hover: #E5E5E5;
  --ctl-focus: #EEF2FF;
  --ctl-fs: 15px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--page);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.page-grey { background: var(--page-grey); }

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }
.link { color: var(--accent); text-decoration: none; font-weight: 500; cursor: pointer; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }

.h1 { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 0; }
.h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 8px; }
.h3 { font-size: 1.25rem; font-weight: 700; margin: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card);
  font-weight: 600; font-size: 0.95rem; text-decoration: none; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
}
.btn:hover { background: #fafafa; border-color: #d4d4d4; }
.btn:active { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; opacity: 1; background: #E5E5E5; border-color: #E5E5E5; color: #5C5C5C; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-lg { height: 52px; font-size: 1.02rem; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 0.85rem; }
.btn-block { width: 100%; }

.icon-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.icon-btn:hover { background: #fafafa; }

/* ── Form fields ── */
.field-label { display: block; font-weight: 600; font-size: 0.9rem; margin: 16px 0 6px; }
.input {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
  font: inherit; color: var(--ink); background: #fff; outline: none; transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 96px; }
.form-error { color: #b91c1c; font-size: 0.88rem; margin-top: 10px; }

/* ── Stars ── */
.stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.stars svg { width: 16px; height: 16px; }
.stars .on { fill: var(--star); }
.stars .off { fill: #e5e5e5; }

/* ══ Centered pages (review, not found) ══ */
.center-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.center-card {
  width: 100%; max-width: 480px; background: var(--card); border-radius: var(--radius-xl);
  padding: 32px; box-shadow: var(--shadow); text-align: center;
}

.review-card { text-align: left; }
.review-shop { display: flex; align-items: center; gap: 12px; font-weight: 700; margin-bottom: 24px; }
.review-logo { width: 44px; height: 44px; border-radius: var(--radius); object-fit: cover; }
.review-logo-letter { background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.review-meta { margin: 0 0 20px; font-size: 0.92rem; }

.star-input { display: flex; gap: 6px; }
.star-btn { background: none; border: 0; padding: 2px; cursor: pointer; line-height: 0; border-radius: 8px; }
.star-btn svg { fill: #e5e5e5; transition: fill 0.12s, transform 0.12s; }
.star-btn.on svg { fill: var(--star); }
.star-btn:hover svg { transform: scale(1.08); }
.star-btn:focus-visible { outline: 2px solid var(--accent); }
.star-label { margin: 6px 0 4px; font-size: 0.9rem; min-height: 1.4em; }
.review-form .btn-block { margin-top: 20px; }
.review-form .small { margin: 12px 0 0; text-align: center; }

.review-done { text-align: center; }
.review-done-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 2rem; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.review-done .btn { margin-top: 12px; }

@media (max-width: 520px) {
  .center-card { padding: 24px 20px; border-radius: var(--radius-lg); }
}

/* ══════════════════════════════════════════════════════════
   Shop page (/book/:slug)
   ══════════════════════════════════════════════════════════ */

.wrap { max-width: 1312px; margin: 0 auto; padding: 0 var(--gutter); }
.accent { color: var(--accent); }
.show-mobile { display: none !important; }

/* Top bar */
.topbar { border-bottom: 1px solid var(--line-soft); background: #fff; }
.topbar-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; min-width: 0; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-logo { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.brand-letter { background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
/* The app's own logo (Rexerve), like Fresha's in its header */
.topbar .brand { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.powered { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; white-space: nowrap; }
.powered img { height: 34px; width: auto; opacity: 0.85; }

/* Sticky section nav (appears after scrolling past the header) */
.section-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--line);
  transform: translateY(-100%); transition: transform 0.2s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.section-nav.visible { transform: none; }
.section-nav-inner { display: flex; align-items: center; gap: 24px; height: 56px; }
.section-nav-title { display: none; font-weight: 800; }
.section-tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; height: 100%; }
.section-tabs::-webkit-scrollbar { display: none; }
.section-tabs a {
  display: flex; align-items: center; height: 100%; text-decoration: none; color: var(--muted); font-weight: 500;
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.section-tabs a:hover { color: var(--ink); }
.section-tabs a.active { color: var(--ink); border-bottom-color: var(--ink); }

/* Header */
.shop { padding-top: 32px; }
.shop-head { position: relative; padding-right: 72px; margin-bottom: 24px; }
.shop-type { margin-top: 6px; font-size: 1.05rem; }
.shop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; font-size: 1rem; }
.shop-meta .sep { color: var(--muted); }
.rating-inline { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.rating-inline b { font-weight: 700; }
.open-status { font-weight: 500; }
.open-status.is-open { color: var(--open); }
.open-status.is-closed { color: var(--closed); }
.share-btn { position: absolute; right: 0; bottom: 0; }
.share-btn.copied { border-color: var(--accent); color: var(--accent); }
.location-chip {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 14px 16px; border-radius: var(--radius);
  background: #f5f5f5; text-decoration: none; font-weight: 500;
}

/* Gallery: 1 big + 2 small */
.gallery { position: relative; margin-bottom: 48px; }
.gallery-track { display: grid; gap: 16px; height: 520px; }
.gallery-1 .gallery-track { grid-template-columns: 1fr; }
.gallery-2 .gallery-track { grid-template-columns: 2fr 1fr; }
.gallery-3 .gallery-track { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.gallery-3 .gallery-item:first-child { grid-row: 1 / span 2; }
.gallery-item { border: 0; padding: 0; margin: 0; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; background: #eee; min-height: 0; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.02); }
.gallery-track .gallery-item:nth-child(n+4) { display: none; }
.gallery-2 .gallery-track .gallery-item:nth-child(n+3) { display: none; }
.gallery-1 .gallery-track .gallery-item:nth-child(n+2) { display: none; }
.gallery-all { position: absolute; right: 20px; bottom: 20px; box-shadow: var(--shadow); }
.gallery-counter { display: none; }

/* Two-column body */
.shop-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; align-items: start; }
.shop-side { position: sticky; top: 80px; }
.shop-section { margin-bottom: 56px; scroll-margin-top: 72px; }
.shop-section > .h2 { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.count-badge { font-size: 0.8rem; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; color: var(--muted); }

/* Category pills */
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 0 20px; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 500; font-size: 0.92rem; cursor: pointer; white-space: nowrap;
}
.pill:hover { border-color: #c4c4c4; }
.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Service cards */
.svc-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 12px; background: #fff;
}
.svc-info { min-width: 0; }
.svc-name { font-weight: 600; font-size: 1rem; }
.svc-dur { font-size: 0.88rem; margin-top: 2px; }
.svc-desc { font-size: 0.88rem; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.svc-price { font-weight: 700; font-size: 0.95rem; margin-top: 12px; }
.see-all { margin-top: 8px; }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 24px; }
.team-member { text-align: center; }
.team-avatar-wrap { position: relative; width: 112px; margin: 0 auto 14px; }
.avatar {
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700;
  display: flex; align-items: center; justify-content: center; object-fit: cover; flex-shrink: 0;
}
.avatar-lg { width: 112px; height: 112px; font-size: 2rem; }
.avatar-sm { width: 48px; height: 48px; font-size: 1rem; }
.team-rating {
  position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-weight: 700; font-size: 0.85rem; box-shadow: var(--shadow);
}
.team-name { font-weight: 600; }

/* Reviews */
.review-summary { text-align: center; padding: 8px 0 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.review-big { font-size: 4rem; font-weight: 800; line-height: 1; margin-bottom: 8px; letter-spacing: -0.03em; }
.review-summary .stars svg { width: 22px; height: 22px; }
.review-summary .muted { margin-top: 8px; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 40px; margin-bottom: 28px; }
.review-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.review-name { font-weight: 600; }
.review-text { margin: 0 0 10px; white-space: pre-line; overflow-wrap: anywhere; }
.review-foot { font-size: 0.85rem; }

/* About */
.about-text { margin: 0 0 24px; white-space: pre-line; color: var(--ink-2); font-size: 1.02rem; }
.map-wrap { border-radius: var(--radius); overflow: hidden; height: 360px; background: #eee; }
.map-wrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.about-address { margin: 14px 0 32px; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-cols .h3 { margin-bottom: 16px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 6px 0; vertical-align: top; }
.hours td:last-child { text-align: right; white-space: nowrap; }
.hours tr.today td { font-weight: 700; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 12px; vertical-align: 1px; }
.dot-open { background: #22c55e; }
.dot-closed { background: #d4d4d4; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; align-items: center; gap: 12px; }
.contact-list a { text-decoration: none; font-weight: 500; }
.contact-list a:hover { text-decoration: underline; }
.wa-dot, .social-dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; }
.wa-dot { background: #25D366; }
.social-dot { background: var(--accent-soft); border: 2px solid var(--accent); }

/* Booking card (desktop sidebar) */
.book-card { border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); background: #fff; overflow: hidden; }
.book-card-top { padding: 32px; }
.book-card-name { font-size: 2rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.book-card-head .book-card-reveal-inner { display: grid; gap: 14px; }
.book-card-head .book-card-reveal-inner > :last-child { margin-bottom: 22px; }
.book-card-top .rating-inline { font-size: 1.15rem; }
.book-card-info { padding: 24px 32px 28px; display: grid; gap: 18px; border-top: 1px solid var(--line); }

/* At the top of the page the card is just "Book now": the shop's name and
   rating are right there in the header. Once they scroll away (shop.js adds
   .is-expanded), the card grows: name and rating slide down above the
   button, hours and address below it. Collapsed parts are hidden from
   keyboard and screen readers too (visibility). */
.book-card-reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0s linear 0.4s;
}
.book-card-reveal-inner { min-height: 0; overflow: hidden; }
.book-card-head .book-card-reveal-inner { transform: translateY(-16px); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.book-card.is-expanded .book-card-reveal {
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease 0.1s, visibility 0s;
}
.book-card.is-expanded .book-card-head .book-card-reveal-inner { transform: none; }
.hours-toggle summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.hours-toggle summary::-webkit-details-marker { display: none; }
.hours-toggle[open] summary svg:last-child { transform: rotate(180deg); }
.hours-toggle .hours { margin-top: 12px; font-size: 0.92rem; }
.info-row { display: flex; gap: 10px; align-items: flex-start; }
.info-row svg, .hours-toggle summary svg:first-child { flex-shrink: 0; margin-top: 1px; }

/* Footer + mobile bar */
.shop-footer { border-top: 1px solid var(--line); padding: 28px 0 32px; font-size: 0.85rem; }
.shop-footer .wrap { display: flex; align-items: center; gap: 8px; }
.shop-footer img { height: 32px; width: auto; }
.mobile-book-bar { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(10,10,10,0.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-img { max-width: min(92vw, 1200px); max-height: 82vh; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox .icon-btn { position: absolute; background: rgba(255,255,255,0.12); border-color: transparent; color: #fff; }
.lightbox .icon-btn:hover { background: rgba(255,255,255,0.22); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.8); font-size: 0.9rem; }

/* ── Tablet ── */
@media (max-width: 1080px) {
  .shop-layout { grid-template-columns: minmax(0, 1fr); }
  .shop-side { display: none; }
  .mobile-book-bar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line);
  }
  .shop-footer { padding-bottom: 104px; }
  .gallery-track { height: 420px; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .h1 { font-size: 1.85rem; }
  .h2 { font-size: 1.4rem; }
  .show-mobile { display: flex !important; }
  .hide-mobile { display: none !important; }
  .topbar-inner { height: 56px; }
  .powered img { height: 28px; }

  .shop { padding-top: 0; }
  .shop-top { display: flex; flex-direction: column; }
  .gallery { order: -1; margin: 0 calc(-1 * var(--gutter)); }
  .gallery-track {
    display: flex; height: 300px; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .gallery-track::-webkit-scrollbar { display: none; }
  .gallery-track .gallery-item, .gallery-track .gallery-item:nth-child(n) {
    display: block; flex: 0 0 100%; border-radius: 0; scroll-snap-align: start; cursor: pointer;
  }
  .gallery-all { display: none; }
  .gallery-counter {
    display: block; position: absolute; right: 16px; bottom: 40px; background: rgba(0,0,0,0.6); color: #fff;
    font-size: 0.85rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  }
  .shop-head {
    background: #fff; margin: -24px calc(-1 * var(--gutter)) 24px; padding: 24px var(--gutter) 0; border-radius: 24px 24px 0 0;
    position: relative; z-index: 1;
  }
  .gallery + .shop-head, .shop-top .shop-head { padding-right: var(--gutter); }
  .share-btn { top: 20px; bottom: auto; right: var(--gutter); width: 42px; height: 42px; }
  .shop-head .h1 { padding-right: 52px; }
  .shop-meta { font-size: 0.95rem; }

  .section-nav-inner { flex-direction: column; align-items: stretch; height: auto; gap: 0; }
  .section-nav-title { display: block; padding: 12px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .section-tabs { height: 44px; gap: 22px; }

  .shop-section { margin-bottom: 40px; }
  .svc-card { padding: 16px 18px; }
  .review-grid { grid-template-columns: 1fr; gap: 28px; }
  .about-cols { grid-template-columns: 1fr; gap: 32px; }
  .map-wrap { height: 240px; }
  .team-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 20px 12px; }
  .avatar-lg { width: 88px; height: 88px; font-size: 1.6rem; }
  .team-avatar-wrap { width: 88px; }
  .lb-prev, .lb-next { display: none; }
}

/* ══════════════════════════════════════════════════════════
   Booking flow (/book/:slug/booking)
   ══════════════════════════════════════════════════════════ */

body.flow-page { background: var(--page-grey); }

.flow-header {
  position: sticky; top: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 32px; background: var(--page-grey);
}
.flow-wrap {
  max-width: 1184px; margin: 0 auto; padding: 0 32px 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) 444px; gap: 96px; align-items: start;
}
.flow-main { min-width: 0; }

.crumbs { display: flex; align-items: center; gap: 10px; font-size: 0.88rem; margin: 8px 0 14px; overflow-x: auto; scrollbar-width: none; }
.crumbs::-webkit-scrollbar { display: none; }
.crumb { color: var(--muted); font-weight: 500; white-space: nowrap; }
.crumb.active { color: var(--ink); font-weight: 600; }
.crumb.completed { color: var(--ink-2); cursor: pointer; }
.crumb.completed:hover { text-decoration: underline; }
.crumb-sep { color: var(--muted); display: inline-flex; }

.flow-title { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 24px; }
.flow-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.flow-subtitle { font-size: 1.15rem; font-weight: 700; margin: 0; }
.icon-btn-sm { width: 40px; height: 40px; }

.view { display: none; }
.view.active { display: block; }

.loading-state { display: flex; justify-content: center; padding: 48px 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Search + category pills */
.pub-filters { margin-bottom: 4px; }
.pub-search-inner { position: relative; margin-bottom: 16px; }
.pub-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pub-search-input {
  width: 100%; height: 48px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  padding: 0 18px 0 44px; font: inherit; outline: none;
}
.pub-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* The arrows sit beside the tabs and take their own space, so they never
   cover a category */
.pub-cat-tabs-wrapper { position: relative; display: flex; align-items: center; gap: 8px; }
.pub-cat-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; padding: 2px 0; }
.pub-cat-tabs::-webkit-scrollbar { display: none; }
.pub-cat-tab {
  flex-shrink: 0; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-weight: 500; font-size: 0.92rem; cursor: pointer; white-space: nowrap;
}
.pub-cat-tab:hover { border-color: #c4c4c4; }
.pub-cat-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pub-cat-dot { display: none; }
.pub-cat-arrow {
  display: none; flex: none; width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; align-items: center; justify-content: center;
}
.pub-cat-arrow.show { display: flex; }

.svc-cat-title { font-size: 1.25rem; font-weight: 700; margin: 28px 0 16px; }

/* Service cards */
.svc-flat-list { display: grid; gap: 14px; }
.service-item {
  position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.service-item:hover { border-color: #d4d4d4; }
.service-item.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.service-info { min-width: 0; }
.service-name { font-weight: 600; font-size: 1rem; }
.service-duration { color: var(--muted); font-size: 0.88rem; margin-top: 2px; }
.service-description {
  color: var(--muted); font-size: 0.88rem; margin-top: 10px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.service-price { font-weight: 700; margin-top: 16px; }
.add-btn {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: background 0.15s, color 0.15s, transform 0.1s;
}
.add-btn:active { transform: scale(0.94); }
.add-btn.added { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Sub-category accordions */
.svc-sub-accordion { margin-top: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.svc-sub-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 24px; cursor: pointer; }
.svc-sub-header-left { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.svc-sub-dot { display: none; }
.svc-sub-count { font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; font-weight: 600; }
.svc-sub-chevron { transition: transform 0.25s; }
.svc-sub-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.svc-sub-accordion.open .svc-sub-body { grid-template-rows: 1fr; }
.svc-sub-body > * { min-height: 0; overflow: hidden; }
.svc-sub-body .svc-flat-list { gap: 0; }
.svc-sub-body .service-item { border: 0; border-top: 1px solid var(--line-soft); border-radius: 0; }
.svc-sub-body .service-item.selected { box-shadow: inset 3px 0 0 var(--accent); }

.svc-more {
  display: block; width: 100%; height: 48px; margin-top: 4px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer;
}
.svc-more:hover { background: #fafafa; }
.svc-sub-body .svc-more { border-radius: 0; border: 0; border-top: 1px solid var(--line-soft); margin: 0; color: var(--accent); }

/* Professionals */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.staff-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 16px 22px; position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); cursor: pointer; text-align: center;
}
.staff-card:hover { border-color: #d4d4d4; }
.staff-card.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.staff-avatar {
  width: 80px; height: 80px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px;
}
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; }
.staff-any .staff-avatar { background: #f5f5f5; color: var(--ink-2); }
.staff-rating {
  position: absolute; top: 94px; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 0 8px; font-size: 0.78rem; font-weight: 700; box-shadow: var(--shadow);
}
.staff-card-name { font-weight: 600; margin-top: 6px; }
.staff-card-role { color: var(--muted); font-size: 0.82rem; }

.staff-change-bar {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px 0 6px; margin-bottom: 24px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; font-weight: 600;
}
.staff-change-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.staff-change-avatar img { width: 100%; height: 100%; object-fit: cover; }
.staff-popup-overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.staff-popup { background: #fff; border-radius: var(--radius-xl); padding: 24px; width: 100%; max-width: 640px; max-height: 84vh; overflow: auto; }
.staff-popup-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

/* Date strip */
.date-strip-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 14px; }
.date-strip-arrows { display: flex; gap: 4px; }
.ds-arrow { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.ds-arrow:hover:not(:disabled) { background: #e5e5e5; }
.ds-arrow:disabled { cursor: default; }
.date-strip-scroller { overflow: hidden; margin-bottom: 32px; }
.date-strip { display: flex; gap: 12px; }
.date-chip {
  flex: 1 1 0; min-width: 60px; height: 96px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; padding: 0;
}
.date-chip:hover { border-color: #c4c4c4; }
.date-chip-day, .date-chip-month { font-size: 0.82rem; color: var(--muted); }
.date-chip-num { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.date-chip.selected { background: var(--accent); border-color: var(--accent); color: #fff; }
.date-chip.selected .date-chip-day, .date-chip.selected .date-chip-month { color: rgba(255,255,255,0.85); }
.date-chip.blocked { background: transparent; color: #bdbdbd; }
.date-chip.blocked .date-chip-day, .date-chip.blocked .date-chip-month { color: #c9c9c9; }
.date-chip.blocked.selected { background: #e5e5e5; border-color: #d4d4d4; color: var(--muted); }
.date-chip-skeleton { flex: 1 1 0; min-width: 60px; height: 96px; border-radius: var(--radius-lg); background: #e9e9e9; animation: pulse 1.2s ease-in-out infinite; }
.date-chip-skeleton > * { display: none; }

.cal-anchor { position: relative; }
.calendar-popup {
  display: none; position: absolute; right: 0; top: 52px; z-index: 30; width: 320px; padding: 16px;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
}
.calendar-popup.active { display: block; }
.cal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.cal-month { font-weight: 700; }
.cal-nav-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cal-nav-btn:hover { background: #f0f0f0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day-label { text-align: center; font-size: 0.75rem; color: var(--muted); padding: 4px 0; }
.cal-cell { height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; font-size: 0.9rem; }
.cal-cell:hover:not(.disabled):not(.empty) { background: var(--accent-soft); }
.cal-cell.today { font-weight: 800; color: var(--accent); }
.cal-cell.selected { background: var(--accent); color: #fff; }
.cal-cell.disabled { color: #c9c9c9; cursor: default; }
.cal-cell.empty { cursor: default; }

/* Time slots */
#time-title { margin-bottom: 14px; }
.time-list { display: grid; gap: 12px; }
.time-slot {
  height: 64px; padding: 0 24px; text-align: left; border-radius: var(--radius); border: 1px solid var(--line); background: #fff;
  font-weight: 600; cursor: pointer; transition: border-color 0.15s;
}
.time-slot:hover { border-color: #c4c4c4; }
.time-slot.selected { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.time-slot.skeleton-shimmer { background: #e9e9e9; border-color: transparent; animation: pulse 1.2s ease-in-out infinite; cursor: default; }
@keyframes pulse { 50% { opacity: 0.55; } }
/* "That time was just taken": warning tint, no outline (#92400E on #FEF3C7 6.4:1) */
.slot-notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: #FEF3C7; color: #92400E; font-size: 0.94rem; line-height: 1.45; }
.slot-notice[hidden] { display: none; }
.time-empty { text-align: center; padding: 48px 16px; }
.time-empty-icon { font-size: 2.4rem; margin-bottom: 8px; }
.time-empty-title { font-weight: 700; font-size: 1.1rem; }
.time-empty p { margin: 4px 0 16px; }

/* Details form */
.details-form { max-width: 560px; }
.details-form .field-label:first-child { margin-top: 0; }

/* Summary card */
.flow-side { position: sticky; top: 84px; }
.summary-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 32px;
  display: flex; flex-direction: column; min-height: min(calc(100vh - 120px), 760px);
}
.sum-shop { display: flex; gap: 14px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.sum-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.sum-shop-info { min-width: 0; }
.sum-shop-name { font-weight: 700; }
.sum-shop-rating { display: flex; align-items: center; gap: 4px; font-size: 0.85rem; }
.sum-shop-address { font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sum-when { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.sum-when-row { display: flex; align-items: center; gap: 10px; }
.sum-when-row svg { flex-shrink: 0; color: var(--ink-2); }
.sum-items { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 16px; }
.sum-empty { margin: 0; }
.sum-item { display: flex; gap: 12px; align-items: flex-start; }
.sum-item-info { flex: 1; min-width: 0; }
.sum-item-name { font-weight: 500; }
.sum-item-meta { color: var(--muted); font-size: 0.85rem; }
/* The service's description, as the business wrote it (line breaks kept) */
.sum-item-desc { margin-top: 6px; color: var(--muted); font-size: 0.85rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.sum-item-price { font-size: 0.92rem; white-space: nowrap; }
.sum-item-remove { border: 0; background: none; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 2px; }
.sum-item-remove:hover { color: #b91c1c; }
.sum-total { display: flex; justify-content: space-between; font-weight: 700; padding: 20px 0; }
.flow-continue { margin-top: auto; }

.flow-bar { display: none; }

/* Success */
.success-overlay { display: none; position: fixed; inset: 0; z-index: 80; background: var(--page-grey); align-items: center; justify-content: center; padding: 24px 16px; overflow: auto; }
.success-overlay.active { display: flex; }
.success-content { width: 100%; max-width: 480px; background: #fff; border-radius: var(--radius-xl); padding: 32px; text-align: center; box-shadow: var(--shadow); }
.confirm-details { text-align: left; margin: 20px 0; border-top: 1px solid var(--line); }
.confirm-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 0.92rem; }
.confirm-row span:last-child { text-align: right; overflow-wrap: anywhere; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.success-actions { display: grid; gap: 10px; }
.btn-wa { background: #25D366; border-color: #25D366; color: #052E16; } /* dark text: 7.5:1 */
.btn-wa:hover { background: #1ebe5a; border-color: #1ebe5a; color: #052E16; }
body.booking-done .flow-bar { display: none !important; }

/* ── Booking flow: tablet/mobile ── */
@media (max-width: 960px) {
  .flow-wrap { grid-template-columns: minmax(0, 1fr); padding: 0 16px 120px; gap: 0; }
  .flow-header { padding: 10px 16px; }
  .flow-side { display: none; }
  .crumbs { display: none; }
  .flow-title { font-size: 2rem; margin-bottom: 20px; }
  .flow-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: center; justify-content: space-between; gap: 16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line);
  }
  .flow-bar.show { display: flex; }
  .flow-bar-total { font-weight: 800; font-size: 1.2rem; }
  .flow-bar-meta { font-size: 0.85rem; }
  .service-item { padding: 20px; }
  .pub-cat-arrow { display: none !important; }
  .date-strip-scroller { overflow-x: auto; scrollbar-width: none; margin: 0 -16px 28px; padding: 0 16px; }
  .date-strip-scroller::-webkit-scrollbar { display: none; }
  .date-chip, .date-chip-skeleton { flex: 0 0 64px; }
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .calendar-popup { position: fixed; left: 16px; right: 16px; top: 120px; width: auto; }
}

/* ══════════════════════════════════════════════════════════
   FLAT SURFACES
   No outlines: surfaces are told apart by fill. On the white
   shop page, cards and secondary controls are light grey; in the
   booking flow (grey page) they are white. A selected item turns
   solid indigo with white text, so the state is never shown by
   a border alone (at least 3:1 against its neighbours).
   ══════════════════════════════════════════════════════════ */
.btn, .icon-btn, .input, .count-badge, .pill, .svc-card, .team-rating, .book-card,
.pub-search-input, .pub-cat-tab, .pub-cat-arrow, .service-item, .add-btn, .svc-more,
.svc-sub-accordion, .svc-sub-count, .staff-card, .staff-rating, .staff-change-bar,
.date-chip, .calendar-popup, .time-slot, .summary-card, .center-card, .social-dot {
  border-color: transparent !important;
}

/* Cards on the white shop page are grey. Control fills (buttons,
   fields, chips, icon buttons) come from components.css. */
.svc-card, .book-card { background: var(--page-grey); }
.social-dot { background: var(--accent); }

/* Selected states: solid indigo, white text */
.service-item.selected { background: var(--accent-soft); }
.staff-card.selected, .time-slot.selected { background: var(--accent); color: #fff; }
.staff-card.selected * { color: #fff; }
.staff-card.selected .staff-rating, .staff-card.selected .staff-rating * { color: var(--ink); }
.date-chip.blocked.selected { background: #E5E5E5; color: var(--ink-2); }
.time-slot.selected * { color: #fff; }
.service-item:not(.selected):hover, .staff-card:not(.selected):hover,
.time-slot:not(.selected):hover, .date-chip:not(.selected):hover { background: #FAFAFA; }

/* ══════════════════════════════════════════════════════════
   FLAT + ACCESSIBLE LAYER (keep this last in the file)
   No shadows anywhere; keyboard focus always shows a 2px ring.
   ══════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-shadow: none !important;
  text-shadow: none !important;
}

:focus-visible {
  outline: 2px solid #4338CA !important;
  outline-offset: 2px !important;
  transition: none !important;
}

::placeholder {
  color: var(--muted);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
