/* =====================================================================
   BerberApp UI – mobile-first design system (layer over style.css)
   Light by default; dark only when the user picks it (data-theme="dark").
   style.css components read the same tokens (--bg, --gold, …), so they
   follow this palette; components below are restyled where needed.
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
html:root:not([data-theme="dark"]) {
  /* surfaces */
  --bg: #f6f6f3;          /* off-white page */
  --bg2: #ffffff;         /* cards, sheets */
  --bg3: #efefeb;         /* inputs, segmented track */
  --border: #e3e3de;
  --border-strong: #cfcfc8;
  /* text */
  --text: #1b1c20;        /* anthracite */
  --text-mid: #3c3e45;
  --text-dim: #60636b;    /* 5.9:1 on white */
  /* primary action = near-black navy */
  --primary: #14161c;
  --primary-hover: #2a2e38;
  --on-primary: #ffffff;
  /* accent = warm amber (text-safe shade + fill shade) */
  --gold: #b45309;        /* 5.0:1 on white – used for accent text/icons */
  --accent-fill: #f59e0b;
  --gold-dim: #fff4e0;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --gold-hover: #92400e;
  --on-gold: #ffffff;
  /* states */
  --success: #15803d;
  --success-bg: #e8f6ec;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --glass: rgba(255, 255, 255, 0.94);
  --shadow: 0 10px 30px rgba(20, 22, 28, 0.12);
  --shadow-sm: 0 1px 2px rgba(20, 22, 28, 0.06);
  --overlay: rgba(15, 17, 22, 0.5);
  color-scheme: light;
}

html:root[data-theme="dark"] {
  --bg: #0f1115;
  --bg2: #171a20;
  --bg3: #1f232b;
  --border: #2b3039;
  --border-strong: #3a404b;
  --text: #f2f3f5;
  --text-mid: #cfd2d8;
  --text-dim: #9aa0aa;
  --primary: #f2f3f5;
  --primary-hover: #ffffff;
  --on-primary: #111318;
  --gold: #fbbf24;
  --accent-fill: #f59e0b;
  --gold-dim: rgba(251, 191, 36, 0.12);
  --gold-glow: rgba(251, 191, 36, 0.25);
  --gold-hover: #fcd34d;
  --on-gold: #111318;
  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --glass: rgba(17, 19, 24, 0.94);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --overlay: rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

:root {
  /* spacing scale (4px base) */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 20px;
  --s6: 24px;
  --s8: 32px;
  --s10: 40px;
  --s12: 48px;
  /* radii: restrained, not pill-everything */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --tap: 44px;
  --nav-h: 56px;
  --tabbar-h: 64px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --trans: background-color 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---------- 2. Base ---------- */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo-text,
.stat-num,
.visit-title,
.qr-barber-name {
  font-family: var(--font);
  letter-spacing: -0.015em;
}

em {
  font-style: normal;
}

::-webkit-scrollbar-thumb {
  background: var(--border-strong);
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  padding: 0 var(--s4);
}

.hero-bg-grid {
  display: none;
}

.muted {
  color: var(--text-dim);
}

/* ---------- 3. Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-search,
.btn-outline {
  min-height: var(--tap);
  border-radius: var(--radius);
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0;
  justify-content: center;
  gap: var(--s2);
  transition: var(--trans);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary,
.btn-search {
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--primary);
  box-shadow: none;
}

.btn-primary:hover,
.btn-search:hover {
  background: var(--primary-hover);
  transform: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0 var(--s5);
}

.btn-secondary:hover {
  border-color: var(--text);
  color: var(--text);
  background: var(--bg2);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 0 var(--s4);
  min-height: 40px;
}

.btn-outline:hover {
  background: var(--bg3);
  color: var(--text);
}

.btn-primary:active,
.btn-secondary:active,
.btn-search:active,
.card-btn:active,
.tabbar-item:active,
.hero-cat:active,
.toggle-btn:active,
.sort-btn:active {
  transform: scale(0.97);
}

.btn-primary svg,
.btn-secondary svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ---------- 4. Navbar ---------- */
.navbar {
  background: var(--glass);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}

.nav-inner {
  height: var(--nav-h);
  padding: 0 var(--s4);
}

.logo {
  gap: var(--s2);
  min-height: var(--tap);
}

.logo-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--accent-fill);
  font-size: 16px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
}

.logo-text em {
  color: var(--gold);
}

.nav-links {
  gap: var(--s6);
}

.nav-links a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-mid);
}

.nav-links a:hover {
  color: var(--text);
}

