/* ============================================
   КАТАЛОГ МАСТЕРОВ
   Используем CSS-переменные из themes.css
   Mobile-first подход
   ============================================ */

/* --- ОБЩИЕ --- */

.catalog-page {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.catalog-header {
  padding: 20px 0 12px;
}

.catalog-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px 0;
  text-align: center;
}

/* --- ФИЛЬТРЫ --- */

.catalog-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 24px;
}

.filter-group {
  flex: 1 1 100%;
  min-width: 180px;
  max-width: 400px;
}

.filter-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}

.catalog-select {
  width: 100%;
}

/* --- КАТЕГОРИИ ИКОНКИ --- */

.catalog-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 0 24px;
  width: 100%;
}

.category-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.category-chip:hover,
.category-chip:active {
  background: var(--bg-card-hover);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
}

.category-name {
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.category-count {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* --- СЕКЦИИ КАТЕГОРИЙ --- */

.catalog-section {
  margin-bottom: 28px;
}

.catalog-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0 4px;
}

.catalog-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.catalog-section-link {
  font-size: 0.875rem;
  color: var(--accent-primary);
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: opacity 0.2s;
}

.catalog-section-link:hover {
  opacity: 0.7;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
}

.section-title h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0;
}

.section-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}

.section-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.section-link:hover {
  opacity: 0.7;
}

/* --- ГОРИЗОНТАЛЬНЫЙ СВАЙП --- */

.catalog-swiper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 12px;
  padding: 0 16px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.catalog-swipe {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 16px;
  scrollbar-width: none;
}

.catalog-swipe::-webkit-scrollbar {
  display: none;
}

.catalog-card {
  flex: 0 0 160px;
  scroll-snap-align: start;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.catalog-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.catalog-card-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.catalog-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a574 0%, #e8c9a0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-card-avatar-placeholder span {
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  line-height: 1;
}

.catalog-card-info {
  width: 100%;
  min-width: 0;
}

.catalog-card-name {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-card-specialty {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-card-district {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.catalog-card-district .icon-xs {
  width: 10px;
  height: 10px;
}

.catalog-card-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-wrap: wrap;
}

.rating-stars {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.rating-stars .icon-xs {
  width: 12px;
  height: 12px;
}

.rating-stars .icon-xs.filled {
  color: #f5a623;
  fill: #f5a623;
}

.rating-count {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.rating-new {
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-style: italic;
}

.catalog-swiper::-webkit-scrollbar {
  display: none;
}

.swiper-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 200px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- КАРТОЧКА МИНИ (в свайпе) --- */

.master-card-mini {
  flex: 0 0 260px;
  scroll-snap-align: start;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.master-card-mini:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.master-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-secondary);
}

.master-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.master-card-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.master-card-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-card-specialty {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.master-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-primary);
  margin-top: 4px;
}

.master-card-rating .icon-sm {
  color: #f5a623;
  fill: #f5a623;
}

.master-card-rating .text-muted {
  color: var(--text-muted);
}

.master-card-location {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.master-card-btn {
  margin-top: 10px;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  padding: 8px 0;
  border-radius: 10px;
}

/* --- КАРТОЧКА ПОЛНАЯ (на странице категории) --- */

.masters-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px;
}

.master-card-full {
  display: flex;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.master-card-full:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.master-card-full-photo {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.master-card-full-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #d4a574 0%, #e8c9a0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-placeholder span {
  font-size: 1.5em;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}

.master-card-full-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.master-card-full-info .master-card-name {
  font-size: 1rem;
}

.master-card-full-info .master-card-btn {
  margin-top: 8px;
  align-self: flex-start;
  width: auto;
  padding: 7px 20px;
}

/* --- СТРАНИЦА КАТЕГОРИИ --- */

.category-header {
  padding: 16px 16px 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--accent-primary);
  text-decoration: none;
  margin-bottom: 12px;
  font-weight: 500;
}

.back-link:hover {
  opacity: 0.7;
}

.category-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.category-title-row h1 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.category-title-row .icon-md {
  color: var(--accent-primary);
}

.category-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.category-filters .catalog-select {
  flex: 1;
  min-width: 120px;
}

#masters-total {
  width: 100%;
  margin: 8px 0 0;
  font-size: 0.8rem;
}

/* --- ПОКАЗАТЬ ЕЩЁ --- */

.load-more-container {
  display: flex;
  justify-content: center;
  padding: 20px 16px 40px;
}

.load-more-btn {
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- ПУСТОЕ СОСТОЯНИЕ --- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  gap: 8px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state .icon-lg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-secondary);
}

