:root {
  --gold: #C9A84C;
  --gold-dim: #A88D3F;
  --gold-soft: rgba(201, 168, 76, 0.12);
  --ink: #1A1812;
  --muted: #6B6556;
  --cream: #F2F0EB;
  --border: #EBE8E0;
  --canvas: #FFFFFF;
  --surface: #FAFAF8;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 12px rgba(26, 24, 18, 0.06);
  --shadow-md: 0 8px 32px rgba(26, 24, 18, 0.1);
  --shadow-search: 0 12px 40px rgba(26, 24, 18, 0.12);
  --container: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Tajawal', system-ui, sans-serif;
  background: var(--canvas);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 20px;
}

.page { min-height: 100vh; }

.hidden { display: none !important; }

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand img { height: 28px; width: auto; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}

.nav-link:hover { color: var(--ink); background: var(--cream); }

.nav-cta {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--gold);
  padding: 10px 18px;
  border-radius: var(--radius-pill);
}

.nav-cta:active { opacity: 0.92; }

@media (min-width: 640px) {
  .nav-link { display: inline-flex; }
}

/* —— Hero —— */
.hero {
  position: relative;
  padding: 48px 0 56px;
  background: var(--surface);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 720px;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero-lead {
  margin: 0 auto 32px;
  max-width: 560px;
  font-size: clamp(16px, 2.5vw, 18px);
  line-height: 1.65;
  color: var(--muted);
}

/* Search bar */
.search-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 680px;
  margin: 0 auto 20px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-search);
  overflow: hidden;
}

@media (min-width: 640px) {
  .search-bar {
    flex-direction: row;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 6px 6px 6px 0;
  }
}

.search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 20px 14px;
  text-align: start;
  cursor: text;
}

.search-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.search-field input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  padding: 0;
}

.search-field input::placeholder { color: #A8A296; font-weight: 500; }

.search-divider {
  display: block;
  width: auto;
  height: 1px;
  margin: 0;
  background: var(--border);
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .search-divider {
    width: 1px;
    height: 40px;
    margin: 0;
  }
  .search-field { padding: 10px 20px; }
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  padding: 16px 28px;
  border: none;
  border-radius: 0;
  background: var(--gold);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  width: 100%;
}

@media (min-width: 640px) {
  .search-btn {
    width: auto;
    margin: 0;
    padding: 14px 20px;
    border-radius: var(--radius-pill);
  }
  .search-btn span { display: none; }
}

.search-btn:active { opacity: 0.92; }

.live-stat {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.live-stat #counter {
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5D8A65;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

/* Search results */
.search-results {
  max-width: 680px;
  margin: 16px auto 0;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  text-align: start;
}

.search-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: inherit;
}

.search-result:last-child { border-bottom: none; }
.search-result:hover { background: var(--cream); }

.search-result-name {
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 2px;
}

.search-result-meta {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.search-result-rating {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-dim);
  white-space: nowrap;
}

.search-empty {
  padding: 18px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* Featured salons */
.featured-section {
  padding: 0 0 56px;
  background: var(--surface);
}

.featured-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
}

.featured-card {
  display: block;
  padding: 18px 20px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.featured-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-sm);
}

.featured-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.featured-name {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
}

.featured-meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.featured-rating {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--gold-dim);
}

.featured-skeleton {
  height: 110px;
  border-radius: var(--radius-lg);
  background: var(--cream);
  animation: pulse-skeleton 1.4s ease-in-out infinite;
}

