/* Globals */

.section {
  margin-bottom: 8px;
}

.inner {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: 30px 20px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

/* Dealers-catalog */

.dealers-catalog--item-list {
  gap: var(--spacing-xxs);
}

.dealers-catalog--item {
  background: var(--color-light-gray);
  border-radius: var(--radius-md);
  width: 100%;
  height: 185px;
  padding: 16px;
  white-space: normal;
  flex-shrink: 0;
}

.dealers-catalog--item-header {
  display: flex;
  align-content: center;
  justify-content: space-between;
}

.dealers-catalog--item-header-title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
}

.dealers-catalog--item-header-rating {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  margin: 4px 0;
}

.dealers-catalog--item-header-average-rating {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin: 0 8px;
  white-space: nowrap;
}

.dealers-catalog--item-header-total-reviews {
  font-size: var(--text-sm);
  opacity: 50%;
  white-space: nowrap;
}

.dealers-catalog--item-working-hours {
  font-size: var(--text-sm);
  opacity: 50%;
  margin: 4px 0;
}

.dealers-catalog--item-adress {
  font-size: var(--text-sm);
}

.dealers-catalog--item-header-rating-image {
  margin-right: 4px;
}

.dealer-info__logo {
  width: 80px;         
  height: 80px;        
  border-radius: var(--radius-xs);
  object-fit: contain; 
  background-color: var(--color-light-gray);
}

/* Star rating styles */
.dealers-catalog--item-header-grade {
  display: flex;
  align-items: center;
}

.dealer-rating__stars {
  display: flex;
  gap: 1px;
  margin-right: 4px;
}

.dealer-rating__stars .star {
  position: relative;
  width: 16px;
  height: 16px;
}

.dealer-rating__stars .star img {
  width: 16px;
  height: 16px;
}

.dealer-rating__stars .full-star img {
  filter: none;
}

.dealer-rating__stars .partial-star {
  position: relative;
  overflow: hidden;
}

.dealer-rating__stars .star-bg {
  opacity: 0.3;
}

.dealer-rating__stars .star-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--fill-percentage);
  overflow: hidden;
}

.dealer-rating__stars .empty-star img {
  opacity: 0.3;
}
        
.load_more_btn {
  display: block;
  padding: 16px;
  background: var(--color-light-gray);
  color: var(--color-black);
  text-align: center;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  border: none;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
}

.load_more_btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.load_more_btn.hidden {
  display: none;
}

.dealers-catalog--item.hidden {
  display: none;
}

.dealers-catalog-city-sorting,
.city-sorting-btn {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.city-dropdown {
  position: relative;
  display: inline-block;
}

.city-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 200px;
  z-index: 1001;
  margin-top: 8px;
  padding: 18px 0;
}

.city-dropdown-content.show {
  display: block;
}

.city-option {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 500;
  font-size: var(--text-md);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.city-dropdown-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1000;
}

.city-dropdown-backdrop.show {
  display: block;
}

.city-sorting-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
}

.city-sorting-btn img {
  transition: transform 0.3s ease;
}

.city-sorting-btn.active img {
  transform: rotate(180deg);
}

.sorting-container {
  margin-bottom: 10px;
}

.dealers-catalog-sorting {
  position: relative;
  display: inline-block;
  background: var(--color-light-gray);
  border-radius: 16px;
}

.sorting-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
  color: var(--color-black);
}

.sorting-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 180px;
  z-index: 1001;
  margin-top: 8px;
  padding: 12px 0;
}

.sorting-dropdown.show {
  display: block;
}

.sorting-option {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s;
  color: var(--color-black);
}

.sorting-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1000;
}

.sorting-backdrop.show {
  display: block;
}

.dealers-catalog__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 10px;
}

.dealers-catalog-city-sorting {
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* Menu_bottom */

.menu_bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.menu_bottom__inner {
  background: #fff;
  padding: 16px 16px 34px 16px;
  border-radius: 32px 32px 0 0;
}

.menu_bottom-nav-item--image {
  width: 24px;
  height: 24px;
}

.menu_bottom-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
}

.menu_bottom-nav--item {
  width: 67px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-weight: var(--weight-medium);
  font-size: var(--text-xs);
}


/* Rating-list */