.empty-message {
  width: 100%;
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.catalog-empty-global {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  padding: 40px 16px;
}

.catalog-empty-content {
  text-align: center;
  max-width: 400px;
  color: var(--text-secondary);
}

.catalog-empty-content .icon-xl {
  color: var(--accent-primary);
  margin-bottom: 10px;
}

.catalog-empty-content h2 {
  margin: 0 0 10px;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.catalog-empty-content p {
  margin: 0 0 18px;
  color: var(--text-muted);
  line-height: 1.5;
}

.catalog-empty-actions {
  display: flex;
  justify-content: center;
}

/* --- АНИМАЦИЯ ЗАГРУЗКИ --- */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

.catalog-progress-card {
  padding: 20px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.catalog-progress-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.catalog-progress-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}

.progress-bar {
  height: 100%;
  background: var(--accent-gradient, var(--accent-primary));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0 0 14px;
}

.catalog-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.checklist-item.done {
  color: var(--text-primary);
}

.checklist-item.done .check-icon {
  color: #22c55e;
}

.checklist-item.pending .check-icon {
  color: var(--text-muted);
  opacity: 0.4;
}

.checklist-item .hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.catalog-toggle-row {
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.toggle-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.toggle-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--color-border);
  transition: background .2s ease, border-color .2s ease;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: var(--accent-light);
  border-color: var(--accent-primary);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::after {
  transform: translateX(20px);
  background: var(--accent-primary);
}

.catalog-status {
  margin-top: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #22c55e;
}

/* --- FADE IN ДЛЯ КАРТОЧЕК --- */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.master-card-mini,
.master-card-full {
  animation: fadeInUp 0.3s ease forwards;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

/* Tablet */
@media (min-width: 768px) {
  .catalog-card {
    flex: 0 0 180px;
  }
  .catalog-page {
    padding: 0 24px;
  }

  .catalog-filters .filter-group {
    flex: 1 1 240px;
  }

  .catalog-categories {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }

  .catalog-header {
    padding: 28px 0 16px;
  }

  .catalog-title {
    font-size: 1.75rem;
  }

  .section-header {
    padding: 0 24px 12px;
  }

  .catalog-swiper {
    padding: 0 24px 8px;
    gap: 16px;
  }

  .master-card-mini {
    flex: 0 0 280px;
  }

  .masters-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 24px;
  }

  .master-card-full {
    flex-direction: column;
  }

  .master-card-full-photo {
    flex: none;
    width: 100%;
    height: 200px;
    border-radius: 14px 14px 0 0;
  }

  .master-card-full-info {
    padding: 4px;
  }

  .master-card-full-info .master-card-btn {
    width: 100%;
    text-align: center;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .catalog-page {
    padding: 0 32px;
  }

  .catalog-categories {
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
  }

  .catalog-header {
    padding: 32px 0 20px;
  }

  .catalog-title {
    font-size: 2rem;
  }

  .catalog-section {
    max-width: 1200px;
    margin: 0 auto 32px;
  }

  .section-header {
    padding: 0 32px 14px;
  }

  .catalog-swiper {
    padding: 0 32px 8px;
    gap: 20px;
  }

  .master-card-mini {
    flex: 0 0 300px;
  }

  .masters-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding: 0 32px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .category-header {
    padding: 24px 32px 16px;
    max-width: 1200px;
    margin: 0 auto;
  }

  .load-more-container {
    max-width: 1200px;
    margin: 0 auto;
  }
}

/* Большие экраны */
@media (min-width: 1400px) {
  .masters-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .catalog-categories {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== Category page cards ===== */
.catalog-category-page .master-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--color-border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.catalog-category-page .master-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.catalog-category-page .master-card-avatar {
  width: 100%;
  aspect-ratio: 6 / 4;
  overflow: hidden;
  position: relative;
  background: #faf6f1;
}

.catalog-category-page .master-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-category-page .master-card-avatar .avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: linear-gradient(135deg, #d4a574 0%, #e8c9a0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalog-category-page .master-card-avatar .avatar-placeholder span {
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}

.catalog-category-page .master-card-info {
  padding: 10px 12px;
}

.catalog-category-page .master-card-info h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 2px;
}

.catalog-category-page .master-card-info .specialty {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0 0 4px;
}

.catalog-category-page .master-card-info .rating-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  margin-bottom: 4px;
}

.catalog-category-page .master-card-info .district-row {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
}

.catalog-category-page .master-card .btn-book {
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px 12px;
  padding: 8px 12px;
  background: var(--text-primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.catalog-category-page .master-card .btn-book:hover {
  opacity: 0.85;
}

.catalog-category-page .masters-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 640px) {
  .catalog-category-page .masters-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 900px) {
  .catalog-category-page .masters-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1200px) {
  .catalog-category-page .masters-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .catalog-category-page .masters-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .catalog-category-page .master-card .btn-book {
    padding: 8px;
    font-size: 0.8rem;
    margin: 0 10px 10px;
    width: calc(100% - 20px);
  }
}

/* --- Catalog marketing blocks --- */
.catalog-hero {
  background: linear-gradient(135deg, #fdf6f0 0%, #f5e6d8 50%, #fce4ec 100%);
  border-radius: 24px;
  padding: 48px 40px;
  margin-bottom: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.catalog-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.catalog-hero h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px;
  position: relative;
}

.catalog-hero-subtitle {
  font-size: 1.1rem;
  color: #666;
  margin: 0 0 32px;
  position: relative;
}

.catalog-hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  position: relative;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #d4a574;
}

.stat-label {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
}

.catalog-collection {
  background: #fff;
  border-radius: 20px;
  padding: 28px 32px;
  margin-bottom: 40px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(212, 165, 116, 0.15);
}

.collection-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.collection-badge {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #fff8f0 0%, #ffecd2 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.collection-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #1a1a1a;
}

.collection-subtitle {
  font-size: 0.85rem;
  color: #888;
  margin: 0;
}

.collection-cards {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.collection-cards::-webkit-scrollbar {
  display: none;
}

.collection-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #fdf8f4 0%, #fff 100%);
  border-radius: 16px;
  border: 1px solid rgba(212, 165, 116, 0.12);
  min-width: 280px;
  flex-shrink: 0;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.collection-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212, 165, 116, 0.15);
}

.collection-card-rank {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #d4a574;
  background: rgba(212, 165, 116, 0.1);
  padding: 2px 8px;
  border-radius: 8px;
}

.collection-card-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.collection-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d4a574, #e8c9a0);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.collection-avatar-placeholder span {
  font-size: 1.3rem;
  font-weight: 600;
  color: #fff;
}

.collection-card-info h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 2px;
}

.collection-card-info .specialty {
  font-size: 0.8rem;
  color: #888;
  margin: 0 0 4px;
}

.collection-card-info .rating {
  display: flex;
  align-items: center;
  gap: 4px;
}

.collection-card-info .star {
  color: #d4a574;
  font-size: 0.85rem;
}

.collection-card-info .rating-value {
  font-weight: 600;
  font-size: 0.85rem;
  color: #1a1a1a;
}

.collection-card-info .reviews-count {
  font-size: 0.75rem;
  color: #aaa;
}

.catalog-cta-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 20px;
  padding: 32px 40px;
  margin-bottom: 40px;
  overflow: hidden;
  position: relative;
}