.theme-toggle {
  width: var(--tap);
  height: var(--tap);
  background: transparent;
  border-color: var(--border);
  color: var(--text-mid);
}

/* Light (default) shows the moon, dark shows the sun. */
html:root:not([data-theme="dark"]) .theme-toggle .icon-sun {
  display: none;
}
html:root:not([data-theme="dark"]) .theme-toggle .icon-moon {
  display: block;
}
html:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
html:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.hamburger {
  width: var(--tap);
  height: var(--tap);
  align-items: center;
  justify-content: center;
}

/* ---------- 5. Section headings ---------- */
.section-label {
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  margin-bottom: var(--s2);
  font-size: 12px;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--gold);
}

.section-title {
  font-size: clamp(22px, 5.6vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--s2);
}

.section-sub {
  font-size: 15px;
  color: var(--text-dim);
}

/* ---------- 6. Hero (home) ---------- */
.hero {
  min-height: 0;
  padding: calc(var(--nav-h) + var(--s8)) var(--s4) var(--s8);
  gap: var(--s10);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  margin-bottom: var(--s4);
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg2);
  border-color: var(--border);
  color: var(--text-mid);
  font-size: 13px;
  letter-spacing: 0;
}

.hero-title {
  font-size: clamp(30px, 8.4vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: var(--s3);
}

.hero-title .gold {
  color: var(--gold);
}

.hero-subtitle {
  display: block;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-dim);
  margin-bottom: var(--s5);
  max-width: 460px;
}

/* Category: segmented control */
.hero-cats,
.category-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  width: 100%;
  max-width: 520px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--s4);
}

.hero-cat,
.category-toggle .toggle-btn {
  min-height: var(--tap);
  padding: 6px 4px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-mid);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  justify-content: center;
  box-shadow: none;
  transition: var(--trans);
  cursor: pointer;
}

.hero-cat.active,
.category-toggle .toggle-btn.active {
  background: var(--bg2);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

html:root[data-theme="dark"] .hero-cat.active,
html:root[data-theme="dark"] .category-toggle .toggle-btn.active {
  background: var(--primary);
  color: var(--on-primary);
}

.hero-cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--s2);
  margin-bottom: var(--s2);
  max-width: 520px;
}

.btn-locate {
  min-height: 54px;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(20, 22, 28, 0.18);
}

.btn-locate svg {
  color: var(--accent-fill);
}

.hero-manual {
  border: 0;
  background: none;
  min-height: var(--tap);
  color: var(--text);
  font-size: 15px;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--border-strong);
}

.hero-hint {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

.hero-stats {
  margin-top: var(--s6);
  gap: var(--s5);
}

.stat-num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  font-size: 13px;
  letter-spacing: 0;
}

/* Sponsor CTA card (desktop only) */
.hero-card-mock {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  animation: none;
  max-width: 340px;
}

.mock-pill--gold {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: transparent;
}

.mock-name {
  font-family: var(--font);
  font-weight: 700;
}

.mock-btn--primary,
a.mock-btn {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius);
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
}

.mock-scissors {
  display: none;
}

/* ---------- 7. Search (il / ilçe) ---------- */
.search-section {
  background: var(--bg2);
  border-color: var(--border);
  padding: var(--s8) 0 var(--s6);
  scroll-margin-top: var(--nav-h);
}

.search-box {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  margin: var(--s4) 0;
  gap: var(--s3);
  align-items: flex-end;
}

.select-group label {
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--text);
}

.select-wrap select,
.visit-form input,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
  min-height: 48px;
  font-family: var(--font);
  font-size: 16px; /* prevents iOS zoom */
  color: var(--text);
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
}

.select-wrap select {
  padding: 0 40px 0 14px;
}

.select-wrap select:focus,
.visit-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.select-wrap select:disabled {
  background: var(--bg3);
}

.btn-search {
  min-height: 48px;
  padding: 0 var(--s6);
}

.btn-near {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-near:hover {
  background: var(--bg3);
  color: var(--text);
}

/* List / map switch */
.view-toggle:not(.category-toggle) {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.view-toggle:not(.category-toggle) .toggle-btn {
  min-height: 40px;
  padding: 0 var(--s4);
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mid);
}

.view-toggle:not(.category-toggle) .toggle-btn.active {
  background: var(--bg2);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

/* ---------- 8. Results header / filters ---------- */
.results-section {
  padding: var(--s6) 0 var(--s10);
  scroll-margin-top: var(--nav-h);
}

.results-header {
  flex-direction: column;
  align-items: stretch;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.results-count {
  font-size: 15px;
  color: var(--text-mid);
}

.results-count strong {
  color: var(--text);
  font-size: 16px;
}

/* Filter chips scroll sideways on small screens instead of wrapping into a tall block. */
.results-sort {
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--s4) * -1);
  padding: 2px var(--s4);
  font-size: 14px;
  white-space: nowrap;
}

.results-sort::-webkit-scrollbar {
  display: none;
}

.results-sort > span {
  align-self: center;
  margin-left: var(--s2);
  color: var(--text-dim);
}

.sort-btn {
  flex: none;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg2);
  color: var(--text-mid);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
}

