/* ============================================
   FiveBBC Services Catalog Stylesheet
   Мигрирован с fivebbc.com (PHP/Twig)
   Включает: Promo card, Platform/Type filters,
   Services tables, Badges, Modal, Service Detail,
   Responsive
   ============================================ */

/* =========================================
   Services Page Styles — Base Layout
   ========================================= */

.services-page {
    min-height: 100vh;
}

/* NOT_AUTH: обёртка с ограничением ширины и отступом под fixed header */
body.not_auth .services-wrapper {
    width: 85%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 88px 0 40px; /* 64px header + 24px отступ */
}

/* AUTH: убрать лишний фон чтобы блоки были визуально отдельными */
body.auth .services-page {
    padding-top: 0;
    background: transparent;
}

.services-hero {
    background: var(--white);
    padding: 40px 0 30px;
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.services-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.services-hero p {
    font-size: 1rem;
    color: var(--gray-600);
}

/* =========================================
   Filters Section
   ========================================= */

.services-filters-section {
    padding: 24px 0 16px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.filters-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
}

/* Services page specific - equal width buttons (except service type filters) */
.services-page .filter-btn:not(.service-type-btn) {
    width: 100%;
}

.dashboard-page .filter-btn {
    width: 145px;
    flex: 0 0 145px;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.filter-btn.active .filter-icon {
    fill: var(--white);
}

.filter-btn.active .filter-icon svg,
.filter-btn.active .filter-icon svg path {
    fill: white !important;
}

.filter-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* =========================================
   Service Type Filters
   ========================================= */

.service-type-filters {
    padding: 16px 0;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-type-filters-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.service-type-btn {
    padding: 8px 18px;
    font-size: 0.875rem;
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
    font-weight: 500;
    width: 100%;
    text-align: center;
}

.service-type-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.service-type-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* =========================================
   Search and Sort
   ========================================= */

.search-sort-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 25px 0;
}

.search-box {
    position: relative;
    flex: 1;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--gray-400);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
    /* margin: 20px 0; */
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.sort-select {
    padding: 10px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.sort-select:hover {
    border-color: var(--primary);
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* =========================================
   Services Table Section
   ========================================= */

.services-table-section {
    padding: 20px 0 80px;
}

.services-count {
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 500;
}

.service-id {
    font-weight: 600;
    color: var(--gray-500);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-name {
    font-weight: 600;
    color: var(--dark);
    display: block;
}

.service-category {
    font-size: 0.8125rem;
    color: var(--gray-500);
    text-transform: capitalize;
}

.minmax-cell {
    font-size: 0.875rem;
}

.minmax-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.minmax-info span {
    color: var(--gray-600);
}

.description-cell {
    max-width: 300px;
}

.service-description {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* =========================================
   Service Categories Section
   ========================================= */

.services-categories-section {
    padding: 32px 0 80px;
}

.service-category-block {
    margin-bottom: 24px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    overflow: hidden;
}

.service-category-block:last-child {
    margin-bottom: 0;
}

.category-header {
    padding: 16px 20px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-title h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.category-name-text {
    display: inline-block;
}

.category-badges {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.category-badges .badge {
    font-size: 0.75rem;
    padding: 3px 8px;
}

.service-name-cell {
    font-size: 0.875rem;
    color: var(--gray-700);
}

.service-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-name-with-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-name-main {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.875rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 4px;

    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
               "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

.service-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

/* =========================================
   Badge Styles
   ========================================= */

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    line-height: 1.2;
}

.badge-orange {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.badge-purple {
    background: #faf5ff;
    color: #7e22ce;
    border: 1px solid #e9d5ff;
}

.badge-blue {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}

.badge-green {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.badge-gold {
    background: #fefce8;
    color: #a16207;
    border: 1px solid #fef08a;
}

.badge-cyan {
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
}

.badge-gray {
    background: #f9fafb;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.badge-pink {
    background: #fdf2f8;
    color: #be185d;
    border: 1px solid #fbcfe8;
}

.badge-indigo {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.badge-red {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge-emerald {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-amber {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

.badge-violet {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.badge-hot {
    background: #fee2e2;
    color: #dc2626;
}

.badge-new {
    background: #d1fae5;
    color: #059669;
}

.badge-slow {
    background: #fef3c7;
    color: #d97706;
}

.badge-default {
    background: var(--gray-100);
    color: var(--gray-600);
}

.platform-icon-small {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.platform-icon-small svg {
    width: 18px;
    height: 18px;
}

/* =========================================
   Services Table Value Badges
   ========================================= */

.rate-cell,
.min-cell,
.max-cell,
.average-time-cell {
    white-space: nowrap;
    text-align: center;
}

.rate-cell span {
    display: inline-block;
    padding: 3px 12px;
    background: #4ade80;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.min-cell span {
    display: inline-block;
    padding: 3px 12px;
    background: #fbbf24;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.max-cell span {
    display: inline-block;
    padding: 3px 12px;
    background: #f87171;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.average-time-cell span {
    display: inline-block;
    padding: 3px 12px;
    background: #9ca3af;
    color: #fff;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
}

/* =========================================
   Action Buttons
   ========================================= */

.description-btn-cell {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: var(--primary);
    border: none;
    border-radius: 6px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* =========================================
   Show More Button
   ========================================= */

.show-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 48px 0;
    margin-top: 24px;
}

.show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.show-more-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.show-more-btn:hover svg {
    transform: translateY(2px);
}

.show-more-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.show-more-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* =========================================
   Modal Styles
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.services-page .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.services-page .modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
    flex: 1;
    padding-right: 16px;
    line-height: 1.4;
}

/* Modal title with badges */
.services-page .modal-header h3 .service-name-main {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.services-page .modal-header h3 .service-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.services-page .modal-header h3 .service-badges .badge {
    font-size: 0.7rem;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-description {
    color: var(--gray-700);
    line-height: 1.6;
}

.modal-description p {
    /* margin-bottom: 12px; */
}

.modal-description p:last-child {
    margin-bottom: 0;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.modal-footer .btn,
.modal-footer .btn-favorite-modal {
    white-space: nowrap;
}

/* =========================================
   Main Landing Modal Overrides
   ========================================= */

.main-landing .modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.main-landing .modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.main-landing .modal {
    background: var(--white, #fff);
    border-radius: 12px;
    max-width: 520px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.2s;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.main-landing .modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.main-landing .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200, #e5e7eb);
}

.main-landing .modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark, #111827);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-landing .modal-header .platform-icon {
    width: 28px;
    height: 28px;
}

.main-landing .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100, #f3f4f6);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500, #6b7280);
    transition: background 0.15s, color 0.15s;
}

.main-landing .modal-close:hover {
    background: var(--gray-200, #e5e7eb);
    color: var(--dark, #111827);
}

.main-landing .modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(80vh - 130px);
}

.main-landing .modal-description {
    font-size: 14px;
    line-height: 1.7;
    color: var(--gray-600, #4b5563);
}

.main-landing .modal-description br {
    display: block;
    margin: 4px 0;
}

.main-landing .modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200, #e5e7eb);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* =========================================
   Button Variants for Table
   ========================================= */

.btn-show {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--gray-100, #f3f4f6);
    color: var(--gray-700, #374151);
    border: 1px solid var(--gray-200, #e5e7eb);
}

.btn-show:hover {
    background: var(--gray-200, #e5e7eb);
}

.btn-check {
    padding: 6px 14px;
    font-size: 13px;
}

/* =========================================
   Quality Stars
   ========================================= */

.quality-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 14px;
    color: #fbbf24;
}

.quality-stars svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* =========================================
   Price Styling
   ========================================= */

.price-cell {
    font-weight: 600;
    color: var(--dark, #111827);
    font-size: 14px;
}

.price-cell small {
    font-weight: 400;
    color: var(--gray-500, #6b7280);
    font-size: 11px;
}

/* =========================================
   Service Name in Table
   ========================================= */

.service-name {
    font-weight: 500;
    color: var(--dark, #111827);
    font-size: 14px;
}

.service-meta {
    font-size: 12px;
    color: var(--gray-500, #6b7280);
    margin-top: 2px;
}

/* =========================================
   Services Page (Public) — AUTH Version
   ========================================= */

.services-page {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Promo Card */
.services-page .promo-card {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.services-page .promo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(145deg, var(--primary) 0%, #0052cc 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.services-page .promo-content h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 12px;
}

.services-page .promo-content p {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin: 0 0 12px;
}

.services-page .promo-content p:last-of-type {
  margin-bottom: 16px;
}

.services-page .promo-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.services-page .promo-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.services-page .promo-feature svg {
  color: var(--success);
  width: 18px;
  height: 18px;
}

/* Filters Section */
.services-page .filters-section {
  background: white;
  border-radius: 16px;
  padding: 20px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.services-page .filters-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.services-page .category-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.services-page .search-sort-wrapper {
  display: flex;
  justify-content: flex-start;
}

.services-page .search-box {
  position: relative;
  width: 300px;
}

.services-page .search-box .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gray-400);
}

.services-page .search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font-size: 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  transition: all 0.2s ease;
}

.services-page .search-box input:focus {
  outline: none;
  border-color: var(--primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* Category header - no pointer on services page (not collapsible) */
.services-page .category-header {
  cursor: default;
}

.services-page .category-header:hover {
  background: var(--gray-50); /* Keep same background, no hover effect */
}

/* Services Table */
.services-page .services-table-wrapper {
  background: transparent;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Loading State */
.services-page .loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.services-page .loading-state p {
  color: var(--gray-500);
  font-size: 14px;
  margin: 0;
}

/* Service Category */
.service-category {
  border-bottom: 1px solid var(--gray-100);
}

.service-category:last-child {
  border-bottom: none;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--gray-50);
  cursor: pointer;
  transition: background 0.2s ease;
}

.category-header:hover {
  background: var(--gray-100);
}

.category-header .platform-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin: 0;
  flex: 1;
}

.category-header .service-count {
  font-size: 13px;
  color: var(--gray-500);
  background: var(--gray-200);
  padding: 4px 10px;
  border-radius: 20px;
}

.category-header .toggle-icon {
  color: var(--gray-400);
  transition: transform 0.2s ease;
}

.service-category.expanded .toggle-icon {
  transform: rotate(180deg);
}

/* Services Table */
.services-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

.services-table th {
  text-align: left;
  padding: 14px 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: white;
  border-bottom: 1px solid var(--gray-100);
}

.services-table td {
  padding: 16px 0px 20px 20px;
  font-size: 14px;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-50);
  vertical-align: middle;
}

.services-table tr:last-child td {
  border-bottom: none;
}

.services-table tr:hover td {
  background: var(--gray-50);
}

/* SERVICE column - min-width 350px */
.services-table td:nth-child(2),
.services-table th:nth-child(2) {
  min-width: 350px;
}

/* Service Name Cell */
.service-name-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.service-name {
  font-weight: 600;
  color: var(--gray-900);
}

.service-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-badge {
  display: inline-flex;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.service-badge.badge-hot {
  background: #fee2e2;
  color: #dc2626;
}

.service-badge.badge-new {
  background: #d1fae5;
  color: #059669;
}

.service-badge.badge-slow {
  background: #fef3c7;
  color: #d97706;
}

.service-badge.badge-default {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* Price Cell */
.price-cell {
  font-weight: 700;
  color: var(--success);
}

/* Actions Cell */
.actions-cell {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn.favorite-btn {
  background: var(--gray-100);
  color: var(--gray-500);
}

.action-btn.favorite-btn:hover,
.action-btn.favorite-btn.active {
  background: #fef3c7;
  color: #f59e0b;
}

.action-btn.order-btn {
  background: var(--primary);
  color: white;
}

.action-btn.order-btn:hover {
  background: #0052cc;
}

/* ============================================
   Service Detail Page (/<slug>/)
   ============================================ */

.service-detail {
    padding: 100px 0 var(--space-2xl);
}

.service-detail__header {
    margin-bottom: var(--space-xl);
}

.service-detail__breadcrumbs {
    margin-bottom: var(--space-md);
}

.service-detail__title {
    font-size: var(--fs-3xl);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.service-detail__description {
    font-size: var(--fs-md);
    color: var(--gray-500);
    line-height: 1.7;
    max-width: 720px;
}

/* Таблица тарифов сервиса */
.service-detail__tiers {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.service-detail__tiers-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.service-detail__tiers-title {
    font-size: var(--fs-lg);
    font-weight: 600;
    color: var(--dark);
}

.service-detail__tier-table {
    width: 100%;
    border-collapse: collapse;
}

.service-detail__tier-table th {
    padding: 12px 24px;
    text-align: left;
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.service-detail__tier-table td {
    padding: 14px 24px;
    font-size: var(--fs-sm);
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}

.service-detail__tier-table tr:last-child td {
    border-bottom: none;
}

.service-detail__tier-table tr:hover {
    background: var(--gray-50);
}

.service-detail__order-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s;
}

.service-detail__order-btn:hover {
    background: var(--primary-hover);
}

/* Content sections */
.service-detail__content {
    margin-bottom: var(--space-xl);
}

/* Related services */
.service-detail__related {
    margin-bottom: var(--space-xl);
}

.service-detail__related-title {
    font-size: var(--fs-xl);
    font-weight: 600;
    color: var(--dark);
    margin-bottom: var(--space-md);
}

/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 1024px) {
  .services-page .promo-card {
    flex-direction: column;
  }

  .services-page .search-box {
    width: 100%;
  }
}

@media (max-width: 768px) {
    .services-hero h1 {
        font-size: 1.875rem;
    }

    .services-hero p {
        font-size: 1rem;
    }

    .search-sort-wrapper {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .category-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8125rem;
    }

    .service-type-filters {
        padding-top: 8px;
    }

    .service-type-filters-inner {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 6px;
    }

    .service-type-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .category-title h2 {
        font-size: 1.25rem;
    }

    .category-badges .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .modal {
        width: 95%;
    }

    .services-page .modal-header,
    .services-page .modal-body,
    .services-page .modal-footer {
        padding: 16px;
    }

    .services-page .promo-card {
        padding: 20px;
    }

    .services-page .promo-content h2 {
        font-size: 18px;
    }

    .services-page .filters-section {
        padding: 16px;
    }

    .services-table th,
    .services-table td {
        padding: 12px 16px;
    }

    .service-detail {
        padding: 80px 0 var(--space-xl);
    }

    .service-detail__tier-table th,
    .service-detail__tier-table td {
        padding: 10px 16px;
    }
}

@media (max-width: 576px) {
    .services-page .promo-card {
        padding: 16px;
    }

    .services-page .promo-icon {
        width: 48px;
        height: 48px;
    }

    .services-page .promo-content h2 {
        font-size: 16px;
    }

    .services-page .promo-content p {
        font-size: 13px;
    }

    .services-page .filters-section {
        padding: 12px;
        gap: 12px;
    }

    .services-page .services-table-wrapper {
        border-radius: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .services-table {
        min-width: 800px;
    }

    .services-table th,
    .services-table td {
        padding: 10px 12px;
        font-size: 13px;
        white-space: nowrap;
    }

    .services-table td:nth-child(2) {
        min-width: 350px;
        white-space: normal;
    }

    .category-header {
        padding: 12px 16px;
    }

    .category-header h3 {
        font-size: 14px;
    }

    .action-btn {
        width: 32px;
        height: 32px;
    }

    .service-detail__tiers {
        border-radius: 8px;
    }

    .service-detail__tier-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 480px) {
    .modal-footer {
        flex-direction: column;
    }
    .modal-footer .btn,
    .modal-footer .btn-favorite-modal {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 375px) {
    .services-page .filters-section {
        padding: 10px;
    }

    .services-table {
        min-width: 800px;
    }

    .services-table th,
    .services-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
}