.catalog-cta-banner::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -10%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(212, 165, 116, 0.2) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  z-index: 1;
}

.cta-banner-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.cta-banner-text {
  flex: 1;
}

.cta-banner-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}

.cta-banner-text p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.cta-banner-button {
  display: inline-block;
  padding: 12px 28px;
  background: linear-gradient(135deg, #d4a574 0%, #c4956a 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.cta-banner-button:hover {
  transform: scale(1.03);
}

.catalog-bottom-cta {
  text-align: center;
  padding: 48px 32px;
  margin-top: 20px;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #fdf8f4 0%, #fce4ec20 100%);
  border-radius: 24px;
  border: 1px dashed rgba(212, 165, 116, 0.3);
}

.catalog-bottom-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.catalog-bottom-cta p {
  font-size: 0.95rem;
  color: #888;
  margin: 0 0 28px;
}

.bottom-cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.catalog-bottom-cta .btn-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #d4a574 0%, #c4956a 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s;
}

.catalog-bottom-cta .btn-primary:hover {
  transform: translateY(-2px);
}

.catalog-bottom-cta .btn-secondary {
  display: inline-block;
  padding: 14px 32px;
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 14px;
  border: 1.5px solid rgba(212, 165, 116, 0.3);
  text-decoration: none;
  transition: transform 0.2s;
}