.sort-btn:hover {
  border-color: var(--text);
  color: var(--text);
}

.sort-btn.active,
.sort-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* ---------- 9. Business card ---------- */
.barber-grid {
  grid-template-columns: 1fr;
  gap: var(--s3);
}

.barber-card {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  min-width: 0;
}

.barber-card::before {
  display: none;
}

.barber-card:hover {
  transform: none;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.barber-card.sponsor {
  border-color: color-mix(in srgb, var(--accent-fill) 45%, var(--border));
  background: linear-gradient(180deg, var(--gold-dim), var(--bg2) 64px);
}

.card-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) var(--tap);
  gap: var(--s3);
  align-items: start;
}

.card-photo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  object-fit: cover;
  background: var(--bg3);
}

.monogram {
  display: grid;
  place-items: center;
  background: var(--bg3);
  color: var(--text-mid);
  font-weight: 700;
  font-size: 24px;
  border: 1px solid var(--border);
  user-select: none;
}

.card-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-badge-sponsor,
.barber-card.sponsor .card-badge-sponsor {
  position: static;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--accent-fill) 35%, transparent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin: 0 0 2px;
  box-shadow: none;
}

.card-name,
.barber-card .card-name {
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  padding: 0;
  color: var(--text);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-open-btn {
  all: unset;
  cursor: pointer;
  border-radius: 4px;
}

.card-open-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-size: 14px;
  color: var(--text-dim);
}

.card-meta .dot {
  color: var(--border-strong);
}

.rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.rating svg {
  width: 14px;
  height: 14px;
  fill: var(--accent-fill);
  stroke: none;
}

.rating small {
  color: var(--text-dim);
  font-size: 13px;
}

.card-dist {
  display: inline;
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.card-addr {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-addr.is-empty {
  font-style: italic;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.card-tags:empty {
  display: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
}

.status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.is-open {
  background: var(--success-bg);
  color: var(--success);
}

.status-pill.is-closed {
  background: var(--danger-bg);
  color: var(--danger);
}

.card-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 1px 8px;
  border-radius: 6px;
  background: var(--bg3);
  color: var(--text-mid);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
}

.card-verified svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: var(--success);
  stroke-width: 3;
}

/* Favourite toggle */
.card-fav-btn {
  position: static;
  width: var(--tap);
  height: var(--tap);
  margin: -8px -8px 0 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: var(--trans);
}

.card-fav-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.card-fav-btn:hover {
  background: var(--bg3);
  color: var(--text);
  transform: none;
}

.card-fav-btn.active {
  color: var(--accent-fill);
  background: transparent;
  border: 0;
}

.card-fav-btn.active svg {
  fill: var(--accent-fill);
  stroke: var(--accent-fill);
}

.card-fav-btn.pop svg {
  animation: fav-pop 0.35s var(--ease);
}

@keyframes fav-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.barber-card.is-favorite {
  border-color: var(--border);
}

/* Card actions: two main buttons + icon buttons on one row */
.card-actions {
  display: flex;
  gap: var(--s2);
  margin: 0;
}

.card-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 var(--s3);
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: var(--trans);
  -webkit-tap-highlight-color: transparent;
}

.card-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card-btn:hover {
  background: var(--bg3);
  border-color: var(--border-strong);
  color: var(--text);
  transform: none;
}

.card-btn.call {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.card-btn.call:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
}

.card-btn.route,
.card-btn.route:hover {
  background: var(--bg2);
  border-color: var(--border-strong);
  color: var(--text);
}

.card-btn.route:hover {
  background: var(--bg3);
}

.card-icon-btn {
  flex: 0 0 var(--tap);
  width: var(--tap);
  padding: 0;
}

.card-btn.whatsapp {
  background: var(--bg2);
  border-color: var(--border-strong);
  color: #128c4b;
}

html:root[data-theme="dark"] .card-btn.whatsapp {
  color: #4ade80;
}

.card-visit-btn {
  margin: 0;
}

