:root {
  --bg-dark: #080b12;
  --bg-card: #101624;
  --bg-card-hover: #172033;
  --border-color: #1e293b;
  --gold-primary: #f59e0b;
  --gold-light: #fbbf24;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
  --danger: #ef4444;
  --font-heading: 'Cinzel', serif;
  --font-body: 'Montserrat', sans-serif;
  --radius: 12px;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  overflow-x: hidden;
  width: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

a, button, input, select, textarea {
  touch-action: manipulation;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
}

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

.gold { color: var(--gold-primary); }

.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ШАПКА */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 11, 18, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-link {
  display: inline-block;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-main {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  line-height: 1.1;
}

.logo-sub {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--gold-primary);
  margin-top: 3px;
  text-transform: uppercase;
}

/* ДЕСКТОПНАЯ НАВИГАЦИЯ */
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--gold-primary);
}

.nav-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.nav-master-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #60a5fa !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  transition: all 0.2s;
}

.nav-master-btn:hover {
  background: #3b82f6;
  color: #fff !important;
}

.nav-admin-btn {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary) !important;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  transition: all 0.2s;
}

.nav-admin-btn:hover {
  background: var(--gold-primary);
  color: #000 !important;
}

/* МОБИЛЬНЫЕ КНОПКИ В ШАПКЕ */
.header-mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.mob-btn {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.mob-btn-master {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}

.mob-btn-admin {
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
}

/* МОБИЛЬНАЯ СТИКИ-НАВИГАЦИЯ */
.mobile-quick-nav {
  display: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 8px;
}

.mobile-quick-nav::-webkit-scrollbar {
  display: none;
}

.quick-nav-track {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: max-content;
}

.q-pill {
  background: #111726;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  white-space: nowrap;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.q-pill:hover, .q-pill:active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--gold-primary);
  color: #fff;
}

.q-pill-accent {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
  border-color: var(--gold-primary);
  color: var(--gold-light);
}

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  background: radial-gradient(circle at top right, #1a253d 0%, #080b12 70%);
  border-bottom: 1px solid var(--border-color);
  padding: 70px 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 840px;
}

.hero-badge {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-light);
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.1rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.hero-subtitle {
  font-size: 1.12rem;
  color: var(--text-muted);
  margin-bottom: 35px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* КНОПКИ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #000;
  box-shadow: 0 4px 15px var(--gold-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
}

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

.btn-gold:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: 0.84rem; }

/* СЕКЦИИ */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 45px; }
.section-tag {
  color: var(--gold-primary);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  margin-top: 6px;
  color: #fff;
}
.section-desc { color: var(--text-muted); margin-top: 8px; font-size: 1.05rem; }

/* ТАБЫ УСЛУГ */
.service-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.srv-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.srv-tab-btn.active, .srv-tab-btn:hover {
  background: linear-gradient(135deg, #d4af37 0%, #f6e27a 50%, #d4af37 100%);
  color: #111;
  border-color: #d4af37;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
  font-weight: 700;
}

/* СЕТКА УСЛУГ */
.price-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 24px;
}

.price-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.price-img-wrap {
  position: relative;
  height: 180px;
  background: #141c2e;
}

.price-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.price-cat-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.8);
  border: 1px solid var(--gold-primary);
  color: var(--gold-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.price-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.price-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.price-title { font-size: 1.1rem; color: #fff; }
.price-cost { font-size: 1.3rem; font-weight: 800; color: var(--gold-primary); }
.price-dur { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 10px; }
.price-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 18px; line-height: 1.5; }

/* МАСТЕРА — ИДЕАЛЬНОЕ ВЫРАВНИВАНИЕ И БЕЗ ИСКАЖЕНИЯ ФОТО */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 1240px;
  margin: 0 auto;
  gap: 24px;
  align-items: stretch;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.team-photo-wrap {
  position: relative;
  height: 330px;
  background: #111726;
  overflow: hidden;
}

.team-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; /* Идеальное центрирование лиц и причесок мастеров */
  display: block;
  background-color: #111726;
}