.catalog-bottom-cta .btn-secondary:hover {
  transform: translateY(-2px);
  border-color: #d4a574;
}

.catalog-search-wrap {
  position: relative;
  margin: 0 0 20px;
}

.catalog-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: var(--shadow-sm);
}

.catalog-search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.catalog-search-input {
  border: none;
  outline: none;
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-primary);
  background: transparent;
}

.catalog-search-input::placeholder {
  color: var(--text-muted);
}

.catalog-search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.catalog-search-dropdown {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 8px;
}

.catalog-search-group {
  padding: 4px 0;
}

.catalog-search-group-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 4px 8px;
  text-transform: uppercase;
}

.catalog-search-items {
  display: flex;
  flex-direction: column;
}

.catalog-search-item {
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.catalog-search-item:hover {
  background: var(--bg-card-hover);
}

.catalog-search-master-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.catalog-search-master-spec {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.catalog-search-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 12px 8px;
}

@media (max-width: 768px) {
  .catalog-hero {
    padding: 32px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
  }

  .catalog-hero h1 {
    font-size: 1.5rem;
  }

  .catalog-hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 24px;
  }

  .catalog-hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .catalog-collection {
    padding: 20px 16px;
    border-radius: 16px;
    margin-bottom: 24px;
  }

  .collection-badge {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
    border-radius: 12px;
  }

  .collection-title {
    font-size: 1.1rem;
  }

  .collection-card {
    min-width: 240px;
    padding: 12px 16px;
  }

  .catalog-cta-banner {
    padding: 24px 20px;
    border-radius: 16px;
    margin-bottom: 24px;
  }

  .cta-banner-content {
    flex-direction: column;
    text-align: center;
  }

  .cta-banner-icon {
    font-size: 2rem;
  }

  .cta-banner-text h3 {
    font-size: 1.05rem;
  }

  .catalog-bottom-cta {
    padding: 32px 20px;
    border-radius: 16px;
  }

  .catalog-bottom-cta h2 {
    font-size: 1.2rem;
  }

  .bottom-cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .catalog-bottom-cta .btn-primary,
  .catalog-bottom-cta .btn-secondary {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .catalog-section-header h2 {
    font-size: 1.1rem;
  }

  .catalog-search-wrap {
    margin-bottom: 16px;
  }
}

@media (max-width: 480px) {
  .catalog-hero {
    padding: 24px 16px;
    border-radius: 14px;
  }

  .catalog-hero h1 {
    font-size: 1.3rem;
  }

  .catalog-hero-stats {
    gap: 16px;
  }

  .stat-number {
    font-size: 1.2rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .catalog-categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .category-chip {
    padding: 10px 4px;
    border-radius: 12px;
    gap: 4px;
  }

  .category-chip-name {
    font-size: 0.68rem;
  }

  .collection-card {
    min-width: 220px;
    padding: 10px 12px;
  }

  .catalog-cta-banner {
    padding: 20px 16px;
    border-radius: 14px;
  }

  .catalog-bottom-cta {
    padding: 24px 16px;
    border-radius: 14px;
  }

  .catalog-bottom-cta h2 {
    font-size: 1.1rem;
  }
}

/* --- Advanced filters (category page) --- */
.catalog-category-page .category-top-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.catalog-mobile-filter-btn {
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 12px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.filter-count-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.catalog-category-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

.catalog-results-area {
  min-width: 0;
}

.catalog-filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
}

.filters-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.filters-panel-header h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-primary);
}

