/* =========================================================
   SERVICE / UPGRADE FILTER
   Titan Vans ecommerce filter rail + collapsible sections
   Used by service-filter.php
   ========================================================= */

/* =========================================================
   DESIGN TOKENS
   Pulls from service-cards.css when loaded after it.
   ========================================================= */

:root {
  --service-filter-max-width: 1540px;
  --service-filter-sidebar-width: 318px;
  --service-filter-sidebar-width-lg: 292px;

  --service-filter-page-padding-x: clamp(0.75rem, 1vw, 1.15rem);
  --service-filter-layout-gap: clamp(1rem, 1.4vw, 1.6rem);

  --service-filter-bg-mobile: rgba(10, 12, 16, 0.58);

  --service-filter-border: var(--svc-card-border, rgba(255, 255, 255, 0.09));
  --service-filter-border-hover: var(--svc-card-border-hover, rgba(170, 0, 0, 0.34));
  --service-filter-divider: var(--svc-divider, rgba(255, 255, 255, 0.075));

  --service-filter-text: var(--svc-text-strong, rgba(255, 255, 255, 0.96));
  --service-filter-text-soft: var(--svc-text-muted, rgba(255, 255, 255, 0.7));
  --service-filter-text-muted: var(--svc-text-soft, rgba(255, 255, 255, 0.5));

  --service-filter-accent: var(--svc-accent, var(--theme-accent, #aa0000));
  --service-filter-accent-hover: var(--svc-accent-hover, var(--theme-accent-deep, #7d0000));
  --service-filter-accent-soft: var(--svc-accent-soft, rgba(170, 0, 0, 0.12));

  --service-filter-radius-panel: var(--svc-radius-card, 14px);
  --service-filter-radius-control: 5px;
  --service-filter-radius-media: 10px;
  --service-filter-radius-pill: 999px;

  --service-filter-shadow-soft:
    0 14px 32px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);

  --service-filter-focus:
    0 0 0 3px rgba(170, 0, 0, 0.24),
    0 0 0 6px rgba(170, 0, 0, 0.1);

  --service-filter-speed: 180ms ease;
  --service-filter-speed-slow: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   BASE / SAFETY
   ========================================================= */

.service-browser-layout,
.service-browser-layout *,
.service-model-filter,
.service-model-filter *,
.service-model-filter *::before,
.service-model-filter *::after {
  box-sizing: border-box;
}

.service-browser-section {
  position: relative;
  overflow: visible;
}

.service-model-filter,
.service-model-filter__sidebar,
.service-model-filter__sections,
.service-model-filter__section-body,
.service-model-filter__chip-row,
.model-pill,
.model-pill__label {
  min-width: 0;
  max-width: 100%;
}

/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.service-browser-layout {
  position: relative;

  display: grid;
  grid-template-columns:
    minmax(280px, var(--service-filter-sidebar-width))
    minmax(0, 1fr);
  align-items: start;
  gap: var(--service-filter-layout-gap);

  width: min(100%, var(--service-filter-max-width));
  margin-inline: auto;
  padding-inline: var(--service-filter-page-padding-x);

  overflow: visible;
}

.service-browser-layout > * {
  min-width: 0;
}

.service-browser-layout__results {
  width: 100%;
  min-width: 0;
}

.service-browser-layout.is-filter-collapsed {
  grid-template-columns: 0 minmax(0, 1fr);
  gap: 0;
}

/* =========================================================
   FILTER COLUMN
   ========================================================= */

.service-model-filter {
  position: sticky;
  top: clamp(5.35rem, 7vw, 6.8rem);
  z-index: 2;

  align-self: start;

  width: 100%;
  height: fit-content;
  margin: 0;
}

.service-browser-layout.is-filter-collapsed .service-model-filter {
  width: 0;
  min-width: 0;
  overflow: visible;
}

/* =========================================================
   FILTER COVER / NAV SWAP BAR
   ========================================================= */

.service-model-filter__cover {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;

  min-height: var(--nav-h, 3.3rem);
  padding: 0;

  border-bottom: 1px solid rgba(255, 255, 255, 0.085);

  background: var(--nav-surface-bg, rgba(12, 14, 18, 0.92));
  box-shadow: var(--nav-surface-shadow, 0 12px 28px rgba(0, 0, 0, 0.18));

  backdrop-filter: var(--nav-surface-blur, blur(14px));
  -webkit-backdrop-filter: var(--nav-surface-blur, blur(14px));

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(-110%);

  transition:
    transform var(--service-filter-speed-slow),
    opacity 220ms ease,
    visibility 220ms ease,
    background-color 220ms ease,
    box-shadow 220ms ease;
}

.service-model-filter__cover[hidden] {
  display: block !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-110%);
}

html.filter-nav-swap-active .service-model-filter__cover:not([hidden]),
body.filter-nav-swap-active .service-model-filter__cover:not([hidden]) {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

html.filter-nav-swap-inactive .service-model-filter__cover:not([hidden]),
body.filter-nav-swap-inactive .service-model-filter__cover:not([hidden]) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-110%);
}

.service-model-filter__cover-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.9rem;

  width: 100%;
  min-height: var(--nav-h, 3.3rem);

  max-height: 52px;

  margin: 0;
  
  padding: 0rem 0rem;
}

.service-model-filter__cover-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;

  min-width: 0;
  flex-shrink: 0;

  padding-inline: 1rem;
}

