.twdvf-directory {
  --twdvf-dir-accent: #e45327;
  --twdvf-dir-accent-deep: #b93615;
  --twdvf-dir-ink: #11151c;
  --twdvf-dir-muted: #667085;
  --twdvf-dir-line: #e7e9ee;
  --twdvf-dir-surface: #f6f7f9;
  color: var(--twdvf-dir-ink);
  margin-inline: auto;
  max-width: 1480px;
  padding: clamp(28px, 5vw, 72px) clamp(14px, 3vw, 38px);
}

.twdvf-directory--tires {
  --twdvf-dir-accent: #2878d0;
  --twdvf-dir-accent-deep: #175ea9;
}

.twdvf-directory *,
.twdvf-directory *::before,
.twdvf-directory *::after {
  box-sizing: border-box;
}

.twdvf-directory__hero {
  align-items: end;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  margin-bottom: clamp(24px, 4vw, 44px);
}

.twdvf-directory__heading {
  max-width: 760px;
}

.twdvf-directory__eyebrow {
  align-items: center;
  color: var(--twdvf-dir-accent-deep);
  display: flex;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 9px;
  letter-spacing: 0.18em;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.twdvf-directory__eyebrow::before {
  background: var(--twdvf-dir-accent);
  border-radius: 99px;
  content: '';
  height: 3px;
  width: 30px;
}

.twdvf-directory__heading h2 {
  color: var(--twdvf-dir-ink);
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 750;
  letter-spacing: -0.055em;
  line-height: 0.98;
  margin: 0;
}

.twdvf-directory__heading p {
  color: var(--twdvf-dir-muted);
  font-size: clamp(0.96rem, 1.3vw, 1.08rem);
  line-height: 1.65;
  margin: 17px 0 0;
  max-width: 640px;
}

.twdvf-directory__summary {
  align-items: center;
  background: var(--twdvf-dir-ink);
  border-radius: 18px;
  color: #fff;
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 176px;
  padding: 17px 20px;
}

.twdvf-directory__summary strong {
  color: #fff;
  font-size: 1.9rem;
  letter-spacing: -0.05em;
  line-height: 1;
}

.twdvf-directory__summary span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  max-width: 78px;
  text-transform: uppercase;
}

.twdvf-directory__toolbar {
  align-items: center;
  background: #fff;
  border: 1px solid var(--twdvf-dir-line);
  border-radius: 18px;
  box-shadow: 0 12px 34px rgba(17, 21, 28, 0.07);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: clamp(22px, 3vw, 34px);
  padding: 10px 12px;
  position: sticky;
  top: 12px;
  z-index: 20;
}

.twdvf-directory__search {
  align-items: center;
  display: flex;
  flex: 1 1 560px;
  min-width: 0;
  position: relative;
}

.twdvf-directory__search > svg {
  fill: none;
  height: 21px;
  left: 13px;
  pointer-events: none;
  position: absolute;
  stroke: #7b8493;
  stroke-linecap: round;
  stroke-width: 1.8;
  width: 21px;
}

.twdvf-directory__search input[type='search'] {
  appearance: none;
  background: var(--twdvf-dir-surface);
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
  color: var(--twdvf-dir-ink);
  font: inherit;
  font-size: 0.93rem;
  height: 50px;
  margin: 0;
  min-height: 50px;
  outline: none;
  padding: 0 74px 0 46px;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  width: 100%;
}

.twdvf-directory__search input[type='search']::-webkit-search-cancel-button {
  display: none;
}

.twdvf-directory__search input[type='search']:focus {
  background: #fff;
  border-color: var(--twdvf-dir-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--twdvf-dir-accent) 16%, transparent);
}

.twdvf-directory__search button {
  background: none;
  border: 0;
  color: var(--twdvf-dir-accent-deep);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 8px;
  position: absolute;
  right: 8px;
  text-transform: uppercase;
}

.twdvf-directory__search button[hidden] {
  display: none;
}

.twdvf-directory__result-count {
  color: var(--twdvf-dir-muted);
  flex: 0 0 auto;
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 10px 0 0;
}