/* Skeletons match the real card height (no layout shift). */
.skeleton-card {
  height: 150px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, var(--bg2) 0%, var(--bg3) 50%, var(--bg2) 100%);
  background-size: 200% 100%;
}

.empty-state {
  padding: var(--s10) var(--s4);
  text-align: center;
  color: var(--text-dim);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg2);
}

.empty-state .empty-icon {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--s3);
  border-radius: 50%;
  background: var(--bg3);
  color: var(--text-mid);
  font-size: 24px;
}

.empty-state .empty-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.empty-state h3 {
  font-family: var(--font);
  font-size: 18px;
  color: var(--text);
  margin-bottom: var(--s2);
}

.empty-state p {
  max-width: 420px;
  margin: 0 auto;
  font-size: 15px;
}

/* Pagination */
.pagination {
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: var(--tap);
  min-height: var(--tap);
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font);
  font-weight: 600;
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

/* Sponsors */
.sponsors-section {
  padding: var(--s6) 0 0;
}

.sponsor-grid {
  grid-template-columns: 1fr;
  gap: var(--s3);
}

/* ---------- 10. Map ---------- */
.map-view {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: none;
  background: var(--bg3);
}

.barber-marker-pin {
  background: var(--primary);
  color: var(--accent-fill);
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s var(--ease);
}

.leaflet-marker-icon:hover .barber-marker-pin,
.leaflet-marker-icon:focus .barber-marker-pin {
  transform: scale(1.15);
}

.map-view .leaflet-popup-content-wrapper {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.map-view .leaflet-popup-tip {
  background: var(--bg2);
}

.map-view .popup-card__title {
  font-family: var(--font);
  color: var(--text);
}

.map-view .popup-btn {
  min-height: var(--tap);
  border-radius: var(--radius);
  font-weight: 600;
}

.map-view .popup-btn--call {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.map-view .popup-btn--route {
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.map-view .marker-cluster-small,
.map-view .marker-cluster-medium,
.map-view .marker-cluster-large {
  background: color-mix(in srgb, var(--accent-fill) 35%, transparent);
}

.map-view .marker-cluster-small div,
.map-view .marker-cluster-medium div,
.map-view .marker-cluster-large div {
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font);
  font-weight: 700;
}

.map-locate-btn {
  min-height: var(--tap);
  border-radius: var(--radius);
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}

/* ---------- 11. Modals + detail sheet ---------- */
.modal-overlay {
  background: var(--overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: var(--s4);
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--s6);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-close {
  width: var(--tap);
  height: var(--tap);
  top: var(--s2);
  right: var(--s2);
  border-radius: 50%;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  z-index: 3;
}

.detail-modal {
  padding: 0;
  max-width: 520px;
}

.detail-cover {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--bg3);
}

.detail-cover--empty {
  display: grid;
  place-items: center;
  height: 112px;
  background: linear-gradient(135deg, var(--bg3), var(--gold-dim));
}

.detail-cover--empty .monogram {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--bg2);
  font-size: 28px;
}

.detail-content {
  padding: var(--s5) var(--s5) var(--s6);
}

.detail-kind {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--s1);
}

.detail-name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--s2);
  overflow-wrap: anywhere;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  margin-bottom: var(--s4);
}

.detail-src {
  color: var(--text-dim);
  font-size: 13px;
  margin-left: -4px;
}

.detail-addr {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: var(--s2);
  font-size: 15px;
  color: var(--text-mid);
  padding: var(--s3) 0;
  border-top: 1px solid var(--border);
}

.detail-addr svg,
.detail-block h3 svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--text-dim);
  stroke-width: 2;
  margin-top: 2px;
}

.detail-dist {
  margin-top: 2px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Call + directions: sticky at the bottom of the sheet so they stay in reach. */
.detail-cta {
  position: sticky;
  bottom: calc(var(--s6) * -1);
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  margin: var(--s2) calc(var(--s5) * -1) 0;
  padding: var(--s3) var(--s5) calc(var(--s3) + env(safe-area-inset-bottom));
  background: var(--glass);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.detail-cta > :only-child {
  grid-column: 1 / -1;
}

.detail-cta .btn-primary,
.detail-cta .btn-secondary {
  min-height: 50px;
  padding: 0 var(--s3);
}

.detail-phone {
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
  margin: var(--s2) 0 0;
  font-variant-numeric: tabular-nums;
}

.detail-block {
  padding: var(--s4) 0 0;
  margin-top: var(--s4);
  border-top: 1px solid var(--border);
}

.detail-block h3 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: var(--s2);
}

.hours-list {
  list-style: none;
  display: grid;
  gap: 2px;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hours-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--s3);
  padding: 5px 8px;
  border-radius: 6px;
  color: var(--text-mid);
}

