.container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  line-height: 1.25;
  color: #161c2d;
  margin-bottom: 20px;
}

.breadcrumbs a {
  color: #161c2d;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #473bf0;
}

.breadcrumbs .current {
  color: #666666;
}

/* Заголовки страниц */
.page-header {
  text-align: left;
  margin: 10px 0 25px 0;
}

.page-title {
  font-size: 60px;
  font-weight: 700;
  line-height: 65px;
  color: #161c2d;
}

/* Фильтры */
.filters-form {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px;
  flex-wrap: wrap;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  margin-bottom: 20px;
}

.filter-label {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  color: #2a2a2a;
  white-space: nowrap;
  margin: 0;
  margin-right: 10px;
}

.filter-group {
  flex: 1;
  min-width: 180px;
  width: 220px;
  max-width: max-content;
}

/* Select2 стили */
.filter-group .select2-container {
  width: 100% !important;
}

.filter-group .select2-selection--multiple {
  border: 1px solid #d1d5db !important;
  border-radius: 8px !important;
  min-height: 42px !important;
  background-color: white !important;
  padding: 6px 10px !important;
  transition: all 0.2s ease;
}

.filter-group .select2-selection--multiple:hover {
  border-color: #473bf0 !important;
  background-color: #fafbff !important;
}

.filter-group .select2-selection__choice {
  background-color: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 13px !important;
  margin: 3px !important;
  font-weight: 500;
}

.filter-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.btn-apply {
  background-color: #473bf0;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  height: 42px;
  transition: all 0.2s ease;
}

.btn-apply:hover {
  background-color: #3a2fcc;
  transform: translateY(-1px);
}

