.yachts__controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-top: var(--space-9);
  margin-bottom: var(--space-5);
  align-items: stretch;
}

.yachts__controls-row {
  display: flex;
  gap: var(--space-5);
  width: 100%;
  align-items: flex-start;
}

.yachts__filters {
  display: flex;
  gap: var(--space-1);
  justify-content: center;
  flex-wrap: wrap;
}

.yachts__filter-tab {
  display: flex;
  flex-direction: column;
  max-width: 270px;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1);
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(2, 40, 55, 0.4);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

@media (hover: hover) {
  .yachts__filter-tab:hover {
    border-bottom-color: rgba(2, 40, 55, 0.6);
  }
}

.yachts__filter-tab:active {
  border-bottom-color: #022837;
}

.yachts__filter-tab:focus-visible {
  outline: 2px solid #022837;
  outline-offset: 2px;
}

.yachts__filter-tab--active {
  border-bottom-color: #022837;
}

.yachts__filter-title {
  font-family: var(--font-family-heading);
  font-size: 24px;
  font-weight: var(--font-weight-regular);
  color: #161515;
  line-height: var(--line-height-tight);
}

.yachts__filter-description {
  font-family: var(--font-family-body);
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: #606060;
  line-height: var(--line-height-body);
}

.yachts__grid-wrapper {
  position: relative;
  min-height: 200px;
}

.yachts__grid-wrapper--loading {
  opacity: 0.5;
  pointer-events: none;
}

.yachts__grid-wrapper--loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid #022837;
  border-top-color: transparent;
  border-radius: 50%;
  animation: yacht-filter-spin 0.8s linear infinite;
}

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

.yachts__search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.yachts__search-label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  width: 100%;
}

.yachts__search-label-text {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.yachts__search-input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border-radius: 999px;
  border: 1px solid rgba(2, 40, 55, 0.2);
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.yachts__search-input:hover {
  border-color: rgba(2, 40, 55, 0.4);
}

.yachts__search-input:focus-visible {
  border-color: #022837;
  box-shadow: 0 0 0 1px #022837;
}

.yachts__price {
  margin-top: var(--space-5);
}

.yachts__price-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.yachts__price-label {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.yachts__price-range-label {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.yachts__price-controls {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.yachts__price-sliders {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.yachts__price-inputs {
  display: flex;
  gap: var(--space-2);
}

.yachts__price-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  border-radius: 999px;
  border: 1px solid rgba(2, 40, 55, 0.2);
}

.yachts__price-input-prefix {
  font-size: var(--font-size-small);
  color: var(--color-text-muted);
}

.yachts__price-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--font-size-body);
}

.yachts__price-input:focus-visible {
  outline: none;
}

.yachts__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  margin-top: var(--space-2);
  justify-content: space-between;
}

.yachts__chip-wrapper {
  position: relative;
}

.yachts__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(2, 40, 55, 0.18);
  border-radius: 999px;
  padding: 6px 14px;
  background: #f8f5ec;
  font-size: var(--font-size-small);
  color: #161515;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.yachts__chip:hover {
  background: #f0ebe0;
  border-color: rgba(2, 40, 55, 0.4);
}

.yachts__chip:active {
  background: #e4dccd;
  border-color: #022837;
}

.yachts__chip-label {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.yachts__chip-icon {
  width: 10px;
  height: 6px;
  display: block;
  fill: currentColor;
}

.yachts__chip-toggle[data-yachts-filter-toggle="price"]
  .yachts__chip-label::after {
  content: "";
}

.yachts__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 5;
  opacity: 0;
  transform: translateY(4px);
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.08));
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.yachts__dropdown--price {
  left: auto;
  right: 0;
}

.yachts__dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 18px;
  width: 12px;
  height: 12px;
  background: #f8f5ec;
  border-top: 1px solid rgba(2, 40, 55, 0.14);
  border-left: 1px solid rgba(2, 40, 55, 0.14);
  transform: rotate(45deg);
}