.service-model-filter__cover-logo {
  display: inline-flex;
  align-items: center;

  height: var(--nav-h, 3.3rem);
  min-height: var(--nav-h, 3.3rem);

  border-radius: 0.5rem;
  outline: none;
}

.service-model-filter__cover-logo:focus-visible {
  box-shadow: var(--service-filter-focus);
}

.service-model-filter__cover-logo img {
  display: block;
  width: 11rem;
  height: auto;
}

.service-model-filter__cover-brand-spacer {
  width: 5.25rem;
  min-height: calc(var(--nav-h, 3.3rem) - 0.4rem);
  flex: 0 0 auto;
}

.service-model-filter__cover-copy {
  display: grid;
  justify-self: start;
  gap: 0.08rem;

  min-width: 0;
  max-width: min(62vw, 44rem);
}

.service-model-filter__cover-eyebrow {
  display: block;
  margin: 0;

  color: var(--service-filter-text-muted);

  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.05;
  text-transform: uppercase;
}

.service-model-filter__cover-title {
  margin: 0;

  color: var(--service-filter-text);

  font-size: 1.15rem;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* =========================================================
   SIDEBAR PANEL / HEADER
   ========================================================= */

.service-model-filter__sidebar {
  position: relative;

  width: 100%;
  padding: 0.55rem 0.35rem 0;

  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;

  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.service-browser-layout.is-filter-collapsed .service-model-filter__sidebar {
  display: none;
}

.service-model-filter__sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;

  padding: 0 0 1rem;

  margin-bottom: 1rem;
  border-bottom: 1px solid var(--service-filter-divider);
}

.service-model-filter__sidebar-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.service-model-filter__title {
  margin: 0 0 0.34rem;

  color: var(--service-filter-text);

  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.024em;
  line-height: 1.15;
}

.service-model-filter__description {
  max-width: 30ch;
  margin: 0;

  color: var(--service-filter-text-muted);

  font-size: 0.84rem;
  font-weight: 450;
  line-height: 1.45;
}

/* =========================================================
   FILTER SECTIONS
   ========================================================= */

.service-model-filter__sections {
  display: grid;
  gap: 0;

  width: 100%;
  padding-top: 0;
}

.service-model-filter__group {
  display: block;

  width: 100%;
  margin: 0;
  padding: 0;

  border: 0;
}

.service-model-filter__group + .service-model-filter__group {
  border-top: 0;
}

.service-model-filter__legend {
  margin: 0;
}

.service-model-filter__legend--sr-only {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;

  border: 0 !important;

  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.service-model-filter__section-frame {
  padding: 0.5rem 0;

  border: 0;
  border-radius: 0;

  background: transparent;
  box-shadow: none;
}

.service-model-filter__section-body {
  margin: 0;
  overflow: visible;
}

/* =========================================================
   COLLAPSIBLE SECTION HEADERS
   Hover matches the option hover treatment.
   Divider sits under title + icon.
   ========================================================= */

.service-model-filter__section-frame--collapsible {
  overflow: visible;
}

.service-model-filter__section-head {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;

  min-height: 2.5rem;
  margin: 0 -0.6rem 0.82rem;
  padding: 0.44rem 0.82rem 0.82rem;

  border: 1px solid transparent;
  border-radius: var(--service-filter-radius-media);

  cursor: pointer;
  list-style: none;
  user-select: none;

  color: var(--service-filter-text-muted);

  transform: translate3d(0, 0, 0);

  transition:
    transform var(--service-filter-speed),
    border-color var(--service-filter-speed),
    color var(--service-filter-speed),
    box-shadow var(--service-filter-speed),
    background var(--service-filter-speed);
}

.service-model-filter__section-head::after {
  content: "";

  position: absolute;
  left: 0.82rem;
  right: 0.82rem;
  bottom: 0;

  height: 1px;

  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.13) 0%,
      rgba(255, 255, 255, 0.075) 56%,
      rgba(255, 255, 255, 0.02) 100%
    );

  opacity: 1;
  pointer-events: none;

  transition: opacity var(--service-filter-speed);
}

.service-model-filter__section-head:hover::after,
.service-model-filter__section-head:focus-visible::after {
  opacity: 0;
}