.hours-list li.is-today {
  background: var(--bg3);
  color: var(--text);
  font-weight: 700;
}

.detail-price {
  margin-top: var(--s2);
  font-size: 14px;
  color: var(--text-mid);
}

.modal-services span {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--bg3);
  border: 0;
}

.modal-photos img {
  border-radius: var(--radius);
}

.detail-more {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--s2);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}

.detail-action {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: 0 var(--s3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--trans);
}

.detail-action:hover {
  background: var(--bg3);
}

.detail-action svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.modal-claim {
  display: block;
  margin-top: var(--s4);
  font-size: 14px;
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Visit (randevu) + QR modals */
.qr-card-label {
  color: var(--gold);
  letter-spacing: 0.06em;
}

.visit-title {
  font-size: 20px;
  font-weight: 800;
}

.visit-form label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  gap: 6px;
}

.visit-form input {
  padding: 0 12px;
}

.visit-form input[aria-invalid="true"] {
  border-color: var(--danger);
}

.field-error {
  margin: -4px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--danger);
}

.visit-form .btn-primary,
.visit-actions .btn-primary,
.visit-actions .btn-secondary,
.qr-actions .btn-primary,
.qr-actions .btn-secondary {
  min-height: 48px;
}

.qr-phone {
  color: var(--text);
}

/* ---------- 12. Saved visits (Randevularım) ---------- */
.visits-section {
  padding: var(--s8) 0 var(--s4);
  scroll-margin-top: var(--nav-h);
}

.visit-list {
  margin-top: var(--s4);
  gap: var(--s3);
}

.visit-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s4);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.visit-item.is-soon {
  border-color: var(--accent-fill);
  box-shadow: 0 0 0 1px var(--gold-glow);
}

.visit-item.is-past {
  opacity: 0.65;
}

.visit-date {
  display: grid;
  align-content: center;
  justify-items: center;
  height: 60px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  line-height: 1.1;
}

.visit-date b {
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.visit-date span {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-fill);
}

.visit-body {
  min-width: 0;
}

