.category-page .hero-copy {
  max-width: 820px;
}

.category-filter-shell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.category-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.category-filter-chip,
.category-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .72);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

:root[data-theme="dark"] .category-filter-chip,
:root[data-theme="dark"] .category-filter-reset {
  background: rgba(255, 255, 255, .04);
}

.category-filter-chip:hover,
.category-filter-reset:hover {
  color: var(--text-1);
  border-color: rgba(233, 138, 21, .32);
  transform: translateY(-1px);
}

.category-filter-chip.active {
  background: rgba(233, 138, 21, .12);
  border-color: rgba(233, 138, 21, .28);
  color: var(--accent-2);
}

.category-filter-count {
  min-width: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .14);
  color: var(--text-3);
  font-size: 11px;
  text-align: center;
}

.vehicle-filters-shell {
  padding-top: 0;
  padding-bottom: 18px;
}

.vehicle-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .6);
}

:root[data-theme="dark"] .vehicle-filters {
  background: rgba(255, 255, 255, .03);
}

.vehicle-filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 170px;
  min-width: 150px;
}

.vehicle-filter-field label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.vehicle-filter-field select {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .88);
  color: var(--text-1);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

:root[data-theme="dark"] .vehicle-filter-field select {
  background: rgba(255, 255, 255, .04);
  color: var(--text-1);
  color-scheme: dark;
}

:root[data-theme="dark"] .vehicle-filter-field select option {
  background: #1a1a1a;
  color: #e0e0e0;
}

.vehicle-filter-field select:hover {
  border-color: rgba(233, 138, 21, .32);
}

.vehicle-filter-field select:focus-visible {
  outline: none;
  border-color: rgba(233, 138, 21, .55);
  box-shadow: 0 0 0 4px rgba(233, 138, 21, .14);
}

.vehicle-filter-clear {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, transform .18s ease;
}

.vehicle-filter-clear:hover {
  color: var(--accent-2);
  border-color: rgba(233, 138, 21, .32);
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .vehicle-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
  }

  .vehicle-filter-field {
    flex: none;
    width: 100%;
    min-width: 0;
  }

  .vehicle-filter-clear {
    width: 100%;
    justify-content: center;
  }
}

.category-results-shell {
  padding-top: 0;
}

.category-results-shell .results-grid {
  margin-top: 0;
}

.category-results-shell .results-bar {
  margin-bottom: 0;
}

.category-results-shell .results-count {
  white-space: nowrap;
}

.category-topbar .site-topbar-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.category-search-shell {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.category-search-toggle {
  flex: 0 0 auto;
}

.category-top-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 0;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: width .22s ease, max-width .22s ease, opacity .18s ease, transform .18s ease;
}

.category-search-shell.is-open .category-top-search {
  width: min(520px, 58vw);
  max-width: 520px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.category-top-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--border) 86%, transparent);
  background: rgba(255, 255, 255, .95);
  color: var(--text-1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}

:root[data-theme="dark"] .category-top-search input {
  background: rgba(17, 26, 45, .96);
}

.category-top-search input:focus {
  outline: none;
  border-color: rgba(233, 138, 21, .55);
  box-shadow: 0 0 0 4px rgba(233, 138, 21, .14), 0 12px 30px rgba(15, 23, 42, .12);
}

.category-search-submit {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(135deg, #2f2a26, #171412);
  color: #fff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .24);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.category-search-submit svg {
  width: 18px;
  height: 18px;
}

.category-search-submit:hover {
  transform: translateY(-1px);
}

.category-search-shell.is-open .category-search-toggle {
  display: none;
}

@media (max-width: 760px) {
  .category-topbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .category-topbar .site-brand-block,
  .category-topbar .site-topbar-actions {
    min-width: 0;
  }

  .category-topbar .site-brand-block {
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 8px;
  }

  .category-topbar .site-brand {
    min-width: 0;
  }

  .category-topbar .site-brand strong {
    font-size: 13px;
    line-height: 1.1;
  }
  
  .category-topbar .site-brand-block {
    gap: 6px;
  }

  .category-topbar .site-brand span:last-child {
    display: none;
  }

  .category-topbar .site-topbar-actions {
    flex: 0 0 auto;
    position: relative;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
  }
  
  .category-top-search {
    position: static;
    width: 0;
    max-width: 0;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
  }

  .category-search-shell {
    flex: 0 0 auto;
    position: relative;
    justify-content: flex-end;
  }

  .category-search-shell.is-open .category-top-search {
    width: min(70vw, 260px);
    max-width: min(70vw, 260px);
  }

  .category-top-search {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(70vw, 260px);
    min-width: 0;
    z-index: 70;
    padding: 6px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
    box-shadow: 0 16px 34px rgba(15, 23, 42, .14);
  }

  .category-top-search input {
    min-height: 36px;
    font-size: 13px;
  }

  .category-search-submit {
    width: 36px;
    height: 36px;
  }

  .category-filter-shell {
    align-items: stretch;
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .category-filter-row {
    width: 100%;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .category-filter-row::-webkit-scrollbar { display: none; }

  .category-filter-chip,
  .category-filter-reset {
    min-height: 36px;
    padding: 0 12px;
  }
}