.service-model-filter__section-head::-webkit-details-marker {
  display: none;
}

.service-model-filter__section-head::marker {
  content: "";
}

.service-model-filter__section-head:hover {
  color: var(--service-filter-text);
  border-color: rgba(255, 255, 255, 0.09);

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.026) 100%
    );

  transform: translate3d(0, -1px, 0);
}

.service-model-filter__section-head:focus {
  outline: none;
}

.service-model-filter__section-head:focus-visible {
  color: var(--service-filter-text);
  border-color: rgba(255, 255, 255, 0.12);

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.026) 100%
    );

  box-shadow: var(--service-filter-focus);
}

.service-model-filter__section-title {
  margin: 0;

  color: currentColor;

  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.095em;
  line-height: 1.1;
  text-transform: uppercase;

  transition: color var(--service-filter-speed);
}

.service-model-filter__section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: 1.38rem;
  height: 1.38rem;

  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--service-filter-radius-pill);

  background: rgba(255, 255, 255, 0.026);
  color: var(--service-filter-text-muted);

  font-size: 0.62rem;
  line-height: 1;

  opacity: 0.72;

  transform: rotate(0deg);

  transition:
    transform var(--service-filter-speed),
    opacity var(--service-filter-speed),
    color var(--service-filter-speed),
    border-color var(--service-filter-speed),
    background var(--service-filter-speed);
}

.service-model-filter__section-icon i {
  display: block;
  line-height: 1;
}

.service-model-filter__section-head:hover .service-model-filter__section-icon,
.service-model-filter__section-head:focus-visible .service-model-filter__section-icon {
  opacity: 1;
  color: var(--service-filter-text-soft);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.service-model-filter__section-frame--collapsible[open] .service-model-filter__section-icon {
  transform: rotate(180deg);
}

.service-model-filter__section-frame--collapsible:not([open]) {
  padding-bottom: 1.05rem;
}

.service-model-filter__section-frame--collapsible:not([open]) .service-model-filter__section-head {
  margin-bottom: 0;
}

.service-model-filter__section-frame--collapsible[open] .service-model-filter__section-body {
  animation: serviceFilterSectionReveal 180ms ease both;
}

.service-model-filter__group--models:has(.model-pill__input:checked) .service-model-filter__section-title,
.service-model-filter.is-price-active .service-model-filter__group--price .service-model-filter__section-title,
.service-model-filter__group--sort:has(.sort-pill__input:checked) .service-model-filter__section-title {
  color: var(--service-filter-text-soft);
}

@keyframes serviceFilterSectionReveal {
  from {
    opacity: 0;
    transform: translate3d(0, -0.2rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* =========================================================
   CHIP LAYOUTS
   ========================================================= */

.service-model-filter__chip-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;

  width: 100%;
}

.service-model-filter__chip-row--sort {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;

  padding: 0.24rem;

  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--service-filter-radius-control);

  background: rgba(255, 255, 255, 0.026);
}

/* =========================================================
   SHARED CONTROL RESET
   ========================================================= */

.model-pill,
.sort-pill {
  position: relative;

  display: block;

  width: 100%;
  max-width: 100%;
  margin: 0;
}

.model-pill__input,
.sort-pill__input {
  position: absolute;

  opacity: 0;
  pointer-events: none;
}

.model-pill__label,
.sort-pill__label {
  position: relative;

  display: inline-flex;
  align-items: center;

  width: 100%;
  max-width: 100%;

  border: 1px solid transparent;

  color: var(--service-filter-text-soft);
  text-decoration: none;

  cursor: pointer;
  user-select: none;

  transform: translate3d(0, 0, 0);

  transition:
    transform var(--service-filter-speed),
    border-color var(--service-filter-speed),
    color var(--service-filter-speed),
    box-shadow var(--service-filter-speed),
    background var(--service-filter-speed);
}

.model-pill__label:hover,
.sort-pill__label:hover {
  color: var(--service-filter-text);
  transform: translate3d(0, -1px, 0);
}

/* =========================================================
   MODEL PILLS
   ========================================================= */

.model-pill__label {
  justify-content: flex-start;
  gap: 0.62rem;

  min-height: 3rem;
  padding: 0.46rem 0.58rem 0.46rem 0.48rem;

  border-radius: var(--service-filter-radius-control);
  border-color: transparent;

  background: transparent;
  box-shadow: none;

  font-size: 0.96rem;
  font-weight: 760;
  letter-spacing: -0.018em;
  line-height: 1;
  white-space: nowrap;
}

.model-pill__label:hover {
  border-color: rgba(255, 255, 255, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.026) 100%);
}

.model-pill__media {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;

  width: 6.35rem;
  height: 2.85rem;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--service-filter-radius-media);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.022) 100%);

  transition:
    border-color var(--service-filter-speed),
    background var(--service-filter-speed),
    transform var(--service-filter-speed);
}