.team-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.8);
  color: var(--gold-light);
  border: 1px solid var(--gold-primary);
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.8rem;
}

.team-exp-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(16, 22, 36, 0.9);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
}

.team-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.team-name { font-size: 1.25rem; color: #fff; margin-bottom: 4px; }
.team-role { color: var(--gold-primary); font-weight: 600; font-size: 0.88rem; margin-bottom: 10px; }
.team-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
  flex-grow: 1;
}

.team-spec-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.spec-chip {
  background: #0d1322;
  border: 1px solid var(--border-color);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.team-actions {
  margin-top: auto;
  padding-top: 10px;
}

.team-actions .btn {
  width: 100%;
}

/* ПОРТФОЛИО ДО / ПОСЛЕ — ИДЕАЛЬНОЕ ВЫРАВНИВАНИЕ */
.portfolio-landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
  align-items: stretch;
}

.landing-work-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-photos-split {
  display: flex;
  height: 220px;
  position: relative;
}

.photo-box {
  flex: 1;
  position: relative;
}

.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-label {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-after {
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
}

.work-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.work-cat-tag { font-size: 0.8rem; color: var(--gold-primary); margin-bottom: 6px; }
.work-card-title { font-size: 1.05rem; color: #fff; margin-bottom: 8px; }
.work-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.4;
  flex-grow: 1;
}

.work-card-body .btn {
  margin-top: auto;
}

/* ВИДЖЕТ БРОНИРОВАНИЯ */
section[id], #booking, #services, #masters, #portfolio, #contacts {
  scroll-margin-top: 75px;
}

.booking-section { background: #07090f; padding: 80px 0; }
.booking-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.6);
  scroll-margin-top: 75px;
}

.wizard-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
}

.step-item { display: flex; align-items: center; gap: 10px; opacity: 0.45; }
.step-item.active { opacity: 1; }
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.step-item.active .step-num {
  background: var(--gold-primary);
  color: #000;
  box-shadow: 0 0 12px var(--gold-glow);
}
.step-label { font-weight: 600; font-size: 0.92rem; }
.step-line { flex: 1; height: 2px; background: var(--border-color); margin: 0 15px; }

.wizard-content { min-height: 320px; }
.wizard-content.hidden { display: none; }

.step-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.step-title { font-size: 1.3rem; color: #fff; margin-bottom: 16px; }

.wizard-cat-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.w-chip {
  background: #0a0e17;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.w-chip.active, .w-chip:hover {
  background: var(--gold-primary);
  color: #000;
  border-color: var(--gold-primary);
}

.selected-service-banner {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid var(--gold-primary);
  padding: 12px 18px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  color: #fff;
}

.btn-change-inline {
  background: transparent;
  border: 1px solid var(--gold-primary);
  color: var(--gold-light);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-change-inline:hover {
  background: var(--gold-primary);
  color: #000;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.service-select-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #0a0e17;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.service-select-card:hover { border-color: rgba(245, 158, 11, 0.5); }
.service-select-card.selected { border-color: var(--gold-primary); background: rgba(245, 158, 11, 0.08); }

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.card-cat-pill {
  font-size: 0.72rem;
  background: #1e293b;
  padding: 2px 8px;
  border-radius: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  display: inline-block;
}

.card-check { display: none; color: var(--gold-primary); font-weight: 900; font-size: 1.2rem; }
.service-select-card.selected .card-check, .master-select-card.selected .card-check { display: block; }

.masters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.master-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #0a0e17;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  opacity: 1 !important;
  transition: all 0.2s ease;
}

.master-select-card:hover {
  border-color: rgba(245, 158, 11, 0.6);
  background: #0f1523;
}

.master-select-card.selected {
  border-color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 16px var(--gold-glow);
}

.master-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border-color); }
.any-avatar { display: flex; align-items: center; justify-content: center; font-size: 1.5rem; background: #131a29; border-color: var(--gold-primary); }
.master-name { font-weight: 700; color: #fff; }
.master-role { font-size: 0.8rem; color: var(--gold-primary); }
.master-rating { font-size: 0.75rem; color: var(--text-muted); }

.alert-empty {
  margin-top: 14px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--danger);
  border-radius: 8px;
  color: #fca5a5;
  font-size: 0.88rem;
  text-align: center;
}

.card-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 700;
  opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s;
  margin-left: auto;
}
.master-select-card.selected .card-arrow {
  display: none;
}