@keyframes pulse-skeleton {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.review-card.is-loading {
  min-height: 200px;
  background: linear-gradient(90deg, var(--cream) 25%, #eceae4 50%, var(--cream) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* —— App promo —— */
.app-promo {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
}

.app-promo-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  text-align: center;
}

@media (min-width: 768px) {
  .app-promo-inner {
    flex-direction: row;
    text-align: start;
    gap: 48px;
    align-items: center;
  }
}

.qr-block {
  flex-shrink: 0;
  padding: 20px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.qr-img {
  width: 140px;
  height: 140px;
  border-radius: 8px;
}

.qr-caption {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.app-copy h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.app-copy p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 16px;
  max-width: 440px;
}

.app-available {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px !important;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

@media (min-width: 768px) {
  .store-row { justify-content: flex-start; }
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.store-badge-outline {
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

.btn-gold {
  background: var(--gold);
  color: #fff;
}

.btn-gold:active { opacity: 0.92; }

.btn-app-main { display: none; }

@media (max-width: 767px) {
  .btn-app-main { display: inline-flex; width: 100%; max-width: 280px; }
}

/* —— Reviews —— */
.reviews-section {
  padding: 64px 0;
  background: var(--surface);
}

.section-heading {
  margin: 0 0 28px;
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-heading-center { text-align: center; }

.section-sub {
  text-align: center;
  margin: -16px auto 36px;
  max-width: 520px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.reviews-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reviews-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 8px;
  flex: 1;
}

.reviews-track::-webkit-scrollbar { display: none; }

.review-card {
  flex: 0 0 min(320px, 85vw);
  scroll-snap-align: start;
  padding: 24px;
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.review-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 14px;
}

.review-stars .star {
  width: 16px;
  height: 16px;
  fill: var(--gold);
}

.review-title {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.review-text {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cream);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--gold-dim);
  flex-shrink: 0;
}

.review-name {
  font-size: 14px;
  font-weight: 800;
}

.review-loc {
  font-size: 13px;
  color: var(--muted);
}

.carousel-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--canvas);
  color: var(--ink);
  display: none;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.carousel-btn:hover { background: var(--cream); }

@media (min-width: 768px) {
  .carousel-btn { display: grid; }
}

/* —— Stats —— */
.stats-section {
  padding: 64px 0;
  background: var(--canvas);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; }
}

.stat-card {
  padding: 28px 20px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.stat-num {
  margin: 0 0 6px;
  font-size: clamp(28px, 5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.stat-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* —— Business —— */
.business-section {
  padding: 64px 0;
  background: var(--ink);
  color: #fff;
}

.business-inner {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 768px) {
  .business-inner { grid-template-columns: 1.4fr 1fr; }
}

.business-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.business-copy p {
  margin: 0 0 24px;
  font-size: 16px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
  max-width: 520px;
}

.business-rating {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.rating-label {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.rating-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}

.rating-stars .star {
  width: 22px;
  height: 22px;
  fill: var(--gold);
}

.rating-sub {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

/* —— Browse —— */
.browse-section {
  padding: 64px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.city-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.city-tabs::-webkit-scrollbar { display: none; }

.city-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--canvas);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.city-tab.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.city-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 24px;
  margin-bottom: 32px;
  min-height: 120px;
}

.city-link {
  font-size: 14px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}

.city-link:hover {
  color: var(--gold-dim);
  border-bottom-color: var(--gold-soft);
}

.city-link strong { color: var(--ink); font-weight: 700; }

.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.category-pill {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--canvas);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.category-pill:hover {
  border-color: var(--gold);
  color: var(--gold-dim);
  background: var(--gold-soft);
}

/* —— Footer —— */
.site-footer {
  padding: 48px 0 0;
  background: var(--canvas);
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  padding-bottom: 32px;
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-logo {
  height: 24px;
  width: auto;
  margin-bottom: 10px;
  opacity: 0.8;
}

.footer-tagline {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 260px;
}

.footer-col h3 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--ink);
  padding: 5px 0;
}

.footer-col a:hover { color: var(--gold-dim); }

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.footer-social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold-dim);
  background: var(--gold-soft);
}

.footer-phone {
  display: inline-block !important;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-dim) !important;
}

.footer-bottom {
  padding: 20px 0 calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

/* —— Toast —— */
.search-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 14px 22px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  max-width: calc(100vw - 32px);
  text-align: center;
}

html[dir="rtl"] .hero-content,
html[dir="rtl"] .section-heading-center,
html[dir="rtl"] .section-sub,
html[dir="rtl"] .business-rating {
  text-align: center;
}

html[dir="rtl"] .search-field { text-align: start; }

@media (min-width: 768px) {
  html[dir="rtl"] .app-promo-inner { text-align: start; }
}
