/* طب ورزشی — تم هماهنگ با teb-design-system */
.sm-page {
  font-family: var(--teb-font);
  background: var(--teb-bg-gradient);
  color: var(--teb-text);
  min-height: 100vh;
}

.sm-topbar {
  background: var(--teb-surface-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--teb-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.sm-brand {
  font-weight: 800;
  color: var(--teb-primary-dark);
  text-decoration: none;
  font-size: var(--teb-font-size-lg);
}

.sm-hero {
  background: var(--teb-gradient-hero);
  color: var(--teb-text-inverse);
  padding: var(--teb-space-10) 0 var(--teb-space-12);
  position: relative;
  overflow: hidden;
}

.sm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 85%, rgba(255,255,255,0.08) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

.sm-hero > .container { position: relative; z-index: 1; }

.sm-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--teb-radius-pill);
  padding: 0.35rem 0.9rem;
  font-size: var(--teb-font-size-sm);
  margin-bottom: var(--teb-space-3);
}

.sm-hero-title {
  font-weight: 900;
  font-size: clamp(1.6rem, 4vw, 2.25rem);
  line-height: var(--teb-line-height-tight);
  margin-bottom: var(--teb-space-3);
}

.sm-hero-lead {
  opacity: 0.92;
  max-width: 36rem;
  margin: 0;
  font-size: var(--teb-font-size-lg);
  line-height: var(--teb-line-height);
}

.sm-main { margin-top: calc(-1 * var(--teb-space-8)); position: relative; z-index: 2; }

.sm-section-title {
  font-size: var(--teb-font-size-xl);
  font-weight: 700;
  color: var(--teb-text);
  margin-bottom: var(--teb-space-4);
}

/* کارت کاراکتر */
.sm-body-card {
  padding: var(--teb-space-5);
  overflow: hidden;
}

.sm-body-frame {
  position: relative;
  max-width: 340px;
  margin: 0 auto;
  aspect-ratio: 682 / 1024;
}

.sm-body-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(15, 118, 110, 0.15));
  pointer-events: none;
  user-select: none;
}

.sm-hotspots-layer {
  position: absolute;
  inset: 2% 6% 1% 6%;
  pointer-events: none;
}

.sm-hotspot {
  position: absolute;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  padding: 0;
  z-index: 2;
}
.sm-hotspot:hover,
.sm-hotspot.selected {
  transform: scale(1.15);
  border-color: rgba(249, 115, 22, 0.9);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2), 0 0 14px rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.08);
}

.sm-body-hint {
  font-size: var(--teb-font-size-sm);
  color: var(--teb-text-muted);
}

/* کارت خدمات */
.sm-svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
  padding: var(--teb-space-4) var(--teb-space-3);
  border: 1px solid var(--teb-border);
  border-radius: var(--teb-radius-lg);
  background: var(--teb-surface);
  box-shadow: var(--teb-shadow-xs);
  cursor: pointer;
  transition: border-color var(--teb-duration), box-shadow var(--teb-duration), transform var(--teb-duration);
  text-decoration: none;
  color: inherit;
  height: 100%;
  width: 100%;
}
.sm-svc-card:hover,
.sm-svc-card.active {
  border-color: var(--svc-color, var(--teb-primary));
  box-shadow: var(--teb-shadow-md);
  transform: translateY(-2px);
}
.sm-svc-card i {
  font-size: 1.4rem;
  color: var(--svc-color, var(--teb-primary));
}
.sm-svc-card strong {
  font-size: var(--teb-font-size-sm);
  font-weight: 700;
}
.sm-svc-card small {
  font-size: var(--teb-font-size-xs);
  color: var(--teb-text-muted);
  line-height: 1.4;
}

/* پنل جزئیات */
.sm-detail-panel {
  padding: var(--teb-space-5);
  min-height: 120px;
}
.sm-detail-panel.empty {
  text-align: center;
  color: var(--teb-text-muted);
  font-size: var(--teb-font-size-sm);
}
.sm-detail-zone {
  font-size: var(--teb-font-size-xs);
  color: var(--teb-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.sm-detail-title {
  font-size: var(--teb-font-size-xl);
  font-weight: 800;
  margin-bottom: var(--teb-space-2);
  color: var(--teb-text);
}
.sm-detail-desc {
  font-size: var(--teb-font-size-sm);
  color: var(--teb-text-muted);
  line-height: var(--teb-line-height);
  margin-bottom: var(--teb-space-4);
}
.sm-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--teb-space-2);
}