.model-pill__icon {
  display: block;

  width: 7.1rem;
  max-width: 100%;
  height: auto;
  max-height: 3.5rem;

  object-fit: contain;

  transform: scale(1);
  transition: transform var(--service-filter-speed);
}

.model-pill__text {
  display: inline-block;
  flex: 1 1 auto;

  min-width: 0;
  max-width: 100%;
  overflow: hidden;

  color: rgba(255, 255, 255, 0.8);

  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.15;

  text-overflow: ellipsis;
  white-space: nowrap;

  transition: color var(--service-filter-speed);
}

.model-pill__label:hover .model-pill__text,
.model-pill__input:checked + .model-pill__label .model-pill__text,
.model-pill.is-selected .model-pill__text {
  color: rgba(255, 255, 255, 0.94);
}

.model-pill__count,
.model-pill__remove {
  flex: 0 0 auto;
}

.model-pill__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 1.72rem;
  height: 1.42rem;
  margin-left: auto;
  padding: 0 0.45rem;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--service-filter-radius-pill);

  background: rgba(255, 255, 255, 0.045);

  color: var(--service-filter-text-muted);

  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: -0.01em;
  line-height: 1;

  transition:
    border-color var(--service-filter-speed),
    background var(--service-filter-speed),
    color var(--service-filter-speed),
    opacity var(--service-filter-speed);
}

.model-pill__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 1.42rem;
  height: 1.42rem;

  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--service-filter-radius-pill);

  color: var(--service-filter-text-muted);
  background: rgba(255, 255, 255, 0.035);

  font-size: 0.68rem;
  line-height: 1;

  opacity: 0;
  transform: scale(0.88);

  transition:
    opacity var(--service-filter-speed),
    transform var(--service-filter-speed),
    width var(--service-filter-speed),
    min-width var(--service-filter-speed),
    margin-left var(--service-filter-speed),
    border-width var(--service-filter-speed),
    color var(--service-filter-speed),
    border-color var(--service-filter-speed),
    background var(--service-filter-speed);
}

.model-pill__remove i {
  line-height: 1;
}

.model-pill__label:hover .model-pill__media {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.055);
}

.model-pill__label:hover .model-pill__icon {
  transform: scale(1.025);
}

.model-pill__label:hover .model-pill__count {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--service-filter-text-soft);
  background: rgba(255, 255, 255, 0.06);
}

.model-pill__input:checked + .model-pill__label,
.model-pill.is-selected .model-pill__label {
  border-color: rgba(170, 0, 0, 0.28);
  color: var(--service-filter-text);

  background:
    linear-gradient(180deg, rgba(170, 0, 0, 0.14) 0%, rgba(170, 0, 0, 0.075) 100%);

  box-shadow:
    inset 3px 0 0 var(--service-filter-accent),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.model-pill__input:checked + .model-pill__label .model-pill__media,
.model-pill.is-selected .model-pill__label .model-pill__media {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.065);
}

.model-pill__input:checked + .model-pill__label .model-pill__count,
.model-pill.is-selected .model-pill__label .model-pill__count {
  border-color: rgba(255, 255, 255, 0.13);
  color: var(--theme-white, #fff);
  background: rgba(255, 255, 255, 0.07);
}

.model-pill__input:checked + .model-pill__label .model-pill__remove,
.model-pill.is-selected .model-pill__label .model-pill__remove {
  opacity: 0.84;
  transform: scale(1);
}

.model-pill__input:checked + .model-pill__label:hover .model-pill__remove,
.model-pill.is-selected .model-pill__label:hover .model-pill__remove {
  opacity: 1;
  color: var(--theme-white, #fff);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.085);
  transform: scale(1.06);
}

.model-pill:not(.is-selected) .model-pill__remove,
.model-pill__input:not(:checked) + .model-pill__label .model-pill__remove {
  opacity: 0;
  pointer-events: none;
}

.model-pill.is-count-empty:not(.is-selected) .model-pill__count {
  opacity: 0.52;
}

/* =========================================================
   PRICE FILTER
   ========================================================= */

.service-model-filter__price-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 0.32rem;

  width: 100%;
  min-width: 0;
  padding: 0.24rem;

  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--service-filter-radius-control);

  background: rgba(255, 255, 255, 0.026);
}

.service-model-filter__price-field {
  position: relative;

  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.24rem;

  min-width: 0;
  margin: 0;
}