.yachts__dropdown--price::before {
  left: auto;
  right: 18px;
}

.yachts__dropdown.yachts__dropdown--open {
  opacity: 1;
  transform: translateY(0);
}

.yachts__search-popup {
  padding: 10px;
  border: 1px solid rgba(2, 40, 55, 0.14);
  background: #f8f5ec;
}

.yachts__search-popup .yachts__search-input {
  min-width: 220px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(2, 40, 55, 0.18);
  background: transparent;
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.yachts__search-popup .yachts__search-input:hover {
  border-color: rgba(2, 40, 55, 0.35);
}

.yachts__search-popup .yachts__search-input:focus-visible {
  border-color: #022837;
  box-shadow: 0 0 0 1px #022837;
  background: #ffffff;
}

.yachts__price-popup {
  display: inline-block;
  padding: 10px;
  border: 1px solid rgba(2, 40, 55, 0.14);
  background: #f8f5ec;
}

.yachts__price-fields {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.yachts__price-separator {
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
}

.yachts__price-popup .yachts__price-input {
  width: 80px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(2, 40, 55, 0.18);
  background: transparent;
  font-size: var(--font-size-small);
  text-align: left;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.yachts__price-popup .yachts__price-input:hover {
  border-color: rgba(2, 40, 55, 0.35);
}

.yachts__price-popup .yachts__price-input:focus-visible {
  outline: none;
  border-color: #022837;
  box-shadow: 0 0 0 1px #022837;
  background: #ffffff;
}

.yachts__price-apply {
  padding: 8px 12px;
  border: 1px solid #022837;
  background: #022837;
  font-size: var(--font-size-small);
  line-height: var(--line-height-body);
  color: #f8f5ec;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.yachts__price-apply:hover {
  background: rgba(2, 40, 55, 0.85);
  border-color: rgba(2, 40, 55, 0.85);
}

.yachts__price-apply:active {
  background: #022837;
  border-color: #022837;
  color: #f8f5ec;
}

.yachts__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-9);
  margin-top: var(--space-9);
  margin-bottom: var(--space-9);
  justify-content: center;
}

.yachts__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
  gap: var(--grid-gap);
  animation: yacht-filter-fade-in 0.4s ease;
}

@keyframes yacht-filter-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.yachts__empty {
  text-align: center;
  padding: var(--space-12);
  font-size: var(--font-size-body);
  color: var(--color-text-muted);
}

.btn--yachts {
  padding-inline: 46px;
}

@media (max-width: 1024px) {
  .yachts__controls {
    align-items: stretch;
  }

  .yachts__controls-row {
    flex-direction: column;
  }

  .yachts__grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .yachts__controls {
    gap: var(--space-3);
  }

  .yachts__controls-row {
    gap: var(--space-3);
  }

  .yachts__filters {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-1);
  }

  .yachts__filter-tab {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    border: 1px solid #022837;
    border-radius: 0;
    background: #022837;
    min-height: 79px;
  }

  .yachts__filter-tab .yachts__filter-title {
    color: #f8f5ec;
  }

  .yachts__filter-tab .yachts__filter-description {
    color: #aeaeae;
  }

  .yachts__filter-tab--active {
    background: #f8f5ec;
    border-color: #aeaeae;
  }

  .yachts__filter-tab--active .yachts__filter-title {
    color: #161515;
  }

  .yachts__filter-tab--active .yachts__filter-description {
    color: #606060;
  }

  .yachts__filter-title {
    font-size: 16px;
    text-align: center;
  }

  .yachts__filter-description {
    font-size: 10px;
    text-align: center;
    max-width: 140px;
  }

  .yachts__grid {
    grid-template-columns: 1fr;
  }

  .yachts__buttons {
    flex-direction: column;
    gap: var(--space-5);
  }

  .yachts__buttons .btn {
    width: 100%;
  }
}
