.twdvf-search {
  --twdvf-accent: #2878d0;
  --twdvf-accent-dark: #175ea9;
  --twdvf-border: #dfe3e8;
  --twdvf-muted: #667085;
  --twdvf-surface: #f7f8fa;
  --twdvf-text: #17202a;
  background: linear-gradient(145deg, #fff 0%, #f7faff 100%);
  border: 1px solid var(--twdvf-border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(23, 32, 42, 0.09);
  color: var(--twdvf-text);
  padding: clamp(20px, 3vw, 34px);
  position: relative;
}

.twdvf-search__compact-title {
  display: none;
}

.twdvf-search__title {
  color: var(--twdvf-text);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0 0 22px;
}

.twdvf-search__form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(190px, auto);
}

.twdvf-search__field {
  min-width: 0;
  position: relative;
}

.twdvf-search__field:focus-within {
  z-index: 10010;
}

.twdvf-search__field label {
  color: #344054;
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.twdvf-search__field select,
.twdvf-search__button {
  border-radius: 10px;
  box-sizing: border-box;
  font: inherit;
  min-height: 48px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
  width: 100%;
}

.twdvf-search__field select {
  appearance: none !important;
  background-image: none !important;
  background-color: var(--twdvf-surface);
  border: 1px solid var(--twdvf-border);
  color: var(--twdvf-text);
  cursor: pointer;
  font-size: 0.94rem;
  padding: 0 12px;
}

.twdvf-search__field select:focus {
  border-color: var(--twdvf-accent);
  box-shadow: 0 0 0 3px rgba(40, 120, 208, 0.16);
  outline: 0;
}

.twdvf-search__field select:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.twdvf-native-select {
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: absolute !important;
  white-space: nowrap !important;
  width: 1px !important;
}

.twdvf-combobox {
  max-width: 100%;
  position: relative;
  width: 100%;
}

.twdvf-combobox__control {
  align-items: center;
  background: linear-gradient(180deg, #fff 0%, #f7f9fc 100%);
  border: 1px solid #d7dee8;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  color: var(--twdvf-text);
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 0.88rem;
  gap: 10px;
  height: 48px;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 13px;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  width: 100%;
}

.twdvf-combobox__control:hover:not(:disabled) {
  background: #fff;
  border-color: #b9c6d6;
}

.twdvf-combobox__control:focus-visible,
.twdvf-combobox.is-open .twdvf-combobox__control {
  border-color: var(--twdvf-accent);
  box-shadow: 0 0 0 3px rgba(40, 120, 208, 0.14);
  outline: 0;
}

.twdvf-combobox__control:disabled {
  background: #f5f7fa;
  color: #98a2b3;
  cursor: not-allowed;
}

.twdvf-combobox__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twdvf-combobox__value.is-placeholder {
  color: #667085;
}

.twdvf-combobox.is-disabled .twdvf-combobox__value.is-placeholder {
  color: #a9b2c0;
}

.twdvf-combobox__chevron {
  border-bottom: 2px solid #667085;
  border-right: 2px solid #667085;
  flex: 0 0 auto;
  height: 7px;
  margin: -4px 3px 0 8px;
  transform: rotate(45deg);
  transition: transform 160ms ease;
  width: 7px;
}

.twdvf-combobox.is-open .twdvf-combobox__chevron {
  margin-top: 4px;
  transform: rotate(225deg);
}

.twdvf-combobox__panel {
  background: #fff;
  border: 1px solid #d7dee8;
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.2);
  left: 0;
  min-width: min(270px, calc(100vw - 24px));
  overflow: hidden;
  padding: 7px;
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  z-index: 10020;
}

.twdvf-combobox__panel[hidden],
.twdvf-combobox__empty[hidden],
.twdvf-combobox__option[hidden] {
  display: none !important;
}

.twdvf-combobox__search-wrap {
  padding-bottom: 6px;
  position: relative;
}

.twdvf-combobox__search-wrap::before {
  border: 1.5px solid #667085;
  border-radius: 50%;
  content: '';
  height: 10px;
  left: 11px;
  position: absolute;
  top: 10px;
  width: 10px;
}

.twdvf-combobox__search-wrap::after {
  background: #667085;
  content: '';
  height: 1.5px;
  left: 21px;
  position: absolute;
  top: 21px;
  transform: rotate(45deg);
  width: 6px;
}

.twdvf-combobox__search {
  appearance: none;
  background: #f7f9fc !important;
  border: 1px solid #e0e6ee !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: #17202a;
  font-size: 0.78rem !important;
  height: 34px !important;
  margin: 0 !important;
  min-height: 34px !important;
  padding: 0 10px 0 32px !important;
  width: 100% !important;
}

.twdvf-combobox__search:focus {
  background: #fff !important;
  border-color: var(--twdvf-accent) !important;
  outline: 0;
}

.twdvf-combobox__list {
  list-style: none;
  margin: 0;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 2px 0 0;
  scrollbar-color: #aab4c2 transparent;
  scrollbar-width: thin;
}

.twdvf-combobox__list li {
  margin: 0;
  padding: 0;
}

.twdvf-combobox__option {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #344054;
  cursor: pointer;
  display: block;
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  padding: 8px 10px;
  position: relative;
  text-align: left;
  width: 100%;
}

.twdvf-combobox__option:hover,
.twdvf-combobox__option:focus-visible {
  background: #eef5fd;
  color: var(--twdvf-accent-dark);
  outline: 0;
}

.twdvf-combobox__option[aria-selected='true'] {
  background: #e7f1fc;
  color: var(--twdvf-accent-dark);
  font-weight: 750;
  padding-right: 30px;
}

.twdvf-combobox__option[aria-selected='true']::after {
  content: '✓';
  position: absolute;
  right: 10px;
}

.twdvf-combobox__empty {
  color: #667085;
  font-size: 0.72rem;
  margin: 0;
  padding: 12px 10px;
  text-align: center;
}

.twdvf-search__button {
  align-items: center;
  background: linear-gradient(135deg, var(--twdvf-accent), var(--twdvf-accent-dark));
  border: 0;
  box-shadow: 0 8px 18px rgba(40, 120, 208, 0.24);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  justify-content: center;
  letter-spacing: 0.035em;
  padding: 0 20px;
  text-transform: uppercase;
  white-space: nowrap;
}

.twdvf-search__button:not(:disabled):hover {
  box-shadow: 0 10px 22px rgba(40, 120, 208, 0.32);
  transform: translateY(-1px);
}

.twdvf-search__button:disabled {
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.48;
}

.twdvf-search__button.is-loading {
  opacity: 0.82;
}

.twdvf-search__button.is-loading::before {
  animation: twdvf-spin 700ms linear infinite;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  border-top-color: #fff;
  content: '';
  height: 14px;
  margin-right: 8px;
  width: 14px;
}

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

.twdvf-search__status {
  color: var(--twdvf-muted);
  font-size: 0.82rem;
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.25em;
}

/* WoodMart desktop-header placement. The theme's center row is 104px high,
 * so the normal card treatment must become a compact fitment bar here. */
.wd-header-text .twdvf-search {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 7px 0;
  width: 100%;
}

.wd-header-text .twdvf-search__title {
  display: none;
}

.wd-header-text .twdvf-search__compact-title {
  color: #344054;
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.095em;
  line-height: 1;
  margin: 0 0 6px;
  text-transform: uppercase;
}

.wd-header-text .twdvf-search__form {
  gap: 8px;
  grid-template-columns: repeat(3, minmax(105px, 1fr)) minmax(165px, auto);
}

.wd-header-text .twdvf-search__field label {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.wd-header-text .twdvf-search__field select,
.wd-header-text .twdvf-search__button {
  border-radius: 8px;
  min-height: 42px;
}

.wd-header-text .twdvf-combobox__control {
  border-radius: 8px;
  font-size: 0.82rem;
  height: 42px;
  min-height: 42px;
  padding: 0 10px;
}

.wd-header-text .twdvf-search__field select {
  background-color: #f6f7f9;
  font-size: 0.82rem;
  padding: 0 9px;
}

.wd-header-text .twdvf-search__button {
  box-shadow: none;
  font-size: 0.72rem;
  padding: 0 14px;
}

.wd-header-text .twdvf-search__status {
  background: #fff;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 12px rgba(23, 32, 42, 0.08);
  left: 0;
  min-height: 0;
  padding: 0 6px;
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 20;
}

.wd-header-text .twdvf-search__status:empty {
  display: none;
}

.wd-header-text .twdvf-search--attention {
  outline: 3px solid rgba(40, 120, 208, 0.3);
  outline-offset: 3px;
}

.twdvf-vehicle {
  --twdvf-accent: #2878d0;
  --twdvf-accent-dark: #175ea9;
  --twdvf-border: #dfe3e8;
  --twdvf-muted: #667085;
  --twdvf-text: #17202a;
  align-items: center;
  background: linear-gradient(135deg, #f7faff 0%, #fff 62%);
  border: 1px solid #dce7f4;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(23, 32, 42, 0.07);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin: 0 0 28px;
  padding: 22px 24px;
  width: 100%;
}

.twdvf-vehicle--has-image {
  grid-template-columns: 260px minmax(0, 1fr) auto;
}

.twdvf-vehicle__image-wrap {
  align-items: center;
  background: #fff;
  border: 1px solid #e6ebf0;
  border-radius: 10px;
  display: flex;
  height: 160px;
  justify-content: center;
  overflow: hidden;
  width: 260px;
}

.twdvf-vehicle__image {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.twdvf-vehicle__eyebrow {
  color: var(--twdvf-accent-dark);
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.twdvf-vehicle__title {
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  line-height: 1.2;
  margin: 0;
}

.twdvf-vehicle__meta {
  color: var(--twdvf-muted);
  font-size: 0.84rem;
  margin: 4px 0 0;
}

.twdvf-vehicle__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.twdvf-vehicle__spec {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475467;
  font-size: 0.76rem;
  padding: 5px 9px;
}

.twdvf-vehicle__spec strong {
  color: #1d2939;
  margin-right: 3px;
}

.twdvf-vehicle__change {
  border: 1px solid var(--twdvf-border);
  border-radius: 8px;
  color: var(--twdvf-text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.twdvf-vehicle__change:hover {
  border-color: var(--twdvf-accent);
  color: var(--twdvf-accent-dark);
}

/* Replace WoodMart's Shop/breadcrumb title row with a compact vehicle header. */
.twdvf-vehicle-title-row {
  align-items: stretch !important;
  display: block !important;
  width: 100% !important;
}

.twdvf-vehicle-title-row > .wd-woo-page-title,
.twdvf-vehicle-title-row > .wd-el-breadcrumbs {
  display: none !important;
}

.twdvf-vehicle--title {
  border-color: rgba(40, 120, 208, 0.2);
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.06);
  gap: 16px;
  margin: 0;
  min-height: 116px;
  padding: 10px 14px;
}

.twdvf-vehicle--title.twdvf-vehicle--has-image {
  grid-template-columns: 190px minmax(0, 1fr) auto;
}

.twdvf-vehicle--title .twdvf-vehicle__image-wrap {
  height: 106px;
  width: 190px;
}

.twdvf-vehicle--title .twdvf-vehicle__eyebrow {
  font-size: 0.62rem;
}

.twdvf-vehicle--title .twdvf-vehicle__title {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
}

.twdvf-vehicle--title .twdvf-vehicle__meta {
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.twdvf-vehicle--title .twdvf-vehicle__specs {
  gap: 5px;
  margin-top: 7px;
}

.twdvf-vehicle--title .twdvf-vehicle__spec {
  font-size: 0.7rem;
  padding: 4px 8px;
}

.twdvf-package {
  --twdvf-accent: #2878d0;
  --twdvf-accent-dark: #175ea9;
  --twdvf-border: #dce4ed;
  --twdvf-muted: #667085;
  --twdvf-text: #17202a;
  background: #f4f7fb;
  border: 1px solid rgba(40, 120, 208, 0.18);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(23, 32, 42, 0.06);
  color: var(--twdvf-text);
  margin: 0;
  padding: 10px;
  width: 100%;
}

.twdvf-package__steps {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.twdvf-package__step {
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--twdvf-border);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 88px;
  padding: 9px 10px;
  position: relative;
}

.twdvf-package__step.is-active {
  background: #fff;
  border-color: var(--twdvf-accent);
  box-shadow: 0 5px 14px rgba(40, 120, 208, 0.1);
}

.twdvf-package__step.is-locked {
  opacity: 0.58;
}

.twdvf-package__number {
  align-items: center;
  background: #e8eef6;
  border-radius: 50%;
  color: #475467;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 800;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.twdvf-package__step.is-complete .twdvf-package__number {
  background: #16875d;
  color: #fff;
  font-size: 0;
}

.twdvf-package__step.is-complete .twdvf-package__number::before {
  content: '✓';
  font-size: 0.78rem;
}

.twdvf-package__content {
  min-width: 0;
}

.twdvf-package__step--vehicle {
  align-content: center;
}

.twdvf-package__step--vehicle .twdvf-package__fitment {
  grid-column: 2 / -1;
  margin-top: -3px;
}

.twdvf-package__label,
.twdvf-package__title,
.twdvf-package__note {
  display: block;
}

.twdvf-package__fitment {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0 0;
}

.twdvf-package__fitment-item {
  align-items: baseline;
  background: #f4f7fb;
  border: 1px solid rgba(40, 120, 208, 0.16);
  border-radius: 5px;
  display: inline-flex;
  font-size: 0.59rem;
  gap: 4px;
  line-height: 1.25;
  max-width: 100%;
  padding: 2px 5px;
}

.twdvf-package__fitment-item dt {
  color: var(--twdvf-text);
  flex: 0 0 auto;
  font-weight: 750;
}

.twdvf-package__fitment-item dd {
  color: var(--twdvf-muted);
  margin: 0;
  overflow-wrap: anywhere;
}

.twdvf-package__label {
  color: var(--twdvf-accent-dark);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.075em;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.twdvf-package__title {
  font-size: 0.9rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
}

.twdvf-package__note {
  color: var(--twdvf-muted);
  font-size: 0.7rem;
  line-height: 1.35;
  margin-top: 4px;
}

.twdvf-package__links {
  display: flex;
  gap: 9px;
  margin-top: 5px;
}

.twdvf-package__links a,
.twdvf-package__links button {
  background: none;
  border: 0;
  color: var(--twdvf-accent-dark);
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  padding: 0;
  text-decoration: underline;
}

.twdvf-package__remove {
  background: transparent;
  border: 0;
  color: #b42318;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-size: 0.68rem;
  margin-top: 6px;
  padding: 0;
  text-decoration: underline;
}

.twdvf-package__vehicle-image {
  height: 62px;
  object-fit: contain;
  width: 98px;
}

.twdvf-package__product-image {
  height: 76px;
  object-fit: contain;
  width: 92px;
}

.twdvf-package__tire-label {
  color: var(--twdvf-muted);
  display: block;
  font-size: 0.68rem;
  margin: 5px 0 3px;
}

.twdvf-package select {
  background: #fff;
  border: 1px solid var(--twdvf-border);
  border-radius: 7px;
  font-size: 0.75rem;
  min-height: 36px;
  padding: 0 8px;
  width: 100%;
}

.twdvf-package__actions {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-left: auto;
  padding: 0;
}

.twdvf-package__primary,
.twdvf-package__secondary {
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 38px;
  min-height: 38px;
  padding: 0 15px;
  text-align: center;
  text-decoration: none;
}

.twdvf-package__toolbar {
  align-items: center;
  color: var(--twdvf-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.68rem;
  gap: 5px 9px;
  padding: 7px 2px 0;
}

.twdvf-package__toolbar > button {
  background: transparent;
  border: 0;
  color: var(--twdvf-accent-dark);
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  padding: 0;
  text-decoration: underline;
}

.twdvf-package__toolbar > button:disabled,
.twdvf-package__remove:disabled {
  cursor: wait;
  opacity: 0.55;
}

.twdvf-package__primary {
  background: linear-gradient(135deg, var(--twdvf-accent), var(--twdvf-accent-dark));
  border: 0;
  color: #fff;
  cursor: pointer;
}

.twdvf-package__secondary {
  background: #fff;
  border: 1px solid var(--twdvf-border);
  color: var(--twdvf-text);
}

.twdvf-package-empty {
  background: #fff;
  border: 1px solid #dce4ed;
  border-radius: 10px;
  color: #344054;
  display: grid;
  gap: 5px;
  margin: 16px 0;
  padding: 18px 20px;
}

.twdvf-package-empty strong {
  color: #17202a;
  font-size: 1rem;
}

.twdvf-package-empty span {
  font-size: 0.82rem;
}

.twdvf-package-empty a {
  color: #175ea9;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 3px;
  width: fit-content;
}

.twdvf-product-fitment {
  --twdvf-fitment-accent: #175ea9;
  align-items: center;
  background: #f7faff;
  border: 1px solid #dce7f4;
  border-left: 4px solid var(--twdvf-fitment-accent);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: 38px minmax(0, 1fr) 92px;
  margin: 18px 0;
  padding: 14px 15px;
}

.twdvf-product-fitment--success {
  --twdvf-fitment-accent: #16875d;
  background: #f1fbf6;
  border-color: #bfe7d5;
}

.twdvf-product-fitment--warning {
  --twdvf-fitment-accent: #a96808;
  background: #fffaf0;
  border-color: #efd9ad;
}

.twdvf-product-fitment--danger {
  --twdvf-fitment-accent: #b42318;
  background: #fff5f4;
  border-color: #efc7c3;
}

.twdvf-product-fitment__icon {
  align-items: center;
  background: var(--twdvf-fitment-accent);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-size: 0.9rem;
  font-weight: 850;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.twdvf-product-fitment__icon::before {
  content: 'i';
}

.twdvf-product-fitment--success .twdvf-product-fitment__icon::before {
  content: '✓';
}

.twdvf-product-fitment--warning .twdvf-product-fitment__icon::before {
  content: '!';
}

.twdvf-product-fitment--danger .twdvf-product-fitment__icon::before {
  content: '×';
  font-size: 1.25rem;
}

.twdvf-product-fitment__content {
  min-width: 0;
}

.twdvf-product-fitment__eyebrow {
  color: var(--twdvf-fitment-accent);
  display: block;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.twdvf-product-fitment__title {
  color: #17202a;
  display: block;
  font-size: 0.92rem;
  line-height: 1.3;
}

.twdvf-product-fitment p {
  color: #475467;
  font-size: 0.74rem;
  line-height: 1.45;
  margin: 4px 0 0;
}

.twdvf-product-fitment a {
  color: var(--twdvf-fitment-accent);
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 750;
  margin-top: 5px;
}

.twdvf-product-fitment__vehicle {
  height: 58px;
  object-fit: contain;
  width: 92px;
}

html.twdvf-modal-open {
  overflow: hidden;
}

.twdvf-discovery[hidden] {
  display: none !important;
}

.twdvf-discovery {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 100000;
}

.twdvf-discovery__backdrop {
  background: rgba(15, 23, 42, 0.68);
  border: 0;
  cursor: pointer;
  inset: 0;
  padding: 0;
  position: absolute;
  width: 100%;
}

.twdvf-discovery__dialog {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  max-height: calc(100vh - 44px);
  max-width: 1040px;
  overflow: auto;
  padding: clamp(24px, 4vw, 42px);
  position: relative;
  width: 100%;
  z-index: 1;
}

.twdvf-discovery__close {
  align-items: center;
  background: #f2f4f7;
  border: 0;
  border-radius: 50%;
  color: #344054;
  cursor: pointer;
  display: flex;
  font-size: 1.45rem;
  height: 38px;
  justify-content: center;
  line-height: 1;
  padding: 0 0 3px;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 38px;
}

.twdvf-discovery__eyebrow {
  color: var(--twdvf-accent-dark);
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.twdvf-discovery h2 {
  color: #17202a;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 0;
}

.twdvf-discovery__intro {
  color: #667085;
  font-size: 0.88rem;
  margin: 8px 0 24px;
}

.twdvf-discovery__choices {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.twdvf-discovery__choice {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  min-height: 230px;
  padding: 20px;
}

.twdvf-discovery__icon {
  align-items: center;
  background: #e8f1fb;
  border-radius: 9px;
  color: var(--twdvf-accent-dark);
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  margin-bottom: 14px;
  width: 38px;
}

.twdvf-discovery__choice h3 {
  color: #17202a;
  font-size: 1rem;
  line-height: 1.25;
  margin: 0 0 7px;
}

.twdvf-discovery__choice p {
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.5;
  margin: 0 0 18px;
}

.twdvf-discovery__choice form {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.twdvf-discovery__choice select,
.twdvf-discovery__primary,
.twdvf-discovery__secondary {
  border-radius: 8px;
  box-sizing: border-box;
  font: inherit;
  min-height: 42px;
  width: 100%;
}

.twdvf-discovery__choice select {
  background: #fff;
  border: 1px solid #d0d5dd;
  color: #344054;
  font-size: 0.78rem;
  padding: 0 9px;
}

.twdvf-discovery__primary,
.twdvf-discovery__secondary {
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 800;
  margin-top: auto;
  padding: 0 12px;
}

.twdvf-discovery__primary {
  background: linear-gradient(135deg, var(--twdvf-accent), var(--twdvf-accent-dark));
  border: 0;
  color: #fff;
}

.twdvf-discovery__secondary {
  background: #fff;
  border: 1px solid var(--twdvf-accent);
  color: var(--twdvf-accent-dark);
}

.twdvf-discovery__primary:disabled,
.twdvf-discovery__secondary:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.twdvf-discovery__status {
  color: #667085;
  font-size: 0.78rem;
  margin: 14px 0 0;
  min-height: 1.2em;
  text-align: center;
}

.twdvf-card-quantity {
  align-items: center;
  background: #fff;
  border: 1px solid #d7dee7;
  border-radius: 8px;
  display: inline-grid;
  grid-template-columns: 30px 36px 30px;
  height: 36px;
  margin: 0;
  overflow: hidden;
  vertical-align: middle;
  width: 96px;
}

.twdvf-card-sku {
  align-items: baseline;
  color: #667085;
  display: flex;
  font-size: 0.7rem;
  gap: 5px;
  justify-content: center;
  line-height: 1.35;
  margin: 4px 0 7px;
  min-width: 0;
}

.twdvf-card-sku span {
  font-weight: 600;
}

.twdvf-card-sku strong {
  color: #344054;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.twdvf-card-actions {
  align-items: stretch;
  display: flex;
  gap: 7px;
  justify-content: center;
  margin: 10px auto 0;
  max-width: 310px;
  width: calc(100% - 20px);
}

.twdvf-card-actions .wd-add-btn {
  display: flex;
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
}

.twdvf-card-actions .add_to_cart_button {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  justify-content: center;
  margin: 0;
  min-height: 36px;
  min-width: 0;
  padding-left: 12px;
  padding-right: 12px;
  width: 100%;
}

.twdvf-filter {
  box-sizing: border-box;
  max-width: 100%;
  overflow: visible;
  width: 100%;
}

.twdvf-filter > .widget-title,
.twdvf-filter > .widgettitle {
  border-bottom: 1px solid #eaecf0;
  box-sizing: border-box;
  margin-bottom: 0;
  max-width: 100%;
  width: 100%;
}

.twdvf-filter-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-weight: inherit;
  justify-content: space-between;
  min-height: 38px;
  padding: 7px 2px;
  text-align: left;
  text-transform: inherit;
  width: 100%;
}

.twdvf-filter-toggle__icon {
  display: block;
  height: 14px;
  margin-left: 10px;
  position: relative;
  width: 14px;
}

.twdvf-filter-toggle__icon::before,
.twdvf-filter-toggle__icon::after {
  background: currentColor;
  border-radius: 2px;
  content: '';
  display: block;
  left: 2px;
  position: absolute;
  top: 6px;
  transition: opacity 160ms ease, transform 160ms ease;
  width: 10px;
  height: 2px;
}

.twdvf-filter-toggle__icon::after {
  transform: rotate(90deg);
}

.twdvf-filter:not(.twdvf-filter--collapsed) .twdvf-filter-toggle__icon::after {
  opacity: 0;
  transform: rotate(0);
}

.twdvf-filter--collapsed .woocommerce-widget-layered-nav-list,
.twdvf-filter--collapsed .twdvf-filter-more,
.twdvf-filter--collapsed .twdvf-filter-search {
  display: none !important;
}

.twdvf-filter:not(.twdvf-filter--expanded) .twdvf-filter-item--extra {
  display: none !important;
}

.twdvf-filter--searching .twdvf-filter-item--extra:not([hidden]) {
  display: list-item !important;
}

.twdvf-filter li[hidden] {
  display: none !important;
}

.twdvf-filter-search {
  box-sizing: border-box;
  margin: 10px 0 9px;
  max-width: 100%;
  position: relative;
  width: 100%;
}

.twdvf-filter-search::before {
  border: 1.5px solid #7b8797;
  border-radius: 50%;
  content: '';
  height: 10px;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 11px;
  width: 10px;
  z-index: 1;
}

.twdvf-filter-search::after {
  background: #7b8797;
  content: '';
  height: 1.5px;
  left: 22px;
  pointer-events: none;
  position: absolute;
  top: 22px;
  transform: rotate(45deg);
  width: 6px;
  z-index: 1;
}

.twdvf-filter-search__input {
  appearance: none;
  background: #f8fafc !important;
  border: 1px solid #dce3eb !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  color: #17202a;
  display: block !important;
  font-size: 0.74rem !important;
  height: 36px !important;
  margin: 0 !important;
  max-width: 100% !important;
  min-height: 36px !important;
  padding: 0 10px 0 34px !important;
  width: 100% !important;
}

.twdvf-filter-search__input:focus {
  background: #fff !important;
  border-color: #2878d0 !important;
  box-shadow: 0 0 0 2px rgba(40, 120, 208, 0.12) !important;
  outline: 0;
}

.twdvf-filter-search__empty {
  color: #667085;
  display: block;
  font-size: 0.68rem;
  padding: 7px 2px 0;
}

.twdvf-filter-search__empty[hidden] {
  display: none !important;
}

.twdvf-filter--expanded .woocommerce-widget-layered-nav-list,
.twdvf-filter--searching .woocommerce-widget-layered-nav-list {
  max-height: 330px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 7px;
  scrollbar-color: #98a2b3 #eef2f6;
  scrollbar-width: thin;
}

.twdvf-filter--expanded .woocommerce-widget-layered-nav-list::-webkit-scrollbar,
.twdvf-filter--searching .woocommerce-widget-layered-nav-list::-webkit-scrollbar {
  width: 7px;
}

.twdvf-filter--expanded .woocommerce-widget-layered-nav-list::-webkit-scrollbar-track,
.twdvf-filter--searching .woocommerce-widget-layered-nav-list::-webkit-scrollbar-track {
  background: #eef2f6;
  border-radius: 10px;
}

.twdvf-filter--expanded .woocommerce-widget-layered-nav-list::-webkit-scrollbar-thumb,
.twdvf-filter--searching .woocommerce-widget-layered-nav-list::-webkit-scrollbar-thumb {
  background: #98a2b3;
  border-radius: 10px;
}

.twdvf-filter-more {
  background: transparent;
  border: 0;
  color: #175ea9;
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 750;
  margin-top: 9px;
  padding: 0;
  text-align: left;
}

.twdvf-card-quantity button,
.twdvf-card-quantity input {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #17202a;
  font: inherit;
  height: 34px;
  margin: 0;
  min-height: 0;
  padding: 0;
  text-align: center;
  width: 100%;
}

.twdvf-card-quantity button {
  color: #475467;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.twdvf-card-quantity button:hover {
  background: #f2f4f7;
  color: #175ea9;
}

.twdvf-card-quantity input {
  appearance: textfield;
  border-left: 1px solid #e4e7ec;
  border-right: 1px solid #e4e7ec;
  font-size: 0.78rem;
  font-weight: 700;
}

.twdvf-card-quantity input::-webkit-inner-spin-button,
.twdvf-card-quantity input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}

@media (max-width: 1024px) {
  .twdvf-search__form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .twdvf-package__steps {
    grid-template-columns: 1fr;
  }

  .twdvf-package__step {
    min-height: 92px;
  }

  .twdvf-discovery__choices {
    grid-template-columns: 1fr;
  }

  .twdvf-discovery__choice {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .twdvf-search {
    border-radius: 12px;
    padding: 18px;
  }

  .twdvf-search__form {
    grid-template-columns: 1fr;
  }

  .twdvf-search__title {
    margin-bottom: 18px;
  }

  .twdvf-vehicle {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .twdvf-vehicle__image-wrap {
    height: 200px;
    width: 100%;
  }

  .twdvf-vehicle__change {
    text-align: center;
  }

  .twdvf-vehicle--title.twdvf-vehicle--has-image {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .twdvf-vehicle--title .twdvf-vehicle__image-wrap {
    height: 76px;
    width: 105px;
  }

  .twdvf-vehicle--title .twdvf-vehicle__meta {
    white-space: normal;
  }

  .twdvf-vehicle--title .twdvf-vehicle__specs {
    grid-column: 1 / -1;
  }

  .twdvf-vehicle--title .twdvf-vehicle__change {
    grid-column: 1 / -1;
  }

  .twdvf-package {
    padding: 8px;
  }

  .twdvf-package__step {
    grid-template-columns: auto minmax(0, 1fr) 76px;
    padding: 10px;
  }

  .twdvf-package__step.is-locked {
    display: none;
  }

  .twdvf-package__vehicle-image,
  .twdvf-package__product-image {
    height: 58px;
    width: 76px;
  }

  .twdvf-package__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .twdvf-product-fitment {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .twdvf-product-fitment__vehicle {
    display: none;
  }

  .twdvf-discovery {
    align-items: flex-end;
    padding: 10px;
  }

  .twdvf-discovery__dialog {
    border-radius: 15px;
    max-height: calc(100vh - 20px);
    padding: 24px 16px 18px;
  }

  .twdvf-discovery__close {
    right: 12px;
    top: 12px;
  }

  .twdvf-card-actions {
    max-width: 280px;
    width: calc(100% - 12px);
  }

  .twdvf-card-quantity {
    grid-template-columns: 28px 34px 28px;
    width: 90px;
  }
}

/* WoodMart renders separate desktop and mobile header rows. The desktop row
 * may contain the same shortcode but is display:none at this breakpoint; the
 * visible instance must therefore size itself to the mobile row rather than
 * retaining the higher-specificity four-column desktop header grid. */
@media (max-width: 767px) {
  .wd-header-text .twdvf-search {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    padding: 6px 10px;
    width: 100%;
  }

  .wd-header-text .twdvf-search__compact-title {
    display: none;
  }

  .wd-header-text .twdvf-search__form {
    align-items: center;
    box-sizing: border-box;
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .wd-header-text .twdvf-search__field,
  .wd-header-text .twdvf-combobox {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .wd-header-text .twdvf-combobox__control {
    border-radius: 7px;
    font-size: clamp(0.62rem, 2.7vw, 0.72rem);
    gap: 4px;
    height: 39px;
    min-height: 39px;
    padding: 0 8px;
  }

  .wd-header-text .twdvf-combobox__chevron {
    border-width: 0 1.5px 1.5px 0;
    height: 6px;
    margin-left: 3px;
    margin-right: 2px;
    width: 6px;
  }

  .wd-header-text .twdvf-search__actions {
    display: none;
  }

  .wd-header-text .twdvf-search__status:empty {
    display: none;
  }

  .wd-header-text .twdvf-search__status:not(:empty) {
    background: #fff;
    border: 1px solid #e4e9f0;
    border-radius: 7px;
    box-shadow: 0 8px 18px rgba(23, 32, 42, 0.12);
    font-size: 0.68rem;
    left: 10px;
    margin: 4px 0 0;
    padding: 6px 8px;
    position: absolute;
    right: 10px;
    top: 100%;
    z-index: 10030;
  }

  .wd-header-text .twdvf-search__field:nth-child(1) .twdvf-combobox__panel {
    left: 0;
    right: auto;
  }

  .wd-header-text .twdvf-search__field:nth-child(2) .twdvf-combobox__panel {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .wd-header-text .twdvf-search__field:nth-child(3) .twdvf-combobox__panel {
    left: auto;
    right: 0;
  }

  .wd-header-text .twdvf-combobox__panel {
    box-sizing: border-box;
    max-width: calc(100vw - 20px);
    min-width: min(285px, calc(100vw - 20px));
    width: min(285px, calc(100vw - 20px));
  }
}