.twdvf-directory__grid {
  display: grid;
  gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.twdvf-directory__card {
  background: #fff;
  border: 1px solid var(--twdvf-dir-line);
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(17, 21, 28, 0.045);
  min-width: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(24px);
  transition: opacity 520ms ease calc(var(--twdvf-card-order) * 38ms), transform 520ms cubic-bezier(.22, .75, .25, 1) calc(var(--twdvf-card-order) * 38ms), border-color 220ms ease, box-shadow 220ms ease;
}

.twdvf-directory__card.is-visible,
.twdvf-directory__card.is-filtered-in {
  opacity: 1;
  transform: translateY(0);
}

.twdvf-directory__card[hidden] {
  display: none;
}

.twdvf-directory__card:hover {
  border-color: color-mix(in srgb, var(--twdvf-dir-accent) 38%, var(--twdvf-dir-line));
  box-shadow: 0 20px 46px rgba(17, 21, 28, 0.13);
  transform: translateY(-6px);
}

.twdvf-directory__card > a {
  color: inherit;
  display: block;
  height: 100%;
  text-decoration: none;
}

.twdvf-directory__card > a:focus-visible {
  box-shadow: inset 0 0 0 3px var(--twdvf-dir-accent);
  outline: 0;
}

.twdvf-directory__media {
  aspect-ratio: 1.22 / 1;
  background: linear-gradient(145deg, #f5f6f8, #e8ebef);
  display: block;
  overflow: hidden;
  position: relative;
}

.twdvf-directory__media > img {
  height: 100%;
  object-fit: cover;
  transition: transform 650ms cubic-bezier(.2, .7, .2, 1), filter 300ms ease;
  width: 100%;
}

.twdvf-directory__card:hover .twdvf-directory__media > img {
  filter: saturate(1.06) contrast(1.03);
  transform: scale(1.065);
}

.twdvf-directory__shade {
  background: linear-gradient(180deg, transparent 55%, rgba(8, 13, 20, 0.16));
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.twdvf-directory__popular {
  backdrop-filter: blur(8px);
  background: rgba(17, 21, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 99px;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  left: 13px;
  letter-spacing: 0.11em;
  padding: 7px 10px;
  position: absolute;
  text-transform: uppercase;
  top: 13px;
}

.twdvf-directory__fallback {
  align-items: center;
  background: radial-gradient(circle at 60% 35%, #fff 0, #eef0f3 42%, #d8dde3 100%);
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.twdvf-directory__fallback::before {
  background: var(--twdvf-dir-accent);
  border-radius: 50%;
  content: '';
  filter: blur(35px);
  height: 38%;
  opacity: 0.18;
  position: absolute;
  right: 13%;
  top: 15%;
  width: 38%;
}

.twdvf-directory__fallback svg {
  fill: none;
  height: 72%;
  opacity: 0.82;
  stroke: #20262e;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 8;
  transition: transform 700ms cubic-bezier(.2, .75, .2, 1);
  width: 72%;
}

.twdvf-directory__card:hover .twdvf-directory__fallback svg {
  transform: rotate(8deg) scale(1.05);
}

.twdvf-directory__body {
  display: flex;
  flex-direction: column;
  min-height: 140px;
  padding: 18px 18px 17px;
}

.twdvf-directory__path {
  color: var(--twdvf-dir-accent-deep);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.twdvf-directory__name {
  color: var(--twdvf-dir-ink);
  display: -webkit-box;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.twdvf-directory__meta {
  align-items: end;
  color: var(--twdvf-dir-muted);
  display: flex;
  font-size: 0.74rem;
  gap: 8px;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
}

.twdvf-directory__shop {
  align-items: center;
  color: var(--twdvf-dir-ink);
  display: inline-flex;
  font-weight: 800;
  gap: 5px;
  white-space: nowrap;
}

.twdvf-directory__shop svg {
  fill: none;
  height: 17px;
  stroke: var(--twdvf-dir-accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 180ms ease;
  width: 17px;
}

.twdvf-directory__card:hover .twdvf-directory__shop svg {
  transform: translateX(3px);
}

.twdvf-directory__empty {
  align-items: center;
  background: var(--twdvf-dir-surface);
  border: 1px dashed #cfd4dc;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 45px 20px;
  text-align: center;
}

.twdvf-directory__empty[hidden] {
  display: none;
}

.twdvf-directory__empty > span {
  align-items: center;
  background: #fff;
  border-radius: 50%;
  color: var(--twdvf-dir-muted);
  display: flex;
  font-size: 1.35rem;
  font-weight: 800;
  height: 64px;
  justify-content: center;
  margin-bottom: 18px;
  width: 64px;
}

.twdvf-directory__empty h3 {
  color: var(--twdvf-dir-ink);
  font-size: 1.3rem;
  margin: 0 0 7px;
}

.twdvf-directory__empty p {
  color: var(--twdvf-dir-muted);
  margin: 0;
}

.twdvf-directory__empty button {
  background: var(--twdvf-dir-ink);
  border: 0;
  border-radius: 9px;
  color: #fff;
  cursor: pointer;
  font-weight: 750;
  margin-top: 20px;
  padding: 11px 16px;
}

@media (max-width: 1040px) {
  .twdvf-directory__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .twdvf-directory__hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .twdvf-directory__summary {
    min-width: 0;
    width: auto;
  }

  .twdvf-directory__toolbar {
    top: 7px;
  }

  .twdvf-directory__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .twdvf-directory {
    padding-inline: 10px;
  }

  .twdvf-directory__heading h2 {
    font-size: 2.35rem;
  }

  .twdvf-directory__toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
  }

  .twdvf-directory__search {
    flex-basis: auto;
  }

  .twdvf-directory__result-count {
    margin: 1px 5px 4px;
  }

  .twdvf-directory__grid {
    gap: 10px;
  }

  .twdvf-directory__card {
    border-radius: 14px;
  }

  .twdvf-directory__body {
    min-height: 125px;
    padding: 13px 12px 12px;
  }

  .twdvf-directory__name {
    font-size: 0.95rem;
  }

  .twdvf-directory__path,
  .twdvf-directory__meta {
    font-size: 0.61rem;
  }

  .twdvf-directory__shop {
    font-size: 0;
  }

  .twdvf-directory__popular {
    font-size: 0.54rem;
    left: 8px;
    padding: 6px 8px;
    top: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .twdvf-directory *,
  .twdvf-directory *::before,
  .twdvf-directory *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .twdvf-directory__card {
    opacity: 1;
    transform: none;
  }
}