.btn-reset {
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  white-space: nowrap;
  height: 42px;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-reset:hover {
  background-color: #5a6268;
  color: white;
  transform: translateY(-1px);
}

/* Сетка карточек для списка */
.cards-grid-purchased {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px 30px;
  margin-bottom: 30px;
}

.card-purchased {
  background: white;
  border: 1px solid #f4f7fa;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-bottom: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-purchased:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-purchased:first-child {
  border-radius: 25px;
}

.card-image-purchased {
  width: 100%;
  height: 229px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  position: relative;
}

.card-image-purchased img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-content-purchased {
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title-purchased {
  font-weight: 700;
  font-size: 20px;
  line-height: 1.35;
  color: #161c2d;
  text-align: center;
  margin: 0;
}

.card-condition-purchased {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.25;
  color: #473bf0;
  text-align: center;
  margin: 0;
}

.card-description-purchased {
  font-weight: 400;
  font-size: 15px;
  line-height: 1.25;
  color: #2a2a2a;
  opacity: 0.7;
  height: 56.876px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-details-purchased {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
}

.detail-item-purchased {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.detail-label,
.detail-value {
  text-align: left;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-label {
  font-weight: 400;
  font-size: 14px;
  line-height: 1.25;
  color: #666666;
}

.detail-value {
  font-weight: 500;
  font-size: 15px;
  line-height: 1.25;
  color: #161c2d;
  margin: 0;
}

.card-footer-purchased {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  margin: 15px auto 0;
}

.more-link-purchased {
  font-weight: 700;
  font-size: 13px;
  line-height: normal;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #2a2a2a;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.2s;
}

.more-link-purchased:hover {
  color: #f64b4b;
}

/* Пагинация */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  font-weight: 500;
  font-size: 17px;
  line-height: 1.25;
  color: #2a2a2a;
}

.page-arrow,
.page-number,
.page-dots {
  display: inline-block;
  padding: 5px 10px;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.page-arrow {
  font-size: 24px;
  line-height: 1;
  color: #787878;
}

.page-arrow:hover {
  color: #473bf0;
}

.page-arrow.disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.page-number {
  color: #2a2a2a;
  border: 1px solid transparent;
}

.page-number:hover {
  background-color: #f9f9f9;
  border-color: #e6e6e6;
}

.page-number.current {
  color: #f64b4b;
  font-weight: 700;
}

.page-dots {
  color: #666666;
  font-weight: 700;
}

.no-results {
  text-align: center;
  padding: 40px;
  font-size: 18px;
  color: #666;
  grid-column: 1 / -1;
}

/* Основной контент */
.main-content {
  padding: 30px 0;
  display: flex;
  justify-content: center;
}

.content-wrapper {
  width: 100%;
  display: flex;
  gap: 30px;
}

/* Галерея - ОБНОВЛЕННЫЕ СТИЛИ */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
  flex: 1;
  position: relative;
}

.main-image {
  width: 100%;
  height: 562.783px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: opacity 0.3s ease;
}

/* Стрелки для галереи */
.gallery-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 16px;
  z-index: 2;
  pointer-events: none;
}

.gallery-arrow {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  pointer-events: all;
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Кнопка полноэкранного режима */
.fullscreen-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s;
}

.fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* Счетчик изображений */
.image-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 2;
}

.thumbnails {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.thumbnails-container {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  padding: 4px 0;
  max-width: calc(100% - 80px);
}

.thumbnails-container::-webkit-scrollbar {
  display: none;
}

.arrow {
  width: 30.297px;
  height: 30.297px;
  background-color: #787878;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  font-weight: bold;
  user-select: none;
  flex-shrink: 0;
}

.arrow:hover {
  background-color: #473bf0;
}

.thumbnails .arrow {
  z-index: 3;
  transition: all 0.3s ease;
  opacity: 1;
}

.thumbnails .arrow:hover {
  background-color: #473bf0;
  transform: scale(1.1);
}

/* Для неактивных стрелок */
.thumbnails .arrow[style*="opacity: 0.3"] {
  cursor: not-allowed;
}

.thumbnails .arrow[style*="opacity: 0.3"]:hover {
  background-color: #787878;
  transform: none;
}

.thumbnail {
  width: 169px;
  height: 123.933px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.thumbnail.active {
  border-color: transparent;
}

.thumbnail:hover {
  transform: scale(1.05);
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Информация об авто */
.info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.car-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  color: #161c2d;
}

.description {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  color: #2a2a2a;
  opacity: 0.7;
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 1px solid #f4f7fa;
}

.spec-label {
  font-size: 14px;
  font-weight: 500;
  color: #666666;
  white-space: nowrap;
}

.spec-label.regular {
  font-weight: 400;
}

.spec-value {
  font-size: 15px;
  font-weight: 500;
  color: #161c2d;
  white-space: nowrap;
}

.spec-value.small {
  font-size: 14px;
}

/* Похожие автомобили */
.similar-section {
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.section-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  color: #161c2d;
  width: 100%;
}

.cards-grid {
  display: flex;
  gap: 30px;
  justify-content: center;
  width: 100%;
}

.car-card {
  background: #ffffff;
  border-radius: 25px;
  border: 1px solid #f4f7fa;
  border-left: 0;
  overflow: hidden;
  flex: 1;
  transition: transform 0.3s ease;
}

.car-card:hover {
  transform: translateY(-5px);
}

.car-card.first {
  border-radius: 25px;
}

.car-card:not(.first) {
  border-radius: 15px;
}

.card-image {
  width: 100%;
  height: 229px;
  border-radius: 5px 5px 0 0;
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.card-content {
  padding: 0 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  color: #161c2d;
  text-align: center;
  margin-top: 15px;
}

.card-description {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.25;
  color: #2a2a2a;
  opacity: 0.7;
  height: 56.876px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-specs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card-spec-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
}

.card-spec-item {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  white-space: nowrap;
}

.card-spec-item.wide {
  width: 92px;
}

.card-spec-item.narrow {
  width: 74px;
}

.card-spec-label {
  font-size: 14px;
  font-weight: 500;
  color: #666666;
}

.card-spec-label.regular {
  font-weight: 400;
}

.card-spec-value {
  font-size: 15px;
  font-weight: 500;
  color: #161c2d;
}

.card-spec-value.small {
  font-size: 14px;
}

.more-link {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  margin: 15px auto 0;
}

.more-text {
  font-size: 13px;
  font-weight: 700;
  color: #2a2a2a;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.more-icon {
  width: 24px;
  height: 24px;
}

.btn-primary {
  background-color: #473bf0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  padding: 13px 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary:hover {
  background-color: #3a30c8;
}

/* Полноэкранный режим галереи */
.fullscreen-gallery {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
}

.fullscreen-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-fullscreen {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  transition: background 0.3s;
}

.close-fullscreen:hover {
  background: rgba(0, 0, 0, 0.7);
}

#fullscreen-image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.fullscreen-arrows {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 32px;
  z-index: 10000;
  pointer-events: none;
}

.fullscreen-arrow {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s;
  pointer-events: all;
}

.fullscreen-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.fullscreen-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 16px;
  z-index: 10000;
}

/* Галерея для карточек в ленте */
.card-image-purchased .gallery-arrows,
.card-image-purchased .image-counter {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-image-purchased:hover .gallery-arrows,
.card-image-purchased:hover .image-counter {
  opacity: 1;
}

/* Ограничение миниатюр в ленте до 4 на десктопе */
.thumbnails-container .thumbnail:nth-child(n + 6) {
  display: none;
}

@media (max-width: 1440px) {
  .container {
    max-width: 1200px;
  }
}

@media (max-width: 1200px) {
  .cards-grid-purchased {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-title {
    font-size: 48px;
    line-height: 52px;
  }

  .content-wrapper {
    flex-direction: column;
  }

  .main-image {
    width: 100%;
    height: auto;
  }

  .thumbnails {
    flex-wrap: wrap;
    gap: 10px;
  }

  .info-section {
    max-width: 100%;
  }

  .filter-group {
    min-width: calc(33.333% - 10px);
    max-width: none;
  }

  /* На планшетах показываем все миниатюры с горизонтальным скроллом */
  .thumbnails-container .thumbnail:nth-child(n + 5) {
    display: block;
  }
}

@media (max-width: 992px) {
  .cards-grid-purchased {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-group {
    min-width: calc(50% - 10px);
  }

  .filters-form {
    gap: 12px;
    padding: 20px;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: 36px;
    line-height: 40px;
    text-align: center;
  }

  .cards-grid-purchased {
    grid-template-columns: 1fr;
  }

  .cards-grid {
    flex-direction: column;
    align-items: center;
  }

  .car-card {
    max-width: 100%;
    width: 100%;
  }

  .breadcrumbs {
    flex-wrap: wrap;
    font-size: 16px;
  }

  .filter-group {
    min-width: 100%;
    max-width: 100%;
  }

  .filter-buttons {
    width: 100%;
    flex-direction: column;
    gap: 10px;
    margin-left: 0;
  }

  .btn-apply,
  .btn-reset {
    width: 100%;
  }

  .filters-form {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  .filter-label {
    text-align: center;
    margin-right: 0;
    margin-bottom: 5px;
  }

  /* Адаптивность для галереи на мобильных */
  .gallery-arrows {
    padding: 0 8px;
  }

  .gallery-arrow {
    width: 32px;
    height: 32px;
  }

  .fullscreen-btn {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
  }

  .fullscreen-arrows {
    padding: 0 16px;
  }

  .fullscreen-arrow {
    width: 48px;
    height: 48px;
  }

  /* На мобильных показываем только 2 миниатюры */
  .thumbnail {
    min-width: calc(50% - 4px);
    height: 100px;
  }

  .thumbnails .arrow {
    display: flex !important; /* Принудительно показываем стрелки */
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 3;
  }

  .thumbnails-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: calc(100% - 70px);
  }

  .thumbnails-container::-webkit-scrollbar {
    display: none;
  }

  /* Показываем все миниатюры для возможности скролла */
  .thumbnails-container .thumbnail {
    display: block !important;
    min-width: calc(50% - 4px) !important;
    height: 100px;
    flex: 0 0 auto;
  }

  .thumbnails-container .thumbnail:nth-child(n + 3) {
    display: block !important;
  }
}

@media (max-width: 600px) {
  .breadcrumbs {
    padding-top: 12px;
  }
}

@media (max-width: 480px) {
  .card-content-purchased {
    padding: 0 10px;
  }

  .card-details-purchased {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }

  .section-title {
    font-size: 32px;
    text-align: center;
  }

  .gallery-arrow {
    width: 28px;
    height: 28px;
  }

  .fullscreen-arrow {
    width: 40px;
    height: 40px;
  }

  .thumbnail {
    min-width: calc(50% - 4px);
    height: 80px;
  }

  .thumbnails .arrow {
    width: 25px;
    height: 25px;
    font-size: 14px;
  }

  .thumbnails-container {
    max-width: calc(100% - 60px);
  }

  .thumbnail {
    min-width: calc(50% - 4px) !important;
    height: 80px;
  }
}

/* FAQ аккордион */
.FAQ_content {
  grid-template-columns: auto;
}

.FAQ--caption,
.FAQ--desc {
  text-align-last: left;
}

.FAQ__accordion .ac {
  border: 1px solid #efefef !important;
}

@media (max-width: 1250px) {
  .FAQ_content {
    justify-items: left;
    align-items: unset;
  }

  .FAQ_contentWrapper {
    width: 100%;
    align-items: unset;
  }
}

@media (max-width: 800px) {
  .FAQ--caption {
    text-align: left;
    font-size: 36px;
  }

  .FAQ--desc {
    font-size: 20px;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .FAQ__accordion .ac.is-active {
    padding: 12px !important;
  }

  .FAQ__accordion .ac {
    padding: 15px 0;
  }
}

@media (max-width: 450px) {
  .FAQ--caption {
    font-size: 28px;
  }

  .FAQ--desc {
    font-size: 16px;
  }
}
.auto-assessment-cta {
  margin-top: 24px;
  padding: 20px;
  border-radius: 12px;
  background: #f4f7fa;
}

.auto-assessment-cta p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.auto-assessment-cta .btn-primary {
  max-width: 100%;
  box-sizing: border-box;
  white-space: normal;
}

.auto-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
  background: #f4f7fa;
  color: #505567;
  text-align: center;
}

.main-image > .auto-image-placeholder {
  min-height: 260px;
}