/* ДАТА И СЛОТЫ */
.datetime-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  margin-bottom: 28px;
  width: 100%;
}

.date-picker-box, .slots-box {
  min-width: 0;
  max-width: 100%;
}

.date-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.date-selected-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 2px 10px;
  border-radius: 12px;
}

.cal-days-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 10px 2px;
  margin: 6px 0 8px 0;
}
.cal-days-scroll::-webkit-scrollbar { display: none; }

.cal-day-tile {
  flex: 0 0 62px;
  min-width: 62px;
  height: 70px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.cal-day-tile .cal-day-weekday {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.cal-day-tile .cal-day-number {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}
.cal-day-tile .cal-day-month {
  font-size: 0.62rem;
  color: var(--text-muted);
}
.cal-day-tile:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(255, 255, 255, 0.08);
}
.cal-day-tile.active {
  background: linear-gradient(135deg, #d4af37 0%, #f6e27a 50%, #d4af37 100%);
  border-color: #d4af37;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
  transform: translateY(-2px);
}
.cal-day-tile.active .cal-day-weekday,
.cal-day-tile.active .cal-day-number,
.cal-day-tile.active .cal-day-month {
  color: #111;
  font-weight: 800;
}
.cal-day-tile:active {
  transform: scale(0.95);
}

.slots-loading-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 16px;
  color: var(--gold-light);
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(10, 14, 23, 0.7);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 8px;
}

.spinner-gold-sm {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.date-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; }

.slots-header { display: flex; justify-content: space-between; align-items: center; }
.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.slot-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 11px 0;
  text-align: center;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  min-height: 44px;
  touch-action: manipulation;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slot-btn:hover:not(:disabled) {
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  background: rgba(245, 158, 11, 0.08);
}
.slot-btn.selected {
  background: linear-gradient(135deg, #d4af37 0%, #f6e27a 50%, #d4af37 100%) !important;
  color: #000 !important;
  border-color: #d4af37 !important;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.45);
  font-weight: 800;
}
.slot-btn:disabled {
  opacity: 0.22;
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.04);
  color: #64748b;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot-btn:active:not(:disabled) {
  transform: scale(0.95);
}

/* ШАГ 4 */
.summary-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 24px; }
.booking-summary-card { background: #0a0e17; border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 12px; font-size: 0.95rem; }
.summary-divider { height: 1px; background: var(--border-color); margin: 16px 0; }
.total-price { color: var(--gold-light); font-size: 1.3rem; font-weight: 800; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.form-input {
  width: 100%;
  background: #0a0e17;
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  outline: none;
}
.form-input:focus { border-color: var(--gold-primary); }
.form-policy { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.4; }

.step-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

/* СЕКЦИЯ КОНТАКТОВ */
.contacts-section {
  background: #090c14;
  border-top: 1px solid var(--border-color);
  padding: 80px 0;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
}

.contact-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}

.contact-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.contact-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.contact-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.gold-link {
  color: var(--gold-primary);
  text-decoration: none;
}

.gold-link:hover {
  text-decoration: underline;
}

.contacts-footer-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* МОДАЛКА */
.modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal.hidden { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  z-index: 2;
  background: #141c2e;
  border: 1px solid var(--gold-primary);
  border-radius: 16px;
  padding: 36px;
  max-width: 460px;
  width: 100%;
  text-align: center;
}
.modal-icon { font-size: 3rem; margin-bottom: 12px; }
.modal-title { font-family: var(--font-heading); color: #fff; font-size: 1.4rem; margin-bottom: 8px; }
.modal-text { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
.modal-details { background: #0a0e17; border-radius: 8px; padding: 16px; text-align: left; font-size: 0.9rem; margin-bottom: 24px; }

/* ФУТЕР */
.footer {
  background: #05070a;
  border-top: 1px solid var(--border-color);
  padding: 30px 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-cabinet-links {
  display: flex;
  gap: 12px;
}

.footer-cab-btn {
  background: #101624;
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-primary);
  transition: all 0.2s;
}

.footer-cab-btn:hover {
  background: var(--gold-primary);
  color: #000;
}

.footer-copyright {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ПЛАВАЮЩАЯ КНОПКА ЗАПИСИ ДЛЯ СМАРТФОНОВ (УМНАЯ ЛОГИКА) */
.mobile-floating-booking-btn {
  display: none;
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 999;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
  color: #000;
  text-align: center;
  padding: 15px 20px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 0.98rem;
  box-shadow: 0 8px 30px rgba(245, 158, 11, 0.45);
  letter-spacing: 0.5px;
  text-decoration: none;
}

/* ===================================================
   📱 МОБИЛЬНАЯ ЭКОСИСТЕМА (MOBILE-FIRST NATIVE APP UX)
   =================================================== */

/* Подсказка свайпа */
.mobile-swipe-hint {
  display: none;
  font-size: 0.78rem;
  color: var(--gold-light);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 20px;
  padding: 4px 14px;
  margin: 10px auto 0 auto;
  width: fit-content;
  animation: hintPulse 2s infinite ease-in-out;
}

@keyframes hintPulse {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-4px); }
}

/* НАТИВНЫЙ BOTTOM APP BAR */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(13, 18, 31, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45);
  z-index: 1000;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 4px);
  justify-content: space-around;
  align-items: center;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
  min-width: 54px;
  min-height: 48px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  touch-action: manipulation;
  cursor: pointer;
}

.m-nav-item:active {
  transform: scale(0.92);
}

.m-nav-item.active {
  color: var(--gold);
}

.m-nav-icon {
  font-size: 1.25rem;
  line-height: 1.2;
  margin-bottom: 2px;
}

.m-nav-label {
  font-size: 0.65rem;
  letter-spacing: 0.3px;
}

/* Центральная акцентная кнопка записи */
.m-nav-booking-btn {
  position: relative;
  top: -14px;
}

.m-nav-booking-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45), 0 0 0 4px rgba(13, 18, 31, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #000;
  margin-bottom: 2px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.m-nav-booking-btn:active .m-nav-booking-circle {
  transform: scale(0.9);
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ (МЕДИА-ЗАПРОСЫ) */
@media (max-width: 900px) {
  body {
    padding-bottom: calc(95px + env(safe-area-inset-bottom, 20px)) !important;
  }

  .nav { display: none; }
  .header-mobile-actions { display: flex; }
  .mobile-bottom-bar { display: flex; }
  .mobile-swipe-hint { display: block; }
  .mobile-quick-nav { display: none; }

  /* ХЕДЕР */
  .header {
    padding: 10px 0;
  }
  .logo-main {
    font-size: 1.15rem;
  }
  .logo-sub {
    font-size: 0.6rem;
  }
  .header-mobile-actions {
    gap: 6px;
  }
  .mob-btn {
    padding: 6px 10px;
    font-size: 0.76rem;
  }

  /* HERO */
  .hero {
    padding: 40px 0 35px 0;
    min-height: auto;
  }
  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    margin-bottom: 12px;
  }
  .hero-title {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 12px;
  }
  .hero-subtitle {
    font-size: 0.88rem;
    line-height: 1.45;
    margin-bottom: 20px;
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .hero-actions .btn-hero-main {
    width: 100%;
    padding: 14px 20px;
    font-size: 1rem;
    font-weight: 700;
  }
  .hero-sub-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }
  .hero-sub-actions .btn {
    padding: 10px 8px;
    font-size: 0.8rem;
    text-align: center;
    white-space: nowrap;
  }

  /* СЕКЦИИ И ЗАГОЛОВКИ */
  .section {
    padding: 36px 0;
  }
  .section-tag {
    font-size: 0.72rem;
  }
  .section-title {
    font-size: 1.45rem;
    margin-bottom: 6px;
  }
  .section-desc {
    font-size: 0.85rem;
    margin-bottom: 18px;
  }

  /* КАТАЛОГ УСЛУГ НА МОБИЛЬНОМ: 2 КОМПАКТНЫХ РЯДА БЕЗ СКРОЛЛА */
  .service-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 6px;
    margin-bottom: 20px;
    overflow-x: visible;
    padding-bottom: 0;
  }
  .service-tabs::-webkit-scrollbar { display: none; }
  .srv-tab-btn {
    white-space: nowrap;
    flex: 0 1 auto;
    min-height: 40px;
    padding: 8px 13px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    touch-action: manipulation;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .srv-tab-btn.active {
    background: linear-gradient(135deg, #d4af37 0%, #f6e27a 50%, #d4af37 100%);
    color: #111;
    border-color: #d4af37;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.35);
    font-weight: 700;
  }
  .srv-tab-btn:active {
    transform: scale(0.96);
  }

  /* КОМПАКТНЫЙ МОБИЛЬНЫЙ СПИСОК УСЛУГ ВМЕСТО ОГРОМНЫХ КАРТОЧЕК */
  .price-list-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .price-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    gap: 12px;
    border-radius: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
  }

  .price-img-wrap {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
  }

  .price-cat-badge {
    display: none;
  }

  .price-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .price-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: #111726;
  }

  .price-body {
    padding: 0;
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .price-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 2px;
  }

  .price-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: normal;
    word-break: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
  }

  .price-cost {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--gold-primary);
    white-space: nowrap;
    flex-shrink: 0;
  }

  .price-dur {
    font-size: 0.72rem;
    color: var(--text-muted);
  }

  .price-desc {
    display: none;
  }

  .price-body .btn-gold {
    align-self: flex-start;
    padding: 6px 14px;
    font-size: 0.76rem;
    margin-top: 4px;
    border-radius: 6px;
    width: auto;
  }

  /* ГОРИЗОНТАЛЬНЫЕ СВАЙП-КАРУСЕЛИ ДЛЯ МАСТЕРОВ И ПОРТФОЛИО */
  .mobile-snap-slider {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 6px 16px 28px 16px !important;
    margin: 0 -16px;
    scrollbar-width: none;
  }
  .mobile-snap-slider::-webkit-scrollbar { display: none; }

  .mobile-snap-slider .team-card {
    flex: 0 0 80%;
    max-width: 300px;
    scroll-snap-align: center;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
  }
  .mobile-snap-slider .team-photo-wrap {
    height: 195px;
  }
  .mobile-snap-slider .team-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .mobile-snap-slider .team-name {
    font-size: 1.1rem;
    margin-bottom: 2px;
  }
  .mobile-snap-slider .team-role {
    font-size: 0.78rem;
    margin-bottom: 4px;
  }
  .mobile-snap-slider .team-bio {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mobile-snap-slider .team-spec-tags {
    gap: 4px;
    margin-bottom: 10px;
  }
  .mobile-snap-slider .spec-chip {
    font-size: 0.68rem;
    padding: 2px 7px;
    white-space: nowrap;
  }
  .mobile-snap-slider .team-actions .btn {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  .mobile-snap-slider .landing-work-card {
    flex: 0 0 82%;
    max-width: 310px;
    scroll-snap-align: center;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
  }
  .mobile-snap-slider .work-photos-split {
    height: 160px;
  }
  .mobile-snap-slider .work-card-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  .mobile-snap-slider .work-cat-tag {
    font-size: 0.7rem;
    margin-bottom: 2px;
  }
  .mobile-snap-slider .work-card-title {
    font-size: 0.94rem;
    margin-bottom: 4px;
    line-height: 1.25;
  }
  .mobile-snap-slider .work-card-desc {
    font-size: 0.76rem;
    line-height: 1.35;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .mobile-snap-slider .landing-work-card .btn {
    padding: 9px 12px;
    font-size: 0.82rem;
  }

  /* ВИДЖЕТ БРОНИРОВАНИЯ (WIZARD) */
  .booking-card {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .wizard-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
  }
  .step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }
  .step-num {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
  }
  .step-label {
    font-size: 0.68rem;
  }
  .step-line {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.1);
    margin: 0 4px;
    margin-bottom: 12px;
  }

  .wizard-cat-chips {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 6px;
    padding-bottom: 6px;
    flex-wrap: nowrap;
    margin-top: 8px;
  }
  .w-chip {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.76rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
  }
  .service-select-card {
    padding: 10px 12px;
  }

  /* УЛЬТРА-КОМПАКТНЫЕ КАРТОЧКИ МАСТЕРОВ (56-60px) НА МОБИЛЬНОМ */
  .masters-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
  }
  .master-select-card {
    padding: 8px 12px;
    min-height: 56px;
    gap: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  .master-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
  }
  .any-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 1.25rem;
  }
  .master-info {
    flex: 1;
    min-width: 0;
  }
  .master-name {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .master-role {
    font-size: 0.74rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .master-rating {
    font-size: 0.68rem;
    line-height: 1.2;
  }
  .master-select-card .card-arrow {
    font-size: 1.15rem;
    color: var(--text-muted);
    opacity: 0.6;
    margin-left: auto;
  }
  .master-select-card.selected .card-arrow {
    display: none;
  }
  .master-select-card.selected .card-check {
    margin-left: auto;
  }

  .datetime-layout, .summary-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    width: 100%;
  }

  /* СЛОТЫ: АККУРАТНАЯ СЕТКА 4 В РЯД */
  .slots-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
  }
  .slot-btn {
    min-height: 44px;
    font-size: 0.85rem;
    padding: 8px 0;
    border-radius: 8px;
    width: 100%;
  }

  /* ГОРИЗОНТАЛЬНАЯ ЛЕНТА-КАЛЕНДАРЬ НА МОБИЛЬНОМ */
  .cal-days-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px 2px;
    margin: 4px 0 8px 0;
  }
  .cal-day-tile {
    flex: 0 0 58px;
    min-width: 58px;
    height: 66px;
    border-radius: 12px;
  }

  /* СЕКЦИЯ БРОНИРОВАНИЯ НА МОБИЛЬНОМ */
  .booking-section {
    padding: 24px 0 36px 0 !important;
  }
  .booking-section .section-header {
    margin-bottom: 12px;
  }
  .booking-section .section-title {
    font-size: 1.35rem;
    margin-bottom: 4px;
  }
  .booking-section .section-desc {
    font-size: 0.8rem;
    margin-bottom: 12px;
  }

  .step-footer {
    position: static;
    background: transparent;
    padding: 16px 0 4px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 16px;
    flex-direction: column-reverse;
    gap: 8px;
    box-shadow: none;
  }
  .step-footer .btn {
    width: 100%;
    min-height: 46px;
    font-size: 0.95rem;
    font-weight: 700;
  }
  #step-4 .step-footer {
    position: static;
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    box-shadow: none;
  }

  /* КОНТАКТЫ */
  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .contacts-footer-actions {
    flex-direction: column;
    gap: 8px;
  }
  .contacts-footer-actions .btn {
    width: 100%;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 14px;
  }

  .footer {
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 20px));
  }
}