/* مودال */
.sm-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1050;
  align-items: center;
  justify-content: center;
  padding: var(--teb-space-4);
}
.sm-modal-backdrop.show { display: flex; }
.sm-modal {
  max-width: 420px;
  width: 100%;
  padding: var(--teb-space-6);
}

@media (max-width: 991px) {
  .sm-main { margin-top: var(--teb-space-6); }
  .sm-body-frame { max-width: 280px; }
  .sm-detail-panel.d-none.d-lg-block { display: none !important; }
}

/* نقاط انتخاب‌شده — موبایل */
.sm-mobile-points-panel {
  margin-top: var(--teb-space-3);
  padding: var(--teb-space-3);
  border-radius: var(--teb-radius-md);
  background: color-mix(in srgb, var(--teb-primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--teb-primary) 18%, transparent);
}
.sm-mobile-points-panel.empty {
  text-align: center;
  background: var(--teb-bg-subtle, #f8fafc);
  border-color: var(--teb-border);
}
.sm-mobile-points-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--teb-space-2);
  font-size: var(--teb-font-size-sm);
}
.sm-point-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: var(--teb-space-3);
}
.sm-point-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--teb-radius-pill);
  background: var(--teb-surface);
  border: 1px solid var(--teb-border);
  font-size: var(--teb-font-size-xs);
}
.sm-point-chip-remove {
  border: none;
  background: none;
  color: var(--teb-text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.sm-mobile-points-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--teb-space-2);
}

.sm-selected-points-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--teb-space-4);
}
.sm-selected-points-list li {
  padding: var(--teb-space-2) 0;
  border-bottom: 1px solid var(--teb-border);
}
.sm-selected-points-list li:last-child { border-bottom: none; }

/* پزشکان */
.sm-doctors-section {
  border-top: 1px solid var(--teb-border);
  padding-top: var(--teb-space-6);
}
.sm-doctor-card {
  display: flex;
  gap: var(--teb-space-3);
  padding: var(--teb-space-4);
  border: 1px solid var(--teb-border);
  border-radius: var(--teb-radius-lg);
  background: var(--teb-surface);
  height: 100%;
  box-shadow: var(--teb-shadow-xs);
}
.sm-doctor-card__photo {
  width: 72px;
  height: 72px;
  border-radius: var(--teb-radius-md);
  object-fit: cover;
  flex-shrink: 0;
}
.sm-doctor-card__name {
  font-size: var(--teb-font-size-base);
  font-weight: 700;
  margin: 0 0 0.15rem;
}
.sm-doctor-card__meta {
  font-size: var(--teb-font-size-xs);
  color: var(--teb-primary);
  margin: 0 0 0.15rem;
}
.sm-doctor-card__body { flex: 1; min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  .sm-hotspot, .sm-svc-card, .sm-package-tile { transition: none; }
}

/* بسته‌های خدمات */
.sm-packages-section {
  border-top: 1px solid var(--teb-border);
  padding-top: var(--teb-space-6);
}

.sm-packages-lead {
  color: var(--teb-text-muted);
  font-size: var(--teb-font-size-sm);
  margin-bottom: var(--teb-space-4);
}

.sm-gender-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--teb-space-2);
  margin-bottom: var(--teb-space-5);
}

.sm-gender-tab {
  flex: 1;
  min-width: 160px;
  padding: 0.65rem 1rem;
  border: 1px solid var(--teb-border);
  border-radius: var(--teb-radius-lg);
  background: var(--teb-surface);
  color: var(--teb-text-muted);
  font-weight: 600;
  font-size: var(--teb-font-size-sm);
  cursor: pointer;
  transition: border-color var(--teb-duration), background var(--teb-duration), color var(--teb-duration);
}
.sm-gender-tab:hover {
  border-color: var(--teb-primary-light);
  color: var(--teb-primary);
}
.sm-gender-tab.active {
  background: var(--teb-primary);
  border-color: var(--teb-primary);
  color: #fff;
}