.visit-when {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.visit-item.is-soon .visit-when {
  color: var(--gold);
}

.visit-name {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.visit-meta {
  font-size: 14px;
  color: var(--text-dim);
}

.visit-item-actions {
  margin-top: var(--s3);
  gap: 6px;
}

.visit-item-actions button,
.visit-item-actions a {
  min-height: 40px;
  border-radius: var(--radius-sm);
  border-color: var(--border-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.visit-item-actions [data-visit-delete] {
  color: var(--danger);
}

/* ---------- 13. Favourites sheet ---------- */
.sheet-overlay {
  background: var(--overlay);
}

.sheet {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheet-up 0.22s var(--ease);
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.sheet-head h2 {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 800;
}

.sheet-close {
  width: var(--tap);
  height: var(--tap);
}

.fav-row {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--border);
}

.fav-mono {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 17px;
}

.fav-info strong {
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fav-info span {
  font-size: 13px;
  color: var(--text-dim);
}

.fav-acts {
  gap: 6px;
}

.fav-act {
  min-height: 40px;
  min-width: 40px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  padding: 0 10px;
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fav-act.call {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.fav-act.route {
  background: var(--bg2);
  border-color: var(--border-strong);
  color: var(--text);
}

.fav-act.remove {
  padding: 0;
  cursor: pointer;
  color: var(--accent-fill);
}

.fav-act.remove svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sheet-all {
  min-height: 48px;
}

/* ---------- 14. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s4) + env(safe-area-inset-bottom));
  z-index: 3000;
  max-width: min(92vw, 420px);
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--on-primary);
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}

.toast[data-tone="error"] {
  background: var(--danger);
  color: #fff;
}

.toast[data-tone="success"]::before {
  content: "✓ ";
  color: var(--accent-fill);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 15. Info sections (how, FAQ, CTA, cities, footer) ---------- */
.how-section {
  padding: var(--s10) 0;
}

.steps-grid {
  gap: var(--s3);
}

.step-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s5);
}

.step-card:hover {
  transform: none;
  border-color: var(--border-strong);
}

.step-num {
  color: var(--text-dim);
  font-family: var(--font);
}

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
}

.step-card p {
  font-size: 15px;
  color: var(--text-dim);
}

.cta-banner {
  padding: 0 0 var(--s8);
}

.cta-inner {
  background: var(--primary);
  color: var(--on-primary);
  border: 0;
  border-radius: var(--radius-lg);
}

.cta-inner h2 {
  font-size: 22px;
  color: var(--on-primary);
}

.cta-inner p {
  color: color-mix(in srgb, var(--on-primary) 75%, transparent);
}

.cta-inner .btn-primary {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: #1b1c20;
}

.faq-section details {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0 var(--s4);
  margin-bottom: var(--s2);
}

.faq-section summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.faq-section details p {
  padding-bottom: var(--s4);
  color: var(--text-dim);
  font-size: 15px;
}

.city-links a {
  color: var(--text-mid);
  border-radius: var(--radius-sm);
}

.city-links a:hover {
  color: var(--gold);
}

.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
}

.footer h4 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.footer a {
  color: var(--text-mid);
}

.footer a:hover,
.footer-contact a:hover {
  color: var(--gold);
}

/* ---------- 16. Mobile tab bar ---------- */
@media (max-width: 768px) {
  body.has-tabbar {
    padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  }

  body.has-tabbar .toast {
    bottom: calc(var(--tabbar-h) + var(--s3) + env(safe-area-inset-bottom));
  }

  .tabbar {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    min-height: var(--tabbar-h);
    background: var(--glass);
    border-top: 1px solid var(--border);
  }

  .tabbar-item {
    position: relative;
    flex-direction: column;
    min-height: 54px;
    gap: 2px;
    border-radius: var(--radius);
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 600;
    background: none;
    box-shadow: none;
  }

  .tabbar-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.9;
  }

  .tabbar-item.active {
    color: var(--text);
    background: none;
  }

  .tabbar-item.active svg {
    stroke-width: 2.3;
  }

  /* Active indicator: short bar above the icon. */
  .tabbar-item.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 24px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--accent-fill);
    transform: translateX(-50%);
  }

  /* "Yakınımda" is the primary action: same size as the others, emphasised icon. */
  .tabbar-item--primary {
    flex-direction: column;
    gap: 2px;
    background: none;
    color: var(--text);
    font-size: 11.5px;
    font-weight: 700;
    box-shadow: none;
  }

  .tabbar-item--primary svg {
    width: 34px;
    height: 34px;
    padding: 5px;
    margin: -5px 0 -3px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--accent-fill);
    stroke-width: 2.2;
  }

  .tabbar-item:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
  }

  .tabbar-badge {
    position: absolute;
    top: 4px;
    left: calc(50% + 6px);
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--accent-fill);
    color: #1b1c20;
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
  }

  .tabbar-badge[hidden] {
    display: none;
  }

  /* Full-height map between the navbar and the tab bar. */
  #map {
    height: calc(100dvh - var(--nav-h) - var(--tabbar-h) - 140px);
    min-height: 380px;
  }

  .map-view {
    margin: 0 calc(var(--s4) * -1);
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  /* Detail opens as a bottom sheet on phones. */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92dvh;
    animation: sheet-up 0.22s var(--ease);
    padding-bottom: calc(var(--s6) + env(safe-area-inset-bottom));
  }

  .detail-modal {
    padding-bottom: 0;
  }

  .detail-content {
    padding-bottom: 0;
  }

  .detail-cta {
    bottom: 0;
    margin-bottom: 0;
  }

  .detail-more {
    margin-bottom: var(--s5);
  }
}

/* ---------- 17. Mobile layout details ---------- */
@media (max-width: 768px) {
  .hero {
    text-align: left;
    padding: calc(var(--nav-h) + var(--s5)) var(--s4) var(--s6);
    align-items: stretch;
  }

  .hero-title {
    font-size: clamp(28px, 8.2vw, 36px);
    margin-bottom: var(--s2);
  }

  .hero-title br {
    display: none;
  }

  .hero-subtitle {
    display: block;
    font-size: 15px;
    margin-bottom: var(--s4);
  }

  .hero-badge {
    margin-bottom: var(--s3);
  }

  .hero-cats {
    display: grid;
    margin-bottom: var(--s3);
  }

  .hero-cat {
    padding: 6px 2px;
    font-size: 13.5px;
  }

  .hero-cta,
  .hero-stats {
    justify-content: flex-start;
  }

  .search-section {
    padding: var(--s6) 0 var(--s5);
  }

  .search-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s3);
    margin: var(--s3) 0 var(--s4);
  }

  .select-group {
    min-width: 0;
  }

  .btn-search,
  .btn-near {
    width: 100%;
    padding: 0 var(--s3);
  }

  .view-toggle:not(.category-toggle) {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .view-toggle:not(.category-toggle) .toggle-btn {
    justify-content: center;
  }

  .category-toggle {
    max-width: none;
    margin-top: var(--s3);
  }

  .barber-card {
    padding: 14px;
  }

  .how-section {
    padding: var(--s8) 0;
  }

  .cta-inner {
    padding: var(--s6);
    align-items: stretch;
  }

  .cta-inner .btn-primary {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--s2);
  }
}