.filters-close-btn {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.filter-section {
  margin-bottom: 14px;
}

.filter-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.service-search-input {
  margin-bottom: 8px;
}

.services-multiselect {
  max-height: 170px;
  overflow-y: auto;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  padding: 8px;
  background: var(--bg-primary);
}

.service-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-primary);
  padding: 4px 2px;
}

.service-option input[type="checkbox"] {
  accent-color: var(--accent-primary);
}

.rating-radios {
  display: grid;
  gap: 6px;
}

.rating-radios label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-primary);
}

.price-inputs {
  display: grid;
  gap: 8px;
}

.price-input-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg-primary);
  color: var(--text-secondary);
}

.price-input-wrap input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.88rem;
  width: 100%;
  outline: none;
}

.filters-actions {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.active-filters-tags {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 14px;
}

.active-filter-tag {
  border: 1px solid var(--color-border);
  background: var(--bg-card);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.active-filter-tag span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
}

.catalog-filters-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 70;
}

@media (min-width: 901px) {
  .catalog-mobile-filter-btn {
    display: none;
  }
}

@media (max-width: 900px) {
  .catalog-category-layout {
    grid-template-columns: 1fr;
  }

  .catalog-filters-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 80;
    border-radius: 16px 16px 0 0;
    max-height: 82vh;
    overflow: auto;
    transform: translateY(105%);
    transition: transform 0.25s ease;
    box-shadow: var(--shadow-lg);
  }

  body.catalog-filters-open .catalog-filters-panel {
    transform: translateY(0);
  }

  .filters-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================================
   DARK THEME OVERRIDES
   ============================================================ */

/* Hero */
[data-theme="dark"] .catalog-hero {
  background: linear-gradient(135deg, rgba(30,25,20,0.9) 0%, rgba(45,35,25,0.85) 50%, rgba(35,25,30,0.9) 100%);
  border: 1px solid rgba(212,165,116,0.15);
}

[data-theme="dark"] .catalog-hero h1 {
  color: var(--text-primary);
}

[data-theme="dark"] .catalog-hero-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .stat-label {
  color: var(--text-secondary);
}

/* Collection blocks (Best Masters, New Masters, etc.) */
[data-theme="dark"] .catalog-collection {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.12);
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

[data-theme="dark"] .collection-badge {
  background: linear-gradient(135deg, rgba(45,35,25,0.8) 0%, rgba(60,45,30,0.6) 100%);
}

[data-theme="dark"] .collection-title {
  color: var(--text-primary);
}

[data-theme="dark"] .collection-subtitle {
  color: var(--text-secondary);
}

[data-theme="dark"] .collection-card {
  background: linear-gradient(135deg, rgba(30,25,20,0.8) 0%, rgba(24,20,16,0.9) 100%);
  border-color: rgba(212,165,116,0.1);
}

[data-theme="dark"] .collection-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .collection-card-info .specialty {
  color: var(--text-secondary);
}

[data-theme="dark"] .collection-card-info .rating-value {
  color: var(--text-primary);
}

[data-theme="dark"] .collection-card-info .reviews-count {
  color: var(--text-secondary);
}

/* CTA Banner (dark bg already, just refine for theme) */
[data-theme="dark"] .catalog-cta-banner {
  background: linear-gradient(135deg, rgba(20,16,12,0.95) 0%, rgba(35,28,20,0.95) 100%);
  border: 1px solid rgba(212,165,116,0.1);
}

/* Bottom CTA */
[data-theme="dark"] .catalog-bottom-cta {
  background: linear-gradient(135deg, rgba(30,25,20,0.6) 0%, rgba(35,28,22,0.4) 100%);
  border-color: rgba(212,165,116,0.2);
}

[data-theme="dark"] .catalog-bottom-cta h2 {
  color: var(--text-primary);
}

[data-theme="dark"] .catalog-bottom-cta p {
  color: var(--text-secondary);
}

[data-theme="dark"] .catalog-bottom-cta .btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: rgba(212,165,116,0.25);
}

/* Category grid cards */
[data-theme="dark"] .catalog-category-card {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.1);
}