.service-model-filter__price-label {
  display: block;

  padding: 0 0.12rem;

  color: var(--service-filter-text-muted);

  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.service-model-filter__price-input-shell {
  position: relative;

  display: flex;
  align-items: center;

  width: 100%;
  min-width: 0;
  min-height: 2.42rem;

  border: 1px solid transparent;
  border-radius: calc(var(--service-filter-radius-control) - 3px);

  background: transparent;

  color: var(--service-filter-text-soft);

  transform: translate3d(0, 0, 0);

  transition:
    transform var(--service-filter-speed),
    border-color var(--service-filter-speed),
    color var(--service-filter-speed),
    box-shadow var(--service-filter-speed),
    background var(--service-filter-speed);
}

.service-model-filter__price-input-shell:hover {
  color: var(--service-filter-text);
  background: rgba(255, 255, 255, 0.055);
  transform: translate3d(0, -1px, 0);
}

.service-model-filter__price-input-shell:focus-within {
  border-color: rgba(255, 255, 255, 0.105);
  color: var(--theme-white, #fff);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.092) 0%, rgba(255, 255, 255, 0.044) 100%);

  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.service-model-filter__price-input {
  appearance: none;
  -moz-appearance: textfield;

  display: block;

  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 2.42rem;
  padding: 0.58rem 0.62rem;

  border: 0;
  outline: 0;

  background: transparent;
  color: currentColor;

  font: inherit;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: -0.012em;
  line-height: 1;
  text-align: center;
}

.service-model-filter__price-input::-webkit-outer-spin-button,
.service-model-filter__price-input::-webkit-inner-spin-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
}

.service-model-filter__price-input::placeholder {
  color: var(--service-filter-text-muted);
  opacity: 0.85;
}

.service-model-filter__price-divider {
  align-self: end;

  display: block;

  width: 0.42rem;
  height: 1px;
  margin-bottom: 1.18rem;

  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.service-model-filter__price-hint {
  margin: 0.52rem 0 0;

  color: var(--service-filter-text-muted);

  font-size: 0.74rem;
  font-weight: 520;
  line-height: 1.35;
}

.service-model-filter.is-price-active .service-model-filter__price-control {
  border-color: rgba(170, 0, 0, 0.22);
  background:
    linear-gradient(180deg, rgba(170, 0, 0, 0.055) 0%, rgba(255, 255, 255, 0.022) 100%);
}

/* =========================================================
   SORT PILLS
   ========================================================= */

.sort-pill__label {
  justify-content: center;
  gap: 0.46rem;

  min-height: 2.5rem;
  padding: 0.62rem 0.64rem;

  border-radius: var(--service-filter-radius-pill);
  border-color: transparent;

  background: transparent;

  color: rgba(255, 255, 255, 0.76);

  font-size: 0.88rem;
  font-weight: 660;
  letter-spacing: -0.016em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.sort-pill__label:hover {
  color: rgba(255, 255, 255, 0.94);
  background: rgba(255, 255, 255, 0.055);
}

.sort-pill__label i {
  font-size: 0.9rem;
  line-height: 1;
  opacity: 0.82;

  transition: opacity var(--service-filter-speed);
}

.sort-pill__label span {
  display: inline-block;

  font-size: inherit;
  font-weight: 500;
  line-height: 1;
}

.sort-pill__input:checked + .sort-pill__label,
.sort-pill.is-selected .sort-pill__label {
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--theme-white, #fff);

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.105) 0%,
      rgba(255, 255, 255, 0.048) 100%
    );

  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.065);
}

.sort-pill__input:checked + .sort-pill__label i,
.sort-pill.is-selected .sort-pill__label i {
  opacity: 1;
}

/* =========================================================
   RESULTS NOTE / CLEAR FILTERS
   ========================================================= */

.service-model-filter__meta {
  position: relative;

  display: block;

  min-height: 3.1rem;
  margin: 0;
  padding: 0.9rem 0.2rem 0.12rem;
}

.service-model-filter__note {
  position: relative;

  margin: 0;
  padding-left: 0.92rem;
  padding-right: 7.25rem;

  color: var(--service-filter-text-muted);

  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.45;
}

.service-model-filter__note::before {
  content: "";

  position: absolute;
  top: 0.52em;
  left: 0;

  width: 0.34rem;
  height: 0.34rem;

  border-radius: 999px;

  background: var(--service-filter-accent);
  box-shadow: 0 0 0 4px rgba(170, 0, 0, 0.12);
}

.service-model-filter__clear {
  appearance: none;

  position: absolute;
  top: 0.72rem;
  right: 0.2rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  min-height: 2rem;
  padding: 0.48rem 0.72rem;

  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: var(--service-filter-radius-pill);
  outline: none;

  background: rgba(255, 255, 255, 0.035);
  color: var(--service-filter-text-soft);

  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;

  cursor: pointer;

  transition:
    opacity var(--service-filter-speed),
    visibility var(--service-filter-speed),
    transform var(--service-filter-speed),
    border-color var(--service-filter-speed),
    color var(--service-filter-speed),
    background var(--service-filter-speed),
    box-shadow var(--service-filter-speed);
}

.service-model-filter__clear:hover,
.service-model-filter__clear:focus-visible {
  transform: translate3d(0, -1px, 0);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--theme-white, #fff);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: var(--service-filter-focus);
}

.service-model-filter__clear[hidden] {
  display: inline-flex !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 2px, 0);
}

