/* =========================================================
   START – DAIVAVARNA VENDORS PAGE / DV VENDOR DIRECTORY
   ========================================================= */

.dv-vendor-directory {
  --dvvd-primary: var(--wd-primary-color, #ff955f);
  width: 100%;
}

/* ---------- FILTER PANEL ---------- */
.dvvd-filters,
.dvvd-filters * {
  box-sizing: border-box;
}

.dvvd-filters {
  position: relative;
  width: 100%;
  margin-bottom: 48px;
  padding: clamp(24px, 3vw, 38px);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 7px 26px rgba(0,0,0,.035);
}

.dvvd-search-field > label,
.dvvd-location-field > label {
  display: block;
  margin: 0 0 12px;
  color: inherit;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 600;
  line-height: 1.3;
}

.dvvd-search-input-wrap,
.dvvd-location-input-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Keep the main search field exactly inside the filter card on every
   breakpoint. WoodMart/mobile browser input rules can otherwise make a
   100% field behave like 100% + padding. */
.dvvd-search-field {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.dvvd-search-input-wrap {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.dvvd-main-search,
.dvvd-location-search {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  height: 58px !important;
  min-height: 58px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: 1px solid rgba(0,0,0,.12) !important;
  border-radius: 999px !important;
  outline: none !important;
  background: #fff !important;
  box-shadow: none !important;
  color: inherit !important;
  font: inherit !important;
  font-size: 16px !important;
  line-height: 58px !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}

.dvvd-main-search:focus,
.dvvd-location-search:focus {
  border-color: var(--dvvd-primary) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dvvd-primary) 14%, transparent) !important;
}

.dvvd-main-search::placeholder,
.dvvd-location-search::placeholder {
  color: rgba(0,0,0,.48);
  opacity: 1;
}

.dvvd-suggestions {
  position: absolute;
  z-index: 9999;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,.11);
}

.dvvd-suggestion {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: center;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.dvvd-suggestion:last-child { border-bottom: 0; }
.dvvd-suggestion:hover { background: rgba(0,0,0,.035); }

.dvvd-suggestion-type {
  flex: 0 0 76px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
}

.dvvd-suggestion-label { font-weight: 600; }

/* Location mode switch */
.dvvd-location-tabs {
  display: flex !important;
  width: fit-content;
  max-width: 100%;
  gap: 0;
  margin: 26px 0 24px;
  padding: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0,0,0,.055);
}

.dvvd-location-tab {
  position: static !important;
  display: inline-flex !important;
  min-width: 155px;
  min-height: 46px;
  margin: 0 !important;
  padding: 10px 24px !important;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit !important;
  font: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  cursor: pointer;
  transition: background .2s ease, box-shadow .2s ease;
}

.dvvd-location-tab.is-active {
  background: #fff !important;
  box-shadow: 0 3px 11px rgba(0,0,0,.08) !important;
}

/* Location search + distance */
.dvvd-location-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, .75fr);
  gap: clamp(24px, 4vw, 48px);
  align-items: end;
  width: 100%;
  margin: 0 0 26px;
}

.dvvd-location-controls[hidden] { display: none !important; }

.dvvd-location-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
}

.dvvd-location-search {
  padding-right: 20px !important;
}

/* Current-location button – deliberately neutral so it does not compete
   with the orange Apply Filters / Visit Store action buttons. */
.dvvd-current-location {
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: max-content;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 16px !important;
  transform: none !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(0,0,0,.11) !important;
  border-radius: 999px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: inherit !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  text-transform: none !important;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease !important;
}

.dvvd-current-location svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dvvd-current-location:hover {
  border-color: var(--dvvd-primary) !important;
  background: rgba(0,0,0,.018) !important;
}

.dvvd-current-location.is-loading {
  opacity: .55;
  pointer-events: none;
}

.dvvd-distance-wrap {
  min-width: 0;
  padding-bottom: 3px;
}

.dvvd-distance-head {
  display: flex;
  justify-content: space-between;
  gap: 15px;
}

.dvvd-distance-head {
  align-items: baseline;
  margin-bottom: 11px;
  font-size: 16px;
}

.dvvd-distance-value {
  font-size: 14px;
  font-weight: 600;
}

.dvvd-range-shell {
  position: relative;
  display: flex;
  width: 100%;
  height: 24px;
  align-items: center;
}

.dvvd-range-shell::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 50%;
  right: 0;
  left: 0;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #e6e6e6;
  pointer-events: none;
}

.dvvd-range-fill {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 0;
  width: 0;
  height: 7px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: var(--dvvd-primary);
  pointer-events: none;
  transition: width .04s linear;
}