@media (max-width: 380px) {
  .card-head {
    grid-template-columns: 52px minmax(0, 1fr) var(--tap);
    gap: 10px;
  }

  .card-photo {
    width: 52px;
    height: 52px;
  }

  .monogram.card-photo {
    font-size: 20px;
  }

  .card-btn {
    font-size: 14px;
    padding: 0 8px;
  }

  .hero-cat {
    font-size: 12.5px;
  }
}

/* ---------- 18. Tablet / desktop ---------- */
@media (min-width: 640px) {
  .barber-grid,
  .sponsor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s4);
  }

  .results-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .results-sort {
    margin: 0;
    padding: 2px 0;
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (min-width: 769px) {
  .container {
    padding: 0 var(--s6);
  }

  .hero {
    padding: calc(var(--nav-h) + var(--s12)) var(--s6) var(--s12);
    justify-content: space-between;
  }

  .hero-cta {
    flex-direction: row;
    align-items: center;
  }

  .btn-locate {
    padding: 0 var(--s6);
  }

  .search-box {
    flex-wrap: nowrap;
  }

  .modal {
    animation: modal-in 0.2s var(--ease);
  }

  .detail-cta {
    position: static;
    margin: var(--s2) 0 0;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
  }

  .tabbar {
    display: none;
  }
}

@media (min-width: 1024px) {
  .barber-grid,
  .sponsor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-title {
    font-size: 52px;
  }
}

/* ---------- 19. Motion preferences ---------- */
@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;
  }
}

/* ---------- 20. Fixes on top of style.css mobile rules ---------- */
@media (max-width: 768px) {
  .search-section {
    padding: var(--s3) 0 var(--s2);
  }

  /* İl | İlçe | search icon on one row; labels stay for screen readers. */
  .search-box {
    grid-template-columns: 1fr 1fr 48px;
    gap: var(--s2);
    padding: 0;
    margin: 0 0 var(--s3);
  }

  .search-box .select-group label {
    display: block;
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .search-box #searchBtn {
    width: 48px;
    height: 48px;
  }

  .results-section {
    padding-top: var(--s3);
  }
}

/* Cookie consent bar (injected by site.js) in the BerberApp palette. */
body .consent-bar {
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font);
}

body .consent-bar a {
  color: var(--accent-fill);
}

body .consent-actions button {
  border-radius: var(--radius);
  border-color: color-mix(in srgb, var(--on-primary) 35%, transparent);
}

body .consent-actions button[data-consent="granted"] {
  background: var(--accent-fill);
  border-color: var(--accent-fill);
  color: #1b1c20;
}

/* ---------- 21. Warm colour for actions (less black & white) ---------- */
html:root:not([data-theme="dark"]) {
  --primary: #c2410c;        /* burnt orange, 5.2:1 with white text */
  --primary-hover: #9a3412;
  --on-primary: #ffffff;
  --tint: #fff1e6;           /* soft orange surface for secondary buttons */
  --tint-border: #fbcfa8;
  --tint-text: #9a3412;
  --ink: #1f2a44;            /* deep navy for brand marks */
}

html:root[data-theme="dark"] {
  --primary: #f97316;
  --primary-hover: #fb923c;
  --on-primary: #1b1c20;
  --tint: rgba(249, 115, 22, 0.14);
  --tint-border: rgba(249, 115, 22, 0.35);
  --tint-text: #fdba74;
  --ink: #2a3655;
}

.btn-locate {
  box-shadow: 0 8px 20px rgba(194, 65, 12, 0.28);
}

.btn-locate svg,
.tabbar-item--primary svg {
  color: #fff;
}

.logo-icon,
.visit-date {
  background: var(--ink);
  color: #fff;
}

.visit-date span {
  color: #fdba74;
}

/* Secondary actions: tinted instead of white outline */
.card-btn,
.card-btn.route,
.card-btn.whatsapp,
.btn-secondary,
.btn-near,
.detail-action,
.fav-act,
.fav-act.route,
.visit-item-actions button,
.visit-item-actions a,
.map-view .popup-btn--route {
  background: var(--tint);
  border-color: var(--tint-border);
  color: var(--tint-text);
}