/* =========================================================
   TOGGLE BUTTONS
   ========================================================= */

.service-model-filter__toggle {
  appearance: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;

  min-height: 2.55rem;
  padding: 0.64rem 0.98rem;

  border: 1px solid var(--service-filter-border);
  border-radius: var(--service-filter-radius-pill);
  outline: none;

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.078) 0%, rgba(255, 255, 255, 0.035) 100%);

  color: var(--service-filter-text);

  font-size: 0.9rem;
  font-weight: 720;
  letter-spacing: -0.015em;
  line-height: 1;
  white-space: nowrap;

  cursor: pointer;

  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);

  transform: translate3d(0, 0, 0);

  transition:
    transform var(--service-filter-speed),
    border-color var(--service-filter-speed),
    color var(--service-filter-speed),
    box-shadow var(--service-filter-speed),
    background var(--service-filter-speed);
}

.service-model-filter__toggle:hover,
.service-model-filter__toggle:focus-visible {
  transform: translate3d(0, -1px, 0);
  border-color: rgba(255, 255, 255, 0.18);

  color: var(--theme-white, #fff);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.052) 100%);

  box-shadow:
    0 14px 26px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.075);
}

.service-model-filter__toggle--cover {
  justify-self: end;
  flex: 0 0 auto;

  min-height: calc(var(--nav-h, 3.3rem) - 0.4rem);
  margin: 0.2rem 0.35rem 0.2rem 0;
  padding: 0.78rem 1rem;

  color: var(--theme-text-main-soft, var(--service-filter-text));

  font-size: 0.9rem;
  font-weight: 700;

  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.04) 100%);

  box-shadow:
    0 0 0.3rem rgba(255, 255, 255, 0.03),
    0 0 0.85rem rgba(0, 0, 0, 0.18),
    0 8px 18px rgba(0, 0, 0, 0.18);
}

.service-model-filter__toggle--cover:hover,
.service-model-filter__toggle--cover:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--theme-white, #fff);

  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.118) 0%, rgba(255, 255, 255, 0.058) 100%);
}

/* =========================================================
   FOCUS STATES
   ========================================================= */

.model-pill__input:focus + .model-pill__label,
.model-pill__input:focus-visible + .model-pill__label,
.sort-pill__input:focus + .sort-pill__label,
.sort-pill__input:focus-visible + .sort-pill__label,
.service-model-filter__price-input:focus,
.service-model-filter__price-input:focus-visible,
.service-model-filter__toggle:focus,
.service-model-filter__toggle:focus-visible {
  outline: none;
}

.model-pill__input:focus + .model-pill__label,
.model-pill__input:focus-visible + .model-pill__label,
.sort-pill__input:focus + .sort-pill__label,
.sort-pill__input:focus-visible + .sort-pill__label,
.service-model-filter__price-input-shell:focus-within,
.service-model-filter__toggle:focus,
.service-model-filter__toggle:focus-visible {
  box-shadow: var(--service-filter-focus);
}

/* =========================================================
   DESKTOP: COLLAPSE REMOVE BUTTON WHEN NOT SELECTED
   At ≥1025px the label is a single flex row — collapse the
   remove slot (and its gap) so the hover container hugs the
   visible content. On selection it expands smoothly.
   ========================================================= */

@media (min-width: 1025px) {
  .model-pill:not(.is-selected) .model-pill__remove,
  .model-pill__input:not(:checked) + .model-pill__label .model-pill__remove {
    width: 0;
    min-width: 0;
    overflow: hidden;
    margin-left: -0.62rem; /* cancel the flex gap preceding this item */
    border-width: 0;
  }

  .model-pill__input:checked + .model-pill__label .model-pill__remove,
  .model-pill.is-selected .model-pill__label .model-pill__remove {
    width: 1.42rem;
    min-width: 1.42rem;
    overflow: visible;
    margin-left: 0;
    border-width: 1px;
  }
}

/* =========================================================
   RESPONSIVE: LARGE / TABLET
   ========================================================= */

@media (max-width: 1400px) {
  .service-model-filter__cover-brand-spacer {
    width: 3.5rem;
  }
}

@media (max-width: 1240px) {
  .service-browser-layout {
    grid-template-columns:
      minmax(272px, var(--service-filter-sidebar-width-lg))
      minmax(0, 1fr);
    gap: 1.05rem;
  }

  .service-model-filter__cover-brand {
    padding-right: 0.65rem;
  }

  .service-model-filter__cover-brand-spacer {
    display: none;
  }

  .service-model-filter__cover-logo img {
    width: 9.75rem;
  }

  .model-pill__media {
    width: 6.5rem;
    height: 3.55rem;
  }

  .model-pill__icon {
    width: 6.25rem;
    max-height: 3.22rem;
  }

  .model-pill__label {
    gap: 0.5rem;
  }
}