.dvvd-distance-slider {
  position: relative;
  z-index: 2;
  display: block;
  width: 100% !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

.dv-vendor-directory input[type="range"].dvvd-distance-slider::-webkit-slider-runnable-track {
  height: 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.dv-vendor-directory input[type="range"].dvvd-distance-slider::-webkit-slider-thumb {
  width: 22px !important;
  height: 22px !important;
  margin-top: -7.5px !important;
  border: 3px solid #fff !important;
  border-radius: 50% !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  background: var(--dvvd-primary) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,.18) !important;
}

.dv-vendor-directory input[type="range"].dvvd-distance-slider::-moz-range-track {
  height: 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.dv-vendor-directory input[type="range"].dvvd-distance-slider::-moz-range-progress {
  height: 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
}

.dv-vendor-directory input[type="range"].dvvd-distance-slider::-moz-range-thumb {
  width: 16px !important;
  height: 16px !important;
  border: 3px solid #fff !important;
  border-radius: 50% !important;
  background: var(--dvvd-primary) !important;
  box-shadow: 0 2px 7px rgba(0,0,0,.18) !important;
}

.dv-vendor-directory input[type="range"].dvvd-distance-slider:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(255,149,95,.22), 0 2px 7px rgba(0,0,0,.18) !important;
}

/* Keep Apply Filters on its own clean row. */
.dvvd-apply {
  position: static !important;
  display: inline-flex !important;
  width: auto !important;
  min-width: 145px;
  margin: 0 !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  clear: both;
}

.dvvd-location-message {
  min-height: 0;
  margin-top: 12px;
  font-size: 13px;
  opacity: .72;
}

.dvvd-location-message:empty { display: none; }

.dvvd-location-message.is-error {
  color: #b42318;
  opacity: 1;
}

/* ---------- RESULTS ---------- */
.dvvd-results-head {
  margin-bottom: 4px;
  font-size: 14px;
  opacity: .68;
}

.dvvd-vendor-card {
  padding: 52px 0;
  border-bottom: 1px solid rgba(0,0,0,.10);
}

.dvvd-vendor-main {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, .72fr);
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}

.dvvd-vendor-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 28px;
}

.dvvd-vendor-logo {
  flex: 0 0 86px;
  width: 86px;
  height: 86px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: #fff;
}

.dvvd-vendor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dvvd-vendor-title-wrap { min-width: 0; }

.dvvd-vendor-name {
  margin: 0 0 9px;
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.025em;
  text-transform: none;
}

.dvvd-rating-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  min-height: 20px;
  font-size: 13px;
}

.dvvd-rating-row .star-rating { margin: 0; }

.dvvd-rating-text,
.dvvd-no-reviews { opacity: .68; }

.dvvd-distance {
  margin-top: 5px;
  font-size: 13px;
  font-weight: 600;
  opacity: .68;
}

.dvvd-bio {
  max-width: 850px;
  font-size: 16px;
  line-height: 1.75;
}

.dvvd-vendor-info {
  font-size: 14px;
  line-height: 1.65;
}

.dvvd-info-block { margin-bottom: 18px; }

.dvvd-hours-line {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 18px;
}

.dvvd-contact a {
  display: block;
  width: fit-content;
}

.dvvd-store-button-wrap { margin-top: 24px; }

/* Visit Store deliberately uses WoodMart's own button colors and hover. */
.dvvd-visit-store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dvvd-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 38px;
}

.dvvd-gallery-count-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dvvd-gallery-count-1 { grid-template-columns: 1fr; }

.dvvd-gallery-item {
  overflow: hidden;
  border-radius: 14px;
  background: rgba(0,0,0,.035);
}

.dvvd-gallery-item img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.dvvd-gallery-count-1 .dvvd-gallery-item img {
  height: clamp(300px, 42vw, 540px);
}

.dvvd-empty {
  padding: 48px 0;
  text-align: center;
  font-size: 17px;
}

.dv-vendor-directory.is-loading .dvvd-results {
  opacity: .45;
  pointer-events: none;
  transition: opacity .2s ease;
}

/* ---------- TABLET ---------- */
@media (max-width: 900px) {
  .dvvd-location-controls,
  .dvvd-vendor-main {
    grid-template-columns: 1fr;
  }

  .dvvd-location-controls { gap: 24px; }
  .dvvd-vendor-main { gap: 34px; }

  .dvvd-vendor-info {
    padding-top: 28px;
    border-top: 1px solid rgba(0,0,0,.08);
  }

  .dvvd-gallery-item img { height: 240px; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 600px) {
  .dvvd-filters {
    padding: 20px 16px;
    border-radius: 18px;
  }

  .dvvd-search-field,
  .dvvd-search-input-wrap,
  .dvvd-main-search {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }

  .dvvd-search-field > label,
  .dvvd-location-field > label {
    font-size: 17px;
  }

  .dvvd-main-search,
  .dvvd-location-search {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 16px !important;
    font-size: 15px !important;
    line-height: 54px !important;
  }

  .dvvd-location-tabs {
    width: 100%;
    margin: 20px 0 22px;
  }

  .dvvd-location-tab {
    flex: 1 1 50%;
    min-width: 0;
    padding: 10px 12px !important;
  }

  .dvvd-location-input-row {
    grid-template-columns: 1fr;
  }

  .dvvd-current-location {
    width: 100% !important;
  }

  .dvvd-apply {
    width: 100% !important;
    min-height: 50px;
  }

  .dvvd-vendor-card { padding: 38px 0; }

  .dvvd-vendor-heading {
    align-items: flex-start;
    gap: 15px;
  }

  .dvvd-vendor-logo {
    flex-basis: 64px;
    width: 64px;
    height: 64px;
  }

  .dvvd-vendor-name { font-size: clamp(26px, 7.5vw, 34px); }

  .dvvd-gallery,
  .dvvd-gallery-count-2 {
    grid-template-columns: 1fr;
  }

  .dvvd-gallery-item img,
  .dvvd-gallery-count-1 .dvvd-gallery-item img {
    height: 250px;
  }

  .dvvd-hours-line {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 8px;
  }
}

/* =========================================================
   END – DAIVAVARNA VENDORS PAGE / DV VENDOR DIRECTORY
   ========================================================= */