.card-btn:hover,
.card-btn.route:hover,
.btn-secondary:hover,
.btn-near:hover,
.detail-action:hover {
  background: color-mix(in srgb, var(--tint) 70%, var(--tint-border));
  border-color: var(--tint-border);
  color: var(--tint-text);
}

.card-btn.whatsapp {
  background: #e7f8ee;
  border-color: #b7e8c9;
  color: #128c4b;
}

/* Selected states use the warm tint too */
.hero-cat.active,
.category-toggle .toggle-btn.active,
.view-toggle:not(.category-toggle) .toggle-btn.active {
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: none;
}

.sort-btn.active,
.sort-btn[aria-pressed="true"] {
  background: var(--tint);
  border-color: var(--primary);
  color: var(--tint-text);
}

.monogram {
  background: var(--tint);
  border-color: var(--tint-border);
  color: var(--tint-text);
}

.tabbar-item.active {
  color: var(--primary);
}

.toast {
  background: var(--ink);
  color: #fff;
}

.cta-inner {
  background: var(--ink);
  color: #fff;
}

/* ---------- 22. Focus: one accent, results first, trust signals ---------- */

/* 2. Orange is reserved for the primary actions (Ara, Yakınımdakileri Göster).
      Secondary buttons: white with a thin border, orange icon only. */
.card-btn,
.card-btn.route,
.btn-secondary,
.btn-near,
.detail-action,
.fav-act,
.fav-act.route,
.visit-item-actions button,
.visit-item-actions a,
.map-view .popup-btn--route {
  background: var(--bg2);
  border-color: var(--border-strong);
  color: var(--text);
}

.card-btn:hover,
.card-btn.route:hover,
.btn-secondary:hover,
.btn-near:hover,
.detail-action:hover {
  background: var(--bg3);
  border-color: var(--border-strong);
  color: var(--text);
}

.card-btn:not(.call) svg,
.detail-action svg,
.btn-secondary svg {
  color: var(--primary);
}

.card-btn.whatsapp,
.card-btn.whatsapp svg {
  background: var(--bg2);
  color: #128c4b;
}

.card-btn.call,
.fav-act.call {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}

.visit-item-actions [data-visit-delete] {
  color: var(--danger);
}

/* Selection controls: white "raised" segment / navy chip, not orange. */
.hero-cat.active,
.category-toggle .toggle-btn.active,
.view-toggle:not(.category-toggle) .toggle-btn.active {
  background: var(--bg2);
  color: var(--text);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}

html:root[data-theme="dark"] .hero-cat.active,
html:root[data-theme="dark"] .category-toggle .toggle-btn.active,
html:root[data-theme="dark"] .view-toggle:not(.category-toggle) .toggle-btn.active {
  background: var(--border-strong);
  color: var(--text);
}

.sort-btn.active,
.sort-btn[aria-pressed="true"],
.page-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.tabbar-item.active {
  color: var(--text);
}

/* 3. Cards: category icon instead of a letter, rating up front. */
.cat-icon {
  display: grid;
  place-items: center;
  background: var(--tint);
  border: 1px solid var(--tint-border);
  color: var(--primary);
}

.cat-icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-cover--empty .cat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--bg2);
}

.card-score {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  margin-top: 1px;
}

.card-score .rating {
  font-size: 15px;
  gap: 4px;
}

.card-score .rating svg {
  width: 17px;
  height: 17px;
}

.card-score .rating b {
  font-weight: 800;
}

.card-score .rating small {
  font-size: 13.5px;
}

.card-score .card-dist {
  display: inline-flex;
  align-items: center;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--bg3);
  font-size: 13.5px;
  line-height: 1.6;
}

.card-meta {
  font-size: 13.5px;
}

/* 1. Location known: compact hero so the nearest businesses show on the first screen. */
@media (max-width: 768px) {
  body.has-location .hero {
    padding: calc(var(--nav-h) + var(--s3)) var(--s4) var(--s3);
  }

  body.has-location .hero-title {
    font-size: 20px;
    margin-bottom: var(--s2);
  }

  body.has-location .hero-subtitle,
  body.has-location .hero-manual,
  body.has-location .hero-hint,
  body.has-location .hero-badge {
    display: none;
  }

  body.has-location .hero-cats {
    margin-bottom: var(--s2);
  }

  body.has-location .btn-locate {
    min-height: 44px;
    font-size: 15px;
    box-shadow: none;
  }

  body.has-location .search-section {
    padding: var(--s2) 0 0;
  }

  body.has-location .results-section {
    padding-top: var(--s2);
  }

  body.has-location .results-header {
    margin-bottom: var(--s3);
  }
}