@media (max-width: 1024px) {
  .service-browser-layout,
  .service-browser-layout.is-filter-collapsed {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .service-browser-layout.is-filter-collapsed .service-model-filter {
    width: 100%;
    overflow: visible;
  }

  .service-model-filter {
    position: relative;
    top: auto;
    z-index: auto;

    height: auto;
  }

  .service-model-filter__sidebar {
    width: 100%;
    max-width: 100%;
  }

  .service-model-filter__description {
    max-width: none;
  }

  .service-model-filter__chip-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .model-pill__label {
    flex-direction: column;
    align-items: stretch;
    gap: 0.52rem;

    min-height: auto;
    padding: 0.48rem;

    white-space: normal;
  }

  .model-pill__media {
    width: 100%;
    height: 4.35rem;
  }

  .model-pill__icon {
    width: min(9rem, 88%);
    max-height: 4rem;
  }

  .model-pill__count {
    align-self: flex-start;
    margin-left: 0;
  }

  .model-pill__remove {
    position: absolute;
    top: 0.62rem;
    right: 0.62rem;
  }
}

/* =========================================================
   RESPONSIVE: SMALL SCREENS
   ========================================================= */

@media (max-width: 768px) {
  .service-browser-layout {
    padding-inline: 0.7rem;
  }

  .service-model-filter__sidebar {
    padding: 0.95rem;
    overflow: hidden;

    border: 1px solid var(--service-filter-border);
    border-radius: var(--service-filter-radius-panel);

    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.022) 100%),
      var(--service-filter-bg-mobile);

    box-shadow: var(--service-filter-shadow-soft);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .service-model-filter__sidebar-head {
    flex-direction: column;
    align-items: stretch;
    margin-inline: -0.95rem;
    padding-inline: 0.95rem;
  }

  .service-model-filter__title {
    font-size: 1.04rem;
  }

  .service-model-filter__description {
    max-width: none;
    font-size: 0.88rem;
  }

  .service-model-filter__chip-row,
  .service-model-filter__chip-row--sort {
    grid-template-columns: 1fr;
  }

  .model-pill__label {
    display: grid;
    grid-template-columns: minmax(5.8rem, 7.1rem) minmax(0, 1fr) auto auto;
    grid-template-areas: "media text count remove";
    align-items: center;
    gap: 0.52rem;

    width: 100%;
    padding: 0.5rem 0.58rem;

    overflow: hidden;
    white-space: normal;
  }

  .model-pill__media {
    grid-area: media;

    width: 100%;
    max-width: 7.1rem;
    height: 3.6rem;
  }

  .model-pill__icon {
    width: min(6.75rem, 92%);
    max-width: 92%;
    max-height: 3.25rem;
  }

  .model-pill__text {
    grid-area: text;

    display: block;

    font-size: 0.92rem;
    font-weight: 760;
    line-height: 1.15;
  }

  .model-pill__count {
    grid-area: count;

    min-width: 1.62rem;
    height: 1.36rem;
    margin-left: 0;
    padding-inline: 0.42rem;

    font-size: 0.7rem;
  }

  .model-pill__remove {
    grid-area: remove;

    position: static;

    width: 1.36rem;
    height: 1.36rem;

    font-size: 0.64rem;
  }

  .service-model-filter__price-control {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .service-model-filter__toggle {
    width: 100%;
  }

  .service-model-filter__cover-inner {
    padding-inline: 0.75rem;
    column-gap: 0.65rem;
  }

  .service-model-filter__cover-brand {
    padding-left: 0.5rem;
    padding-right: 0.35rem;
  }

  .service-model-filter__cover-logo img {
    width: 8.5rem;
  }

  .service-model-filter__cover-title {
    font-size: 1rem;
  }

  .service-model-filter__toggle--cover {
    width: auto;
    padding: 0.72rem 0.85rem;
    font-size: 0.84rem;
  }
}

@media (max-width: 640px) {
  .service-model-filter__section-frame,
  .service-model-filter__section-frame--collapsible:not([open]) {
    padding-block: 0.92rem;
  }

  .service-model-filter__section-head {
    min-height: 2.2rem;
    margin-inline: -0.48rem;
    padding: 0.34rem 0.7rem 0.76rem;
  }

  .service-model-filter__section-head::after {
    left: 0.7rem;
    right: 0.7rem;
  }

  .service-model-filter__section-icon {
    width: 1.32rem;
    height: 1.32rem;
    font-size: 0.58rem;
  }

  .sort-pill__label {
    justify-content: flex-start;
    padding-inline: 0.78rem;
    text-align: left;
    white-space: normal;
  }

  .service-model-filter__price-input {
    text-align: center;
  }

  .service-model-filter__cover-copy {
    max-width: none;
  }

  .service-model-filter__cover-eyebrow {
    display: none;
  }

  .service-model-filter__meta {
    min-height: 5.45rem;
    padding-top: 0.88rem;
  }

  .service-model-filter__note {
    padding-right: 0;
  }

  .service-model-filter__clear {
    top: auto;
    right: auto;
    left: 0.2rem;
    bottom: 0.12rem;
  }
}

@media (max-width: 560px) {
  .service-browser-layout {
    width: 100%;
    padding-inline: 0.55rem;
  }

  .service-model-filter__sidebar {
    width: 100%;
    padding: 0.78rem;
    border-radius: 14px;
  }

  .service-model-filter__cover-inner {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .service-model-filter__cover-brand {
    display: none;
  }

  .service-model-filter__cover-title {
    font-size: 0.92rem;
  }

  .service-model-filter__toggle--cover {
    margin-right: 0;
    padding: 0.7rem 0.78rem;
  }

  .model-pill__label {
    grid-template-columns: minmax(4.85rem, 5.65rem) minmax(0, 1fr) auto auto;
    gap: 0.46rem;

    min-height: 3.8rem;
    padding: 0.46rem;
    border-radius: 10px;

    font-size: 0.9rem;
  }

  .model-pill__media {
    width: 100%;
    max-width: 5.65rem;
    height: 3.1rem;
    border-radius: 9px;
  }

  .model-pill__icon {
    width: min(5.25rem, 90%);
    max-height: 2.75rem;
  }

  .model-pill__text {
    font-size: 0.9rem;
    font-weight: 760;
    letter-spacing: -0.014em;
  }

  .model-pill__count {
    min-width: 1.46rem;
    height: 1.28rem;
    padding-inline: 0.36rem;

    font-size: 0.66rem;
    font-weight: 760;
  }

  .model-pill__remove {
    width: 1.28rem;
    height: 1.28rem;

    font-size: 0.6rem;
  }

  .service-model-filter__chip-row--sort {
    gap: 0.28rem;
    padding: 0.22rem;
  }

  .sort-pill__label {
    min-height: 2.38rem;
    padding: 0.58rem 0.7rem;

    font-size: 0.84rem;
    font-weight: 760;
  }

  .sort-pill__label i {
    font-size: 0.86rem;
  }

  .service-model-filter__price-control {
    gap: 0.24rem;
    padding: 0.22rem;
  }

  .service-model-filter__price-input-shell,
  .service-model-filter__price-input {
    min-height: 2.3rem;
  }

  .service-model-filter__price-input {
    padding-inline: 0.42rem;

    font-size: 0.78rem;
    font-weight: 720;
  }

  .service-model-filter__price-divider {
    width: 0.34rem;
  }

  .service-model-filter__price-hint {
    font-size: 0.72rem;
  }
}

@media (max-width: 420px) {
  .service-browser-layout {
    padding-inline: 0.45rem;
  }

  .service-model-filter__sidebar {
    padding: 0.72rem;
  }

  .model-pill__label {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "media media media"
      "text count remove";
    gap: 0.42rem 0.46rem;

    padding: 0.48rem;
  }

  .model-pill__media {
    width: 100%;
    max-width: none;
    height: 3.15rem;
  }

  .model-pill__icon {
    width: min(7.25rem, 88%);
    max-height: 2.85rem;
  }

  .model-pill__text {
    font-size: 0.86rem;
  }

  .model-pill__count,
  .model-pill__remove {
    align-self: center;
  }
}

@media (max-width: 380px) {
  .service-model-filter__price-control {
    grid-template-columns: 1fr;
  }

  .service-model-filter__price-divider {
    display: none;
  }
}

/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .service-model-filter__cover,
  .service-model-filter__section-body,
  .service-model-filter__section-head,
  .service-model-filter__section-icon,
  .model-pill__label,
  .sort-pill__label,
  .service-model-filter__price-input-shell,
  .service-model-filter__toggle,
  .service-model-filter__clear,
  .model-pill__media,
  .model-pill__icon,
  .model-pill__count,
  .model-pill__remove,
  .sort-pill__label i {
    transition: none !important;
    animation: none !important;
  }

  .service-model-filter__section-head:hover,
  .model-pill__label:hover,
  .sort-pill__label:hover,
  .service-model-filter__price-input-shell:hover,
  .service-model-filter__toggle:hover,
  .service-model-filter__toggle:focus-visible,
  .service-model-filter__toggle--cover:hover,
  .service-model-filter__toggle--cover:focus-visible,
  .service-model-filter__clear:hover,
  .service-model-filter__clear:focus-visible,
  .model-pill__label:hover .model-pill__icon {
    transform: none !important;
  }
}