.sorting-container {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.year-dropdown-container {
  position: relative;
  display: inline-block;
  background: var(--color-light-gray);
  border-radius: 16px;
  margin-bottom: 0;
}

.year-dropdown {
  position: relative;
}

.year-sorting-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s;
  color: var(--color-black);
  min-width: 120px;
}

.year-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  min-width: 150px;
  z-index: 1001;
  margin-top: 8px;
  padding: 12px 0;
}

.year-dropdown-content.show {
  display: block;
}

.year-option {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s;
  color: var(--color-black);
  text-decoration: none;
  display: block;
}

.year-option:hover {
  background-color: var(--color-light-gray);
}

.year-option.active {
  color: var(--color-primary);
  font-weight: var(--weight-semibold);
}

.year-dropdown-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  z-index: 1000;
}

.year-dropdown-backdrop.show {
  display: block;
}

.dealers-catalog--item-year-info {
  font-size: var(--text-sm);
  opacity: 70%;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.no_logo {
  width: 80px;
  height: 80px;
  background-color: var(--color-light-gray);
  font-weight: var(--weight-bold);
  font-size: 32px;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
}

.centered-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dealers-catalog-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
}

.centered-sorting {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.holdings-catalog--item {
  height: auto;
  min-height: 112px;
}

.rating-intro {
  width: 100%;
  max-width: 980px;
  margin: 4px auto 18px;
  font-size: var(--text-md);
  line-height: 1.45;
  text-align: center;
  color: rgba(0, 0, 0, 0.82);
}

.rating-view-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  width: min(480px, 100%);
  margin: 0 auto 18px;
  background: var(--color-light-gray);
  border-radius: 999px;
}

.rating-view-toggle__button {
  min-width: 0;
  flex: 1 1 0;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(0, 0, 0, 0.6);
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.rating-view-toggle__button.is-active {
  background: var(--color-white);
  color: var(--color-black);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.rating-view-panel {
  display: none;
}

.rating-view-panel.is-active {
  display: block;
}

.rating-map-shell {
  position: relative;
}

.rating-map {
  width: 100%;
  min-height: 720px;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(180deg, #f4f4f4 0%, #e9e9e9 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

@media (max-width: 767px) {
  .rating-view-toggle {
    width: 100%;
  }

  .rating-view-toggle__button {
    padding: 11px 14px;
  }

  .rating-map {
    min-height: 460px;
    border-radius: 24px;
  }
}

.section-title {
  font-size: var(--text-xxl);
  font-weight: var(--weight-bold);
}

.group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-text {
  font-size: 16px;
}

.select-dealer__inner {
  background: var(--color-black);
  border-radius: var(--radius-xl);
  padding: 30px 20px;
  color: var(--color-white);
}

.select-dealer-image {
  width: 100%;
  height: 250px;
  background: var(--color-white);
  border-radius: 16px;
}

.section-list {
  display: flex;
  flex-direction: column;
  padding: 0 0 0 20px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
}

/* Advice */

.advice_subtitle-image {
  margin-left: 6px;
  background: var(--color-light-gray);
  border-radius: 20px;
}

.advice--item {
  width: 292px;
  height: 175px;
  background: #222222;
  border-radius: var(--radius-md);
  padding: 16px 16px 45px 16px;
  white-space: normal;
  flex-shrink: 0;
}

.advice_card-image {
  margin-bottom: 10px;
}

.advice_card-text {
  font-size: var(--text-md);
}

.list--scroll {
  margin: 0 -20px;
  list-style: none;
  padding: 0;
  display: flex;
  gap: var(--spacing-xxs);
  overflow-x: auto;
  white-space: nowrap;
  z-index: 999;

  -ms-overflow-style: none;
  scrollbar-width: none;
}

.list--scroll::-webkit-scrollbar {
  display: none;
}

.item--scroll:last-child {
  margin-right: 20px;
}

.item--scroll:first-child {
  margin-left: 20px;
}

.dealer-rating {
  cursor: pointer;
  background: var(--color-light-gray);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rating_grade-image {
  background: var(--color-white);
  opacity: 50%;
  padding: 6px;
  border-radius: var(--radius-xs);
}

.dealer-rating__link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.dealer-rating__value {
  font-weight: var(--weight-medium);
}

.holding-empty-state {
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--color-light-gray);
  font-size: var(--text-md);
}
