:root {
  --bg: #f4fbff;
  --bg-gradient: linear-gradient(165deg, #f4fbff 0%, #e8f6fc 42%, #fff8f0 100%);
  --surface: #ffffff;
  --surface-2: #eef7fc;
  --border: #b8dce8;
  --border-light: #d4ebf4;
  --text: #0d2a3d;
  --text-soft: #2a4a5c;
  --muted: #5a7a8a;
  --accent: #04a5e1;
  --accent-light: #38bff0;
  --accent-dim: #0878b8;
  --accent-soft: rgba(4, 165, 225, 0.12);
  --gold: #f98a2a;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 24px rgba(4, 165, 225, 0.1);
  --shadow-card: 0 2px 16px rgba(13, 42, 61, 0.06);
  --badge-once-bg: #eef7fc;
  --badge-once-color: #2a4a5c;
  --badge-once-border: #d4ebf4;
  --badge-course-bg: rgba(4, 165, 225, 0.12);
  --badge-course-color: #0878b8;
  --badge-course-border: rgba(4, 165, 225, 0.22);
  --max: 720px;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  padding-bottom: 32px;
}

a { color: var(--accent-dim); text-decoration: none; }
a:hover { text-decoration: underline; }
.brand:hover { text-decoration: none; }

.section-head--sub { margin-bottom: 8px; }
.section-head--sub span { font-size: .85rem; color: var(--text); }
.modal__lead { margin: 12px 0; color: var(--muted); font-size: .9rem; }


.discovery-hero { margin-bottom: 20px; }
.discovery-hero h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 6px; }
.discovery-hero p { color: var(--muted); font-size: .92rem; }

.search-panel {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

.search-row { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 520px) {
  .search-row { flex-direction: row; }
  .search-row .field--grow { flex: 1; }
}

.field label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field input, .field select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px; gap: 8px;
}
.section-head h3 {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-dim); font-weight: 700;
}
.section-head span { font-size: .75rem; color: var(--muted); }

.card-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 480px) { .card-grid--services { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .card-grid--salons { grid-template-columns: repeat(2, 1fr); } }

.discovery-section { margin-bottom: 28px; }

.service-card, .salon-card, .branch-card {
  background: var(--surface); border: 1px solid var(--border-light);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column;
}

.service-card__img {
  width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--surface-2);
}
.service-card__img--fallback {
  background: linear-gradient(135deg, var(--accent-soft), var(--surface-2));
}
.service-card__body, .salon-card__body, .branch-card__body { padding: 12px 14px; flex: 1; }
.service-card h4, .salon-card h4, .branch-card h4 { font-size: .95rem; font-weight: 700; margin-bottom: 4px; }
.service-card__salons {
  font-size: .72rem;
  color: var(--accent-dim);
  font-weight: 600;
  margin-bottom: 4px;
}
.service-card__price { color: var(--gold); font-weight: 700; font-size: .9rem; }
.service-card__meta { font-size: .75rem; color: var(--muted); margin-top: 4px; }
.service-card__actions, .salon-card__actions {
  display: flex; gap: 8px; padding: 0 14px 14px;
}
.service-card__actions .btn, .salon-card__actions .btn { flex: 1; font-size: .8rem; padding: 10px; }

.salon-card__logo {
  width: 100%; aspect-ratio: 2/1; object-fit: cover; background: var(--surface-2);
}
.salon-card__logo-fallback {
  aspect-ratio: 2/1; display: grid; place-items: center;
  font-size: 2rem; font-weight: 800; color: #fff;
}
.salon-card__logo-fallback--lumiere { background: linear-gradient(135deg,#f093fb,#e91e8c); }
.salon-card__logo-fallback--ngoc-dung { background: linear-gradient(135deg,#7eb8a8,#4d9a86); }
.salon-card__logo-fallback--golden { background: linear-gradient(135deg,#e8c878,#c9a45c); }
.salon-card__logo-fallback--bloom { background: linear-gradient(135deg,#c9b8e8,#9b7fd4); }

.branch-card { cursor: pointer; transition: .15s; }
.branch-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.branch-card__salon { font-size: .72rem; color: var(--accent-dim); font-weight: 600; margin-bottom: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff; box-shadow: 0 4px 14px rgba(4, 165, 225, 0.28);
}
.btn-text {
  background: var(--surface-2); color: var(--accent-dim);
  border: 1px solid var(--border-light);
}

.search-results { margin-top: 8px; }
.search-results.hidden { display: none; }
.empty-hint { text-align: center; color: var(--muted); padding: 24px; font-size: .9rem; }

.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: .65rem; font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase; line-height: 1.2;
  border: 1px solid transparent;
}
.badge--once {
  background: var(--badge-once-bg, var(--surface-2));
  color: var(--badge-once-color, var(--text-soft));
  border-color: var(--badge-once-border, var(--border-light));
}
.badge--course {
  background: var(--badge-course-bg, var(--accent-soft));
  color: var(--badge-course-color, var(--accent-dim));
  border-color: var(--badge-course-border, var(--accent-soft));
}

.hidden { display: none !important; }

.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(13, 42, 61, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.overlay.show { opacity: 1; pointer-events: auto; }
@media (min-width: 560px) {
  .overlay { align-items: center; padding: 24px; }
}

.modal {
  background: var(--surface); width: 100%; max-width: 420px;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px; max-height: 90dvh; overflow-y: auto;
}
@media (min-width: 560px) {
  .modal { border-radius: var(--radius); }
}

.booking-sheet {
  max-width: 520px; max-height: min(92dvh, 720px);
  display: flex; flex-direction: column; padding: 0;
}
.booking-sheet__header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border-light);
}
.booking-sheet__header h2 { flex: 1; font-size: 1.05rem; margin: 0; color: var(--accent-dim); }
.btn-icon {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface-2);
  cursor: pointer; display: grid; place-items: center;
}
.service-detail__scroll { flex: 1; overflow-y: auto; }
.service-detail__hero { aspect-ratio: 16/9; background: var(--surface-2); }
.service-detail__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-detail__img--fallback { min-height: 180px; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); }
.service-detail__body { padding: 16px; }
.service-detail__price { font-size: 1.2rem; font-weight: 800; color: var(--gold); }
.service-detail__meta { font-size: .85rem; color: var(--muted); margin: 6px 0 12px; }
.service-detail__summary { font-size: .92rem; color: var(--text-soft); margin-bottom: 12px; }
.service-detail__section { margin-bottom: 14px; }
.service-detail__section h3 { font-size: .75rem; text-transform: uppercase; color: var(--accent-dim); margin-bottom: 6px; }
.service-detail__list { padding-left: 1.1rem; font-size: .88rem; color: var(--text-soft); }
.booking-sheet__footer { padding: 12px 16px 20px; border-top: 1px solid var(--border-light); }
.booking-sheet__footer .btn { width: 100%; }

.input-group { margin-bottom: 14px; }
.input-group label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 6px; }
.input-group input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 1rem;
}

.toast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 12px 20px; border-radius: var(--radius-sm); font-size: .88rem;
  z-index: 200; opacity: 0; pointer-events: none; transition: .3s;
  max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; }
.toast.error { border-color: #e53955; background: #fff0f2; color: #c62828; }
.toast.success { border-color: #28ae73; background: #e6f9f0; color: #1d8a5c; }
