.wepd {
  --wepd-accent: var(--primary-color, #8c1935);
  --wepd-ink: #272421;
  --wepd-muted: #766f69;
  --wepd-line: #e5dfd9;
  --wepd-paper: #faf8f5;
  color: var(--wepd-ink);
  width: 100%;
  min-width: 0;
  padding: clamp(18px, 3vw, 42px) 0;
}

.wepd [hidden] { display: none !important; }

.wepd-heading { margin: 0 0 28px; }
.wepd-heading__kicker {
  display: block;
  color: var(--wepd-accent);
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.2;
  margin-bottom: 7px;
}
.wepd-heading h2 {
  color: var(--wepd-ink);
  font-size: clamp(27px, 3vw, 43px);
  line-height: 1.16;
  letter-spacing: -.025em;
  margin: 0;
}

.wepd-controls {
  border-top: 1px solid var(--wepd-line);
  border-bottom: 1px solid var(--wepd-line);
  margin-bottom: 26px;
  padding: 22px 0 14px;
}
.wepd-controls__top {
  display: flex;
  align-items: end;
  gap: 18px;
  margin-bottom: 20px;
}
.wepd-search { flex: 1; position: relative; margin: 0; }
.wepd-search__icon {
  position: absolute;
  top: 50%; left: 15px;
  transform: translateY(-50%);
  color: var(--wepd-muted);
  font-family: Arial, sans-serif;
  font-size: 28px;
  line-height: 1;
  pointer-events: none;
}
.wepd .wepd-search input,
.wepd .wepd-sort select {
  height: 46px;
  margin: 0;
  background: #fff;
  border: 1px solid var(--wepd-line);
  border-radius: 0;
  color: var(--wepd-ink);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
}
.wepd .wepd-search input { width: 100%; padding: 0 40px 0 46px; }
.wepd .wepd-search input:focus,
.wepd .wepd-sort select:focus {
  border-color: var(--wepd-accent);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--wepd-accent) 18%, transparent);
}
.wepd-sort { display: grid; gap: 5px; min-width: 185px; margin: 0; }
.wepd-sort > span {
  color: var(--wepd-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.wepd .wepd-sort select { width: 100%; padding: 0 34px 0 12px; }

.wepd-alphabet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.wepd .wepd-letter {
  min-width: 30px;
  height: 34px;
  margin: 0;
  padding: 0 7px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--wepd-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 32px;
  text-align: center;
  text-transform: none;
  cursor: pointer;
}
.wepd .wepd-letter:first-child { min-width: 67px; margin-right: 6px; }
.wepd .wepd-letter:hover:not(:disabled),
.wepd .wepd-letter.is-active {
  color: var(--wepd-accent);
  border-bottom-color: var(--wepd-accent);
  background: transparent;
}
.wepd .wepd-letter:disabled { opacity: .3; cursor: default; }
.wepd .wepd-letter:focus-visible,
.wepd .wepd-reset:focus-visible,
.wepd-card__link:focus-visible {
  outline: 2px solid var(--wepd-accent);
  outline-offset: 3px;
}
.wepd-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin-top: 10px; }
.wepd-result-count { margin: 0; color: var(--wepd-muted); font-size: 12px; }
.wepd .wepd-reset {
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--wepd-accent);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  text-transform: none;
  cursor: pointer;
}

.wepd-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.wepd-card { min-width: 0; margin: 0; list-style: none; }
.wepd-card__link {
  display: flex;
  height: 100%;
  min-height: 264px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--wepd-line);
  background: #fff;
  color: var(--wepd-ink);
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.wepd-card__link:hover {
  transform: translateY(-3px);
  border-color: var(--wepd-accent);
  box-shadow: 0 10px 28px rgb(36 24 21 / 8%);
  color: var(--wepd-ink);
}
.wepd-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  padding: 14px;
  background: var(--wepd-paper);
  border-bottom: 1px solid var(--wepd-line);
}
.wepd-card__image { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.wepd-card__image img { width: auto; height: auto; max-width: 100%; max-height: 82px; object-fit: contain; }
.wepd-card__monogram {
  color: var(--wepd-accent);
  font-family: Georgia, serif;
  font-size: 54px;
  line-height: 1;
  font-weight: 400;
}
.wepd-card__body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 21px 22px 12px; }
.wepd-card__eyebrow { color: var(--wepd-accent); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.wepd-card__name { color: var(--wepd-ink); font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; line-height: 1.2; }
.wepd-card__description {
  display: -webkit-box;
  overflow: hidden;
  color: var(--wepd-muted);
  font-size: 13px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.wepd-card__footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 22px 20px; }
.wepd-card__count { color: var(--wepd-muted); font-size: 11px; }
.wepd-card__cta { margin-left: auto; color: var(--wepd-accent); font-size: 12px; font-weight: 600; }
.wepd-card__cta span { margin-left: 4px; font-size: 15px; }
.wepd-message, .wepd-no-results { padding: 24px; background: var(--wepd-paper); color: var(--wepd-muted); text-align: center; }
.wepd-sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

@media (max-width: 849px) {
  .wepd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wepd-alphabet { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 7px; scrollbar-width: thin; }
  .wepd .wepd-letter { flex: 0 0 auto; }
}
@media (max-width: 549px) {
  .wepd-controls__top { display: grid; gap: 12px; }
  .wepd-sort { min-width: 0; }
  .wepd-grid { grid-template-columns: 1fr; gap: 13px; }
  .wepd-card__link { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wepd-card__link { transition: none; }
}