.sm-package-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--teb-space-4);
  border: 2px solid var(--teb-border);
  border-radius: var(--teb-radius-lg);
  background: var(--teb-surface);
  box-shadow: var(--teb-shadow-xs);
  transition: border-color var(--teb-duration), box-shadow var(--teb-duration), transform var(--teb-duration);
  cursor: pointer;
  position: relative;
}
.sm-package-tile:hover {
  border-color: var(--pkg-color, var(--teb-primary));
  box-shadow: var(--teb-shadow-md);
  transform: translateY(-2px);
}
.sm-package-tile.selected {
  border-color: var(--pkg-color, var(--teb-primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pkg-color, var(--teb-primary)) 20%, transparent);
}
.sm-package-tile.selected::after {
  content: '\f058';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 10px;
  left: 10px;
  color: var(--pkg-color, var(--teb-primary));
  font-size: 1.1rem;
}

.sm-package-tile__head {
  display: flex;
  align-items: flex-start;
  gap: var(--teb-space-3);
  margin-bottom: var(--teb-space-3);
}
.sm-package-tile__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--teb-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--pkg-color, var(--teb-primary)) 12%, transparent);
  color: var(--pkg-color, var(--teb-primary));
  font-size: 1.2rem;
  flex-shrink: 0;
}
.sm-package-tile__title {
  font-weight: 800;
  font-size: var(--teb-font-size-base);
  margin: 0 0 0.15rem;
}
.sm-package-tile__price {
  font-weight: 700;
  color: var(--teb-primary-dark);
  font-size: var(--teb-font-size-sm);
}
.sm-package-tile__period {
  font-size: var(--teb-font-size-xs);
  color: var(--teb-text-muted);
}
.sm-package-tile__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--teb-space-3);
  flex-grow: 1;
}
.sm-package-tile__features li {
  font-size: var(--teb-font-size-xs);
  color: var(--teb-text-muted);
  padding: 0.2rem 0;
  padding-right: 1rem;
  position: relative;
  line-height: 1.45;
}
.sm-package-tile__features li::before {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  right: 0;
  color: var(--pkg-color, var(--teb-primary));
  font-size: 0.65rem;
  top: 0.35rem;
}
.sm-package-tile__actions {
  display: flex;
  gap: var(--teb-space-2);
  margin-top: auto;
}
.sm-package-tile__actions .teb-btn {
  flex: 1;
  font-size: var(--teb-font-size-xs);
  padding: 0.4rem 0.6rem;
}

.sm-package-selected {
  padding: var(--teb-space-4) var(--teb-space-5);
}
.sm-package-selected.empty {
  text-align: center;
  color: var(--teb-text-muted);
  font-size: var(--teb-font-size-sm);
}
.sm-package-selected__label {
  font-size: var(--teb-font-size-xs);
  color: var(--teb-primary);
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.sm-package-selected__title {
  font-size: var(--teb-font-size-lg);
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.sm-package-selected__price {
  font-weight: 700;
  color: var(--teb-primary-dark);
  margin-bottom: var(--teb-space-3);
}

.sm-package-detail-modal {
  max-width: 560px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.sm-package-detail-body {
  overflow-y: auto;
  font-size: var(--teb-font-size-sm);
  line-height: var(--teb-line-height);
  color: var(--teb-text-muted);
  padding-left: 2px;
}
.sm-package-detail-body h4 {
  font-size: var(--teb-font-size-base);
  font-weight: 700;
  color: var(--teb-text);
  margin: var(--teb-space-4) 0 var(--teb-space-2);
}
.sm-package-detail-body h4:first-child { margin-top: 0; }
.sm-package-detail-body ul {
  padding-right: 1.2rem;
  margin-bottom: var(--teb-space-3);
}
.sm-package-detail-body li { margin-bottom: 0.35rem; }
.sm-package-detail-price {
  background: color-mix(in srgb, var(--teb-primary) 8%, transparent);
  border-radius: var(--teb-radius-md);
  padding: var(--teb-space-3);
  margin-bottom: var(--teb-space-3);
  font-weight: 700;
  color: var(--teb-primary-dark);
}
.sm-package-detail-edu {
  background: var(--teb-bg-subtle, #f1f5f9);
  border-radius: var(--teb-radius-md);
  padding: var(--teb-space-3);
  margin-top: var(--teb-space-3);
}
.sm-package-detail-edu p {
  margin-bottom: 0.5rem;
  font-size: var(--teb-font-size-xs);
}
.sm-package-detail-edu p:last-child { margin-bottom: 0; }

@media (max-width: 575px) {
  .sm-gender-tab { min-width: 100%; }
  .sm-package-tile__actions { flex-direction: column; }
}