[data-theme="dark"] .catalog-category-card:hover {
  border-color: rgba(212,165,116,0.3);
}

[data-theme="dark"] .category-card-name {
  color: var(--text-primary);
}

[data-theme="dark"] .category-card-count {
  color: var(--text-secondary);
}

/* Master cards on category page */
[data-theme="dark"] .master-card {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.1);
}

[data-theme="dark"] .master-card:hover {
  border-color: rgba(212,165,116,0.25);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

[data-theme="dark"] .master-card-name {
  color: var(--text-primary);
}

[data-theme="dark"] .master-card-specialty {
  color: var(--text-secondary);
}

[data-theme="dark"] .master-card-location {
  color: var(--text-secondary);
}

[data-theme="dark"] .master-card-rating .rating-value {
  color: var(--text-primary);
}

[data-theme="dark"] .master-card-rating .reviews-count {
  color: var(--text-secondary);
}

[data-theme="dark"] .master-card-price {
  color: var(--text-secondary);
}

[data-theme="dark"] .master-card-slot {
  color: #22c55e;
}

/* Filters panel */
[data-theme="dark"] .catalog-filters-panel {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.12);
}

[data-theme="dark"] .filter-label {
  color: var(--text-primary);
}

[data-theme="dark"] .filter-section select,
[data-theme="dark"] .filter-section input[type="number"],
[data-theme="dark"] .filter-section input[type="text"],
[data-theme="dark"] .service-search-input {
  background: var(--bg-elevated, rgba(0,0,0,0.2));
  color: var(--text-primary);
  border-color: rgba(212,165,116,0.15);
}

[data-theme="dark"] .active-filter-tag {
  background: rgba(212,165,116,0.15);
  color: var(--text-primary);
  border-color: rgba(212,165,116,0.2);
}

/* Search dropdown */
[data-theme="dark"] .catalog-search-dropdown {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .catalog-search-item {
  color: var(--text-primary);
}

[data-theme="dark"] .catalog-search-item:hover {
  background: rgba(212,165,116,0.1);
}

[data-theme="dark"] .catalog-search-group-title {
  color: var(--text-secondary);
}

/* District select on category page */
[data-theme="dark"] .category-top-controls select {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: rgba(212,165,116,0.15);
}

/* Empty state */
[data-theme="dark"] .catalog-empty-title {
  color: var(--text-primary);
}

[data-theme="dark"] .catalog-empty-text {
  color: var(--text-secondary);
}

/* Section titles on catalog index */
[data-theme="dark"] .catalog-section-title {
  color: var(--text-primary);
}

[data-theme="dark"] .catalog-section-subtitle {
  color: var(--text-secondary);
}

/* Mobile filter button */
[data-theme="dark"] .catalog-mobile-filter-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: rgba(212,165,116,0.15);
}

/* Pagination */
[data-theme="dark"] .pagination-btn {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: rgba(212,165,116,0.15);
}

[data-theme="dark"] .pagination-btn.active {
  background: var(--accent-primary);
  color: #fff;
}

/* Category page master card */
[data-theme="dark"] .catalog-category-page .master-card {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.1);
}

[data-theme="dark"] .catalog-category-page .master-card:hover {
  border-color: rgba(212,165,116,0.25);
}

[data-theme="dark"] .catalog-category-page .master-card-avatar {
  background: rgba(45,35,25,0.6);
}

[data-theme="dark"] .catalog-category-page .master-card-info h3 {
  color: var(--text-primary);
}

/* Admin catalog card */
[data-theme="dark"] .catalog-card {
  background: var(--bg-card);
  border-color: rgba(212,165,116,0.1);
}

[data-theme="dark"] .catalog-card:hover {
  border-color: rgba(212,165,116,0.25);
}

[data-theme="dark"] .catalog-card-name {
  color: var(--text-primary);
}

[data-theme="dark"] .catalog-card-specialty {
  color: var(--text-secondary);
}

[data-theme="dark"] .catalog-card-detail {
  color: var(--text-secondary);
}

/* Toggle slider knob */
[data-theme="dark"] .toggle-slider::after {
  background: var(--text-secondary);
}
