/* FindVino hero filters + header text search */
.fv-hero-search {
  position: relative;
  z-index: 20;
  margin: 8px auto 28px;
  max-width: 920px;
  padding: 0 12px;
}

.fv-search-line {
  position: relative;
  max-width: 420px;
  margin: 0 auto 14px;
}
.fv-search-line--nav {
  max-width: none;
  margin: 0;
  width: 100%;
}
.fv-search-field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 44px;
  max-height: 96px;
  overflow-x: hidden;
  overflow-y: auto;
  box-sizing: border-box;
  position: relative;
  border: 1px solid #ddd;
  border-radius: 28px;
  padding: 4px 36px 4px 38px;
  background: #fff url('../images/search-icon.svg') 14px 12px no-repeat;
  background-size: 16px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.fv-search-line--nav .fv-search-field {
  min-height: 36px;
  max-height: 88px;
  padding: 3px 32px 3px 34px;
  background-position: 12px center;
  background-size: 15px 15px;
  box-shadow: none;
}
.fv-search-field__clear {
  display: none;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #999;
  font-size: 18px;
  line-height: 1;
  padding: 0 0 1px;
  margin: 0;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.fv-search-field.is-clearable .fv-search-field__clear,
.fv-search-field:focus-within .fv-search-field__clear {
  display: inline-flex;
}
.fv-search-field__clear:hover {
  color: #555;
  background: rgba(0, 0, 0, 0.06);
}
.fv-search-field:focus-within {
  border-color: #e8a45a;
  box-shadow: 0 2px 14px rgba(232,164,90,.25);
}
.fv-search-field input,
.fv-search-line input {
  flex: 1 1 72px;
  min-width: 72px;
  width: auto;
  height: 28px;
  border: 0 !important;
  border-radius: 0;
  padding: 0;
  margin: 0;
  font-size: 15px;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
}
.fv-search-line--nav .fv-search-field input {
  height: 26px;
  font-size: 13px;
}
.fv-search-chips {
  display: contents;
}
.fv-search-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  background: #fff3e6;
  border: 1px solid #efd2b0;
  border-radius: 999px;
  color: #5a4632;
  font-size: 12px;
  line-height: 1.2;
  padding: 3px 2px 3px 8px;
  flex: 0 1 auto;
}
.fv-search-chip__label {
  max-width: 110px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fv-search-chip__x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #a07a4e;
  font-size: 16px;
  line-height: 1;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.fv-search-chip__x:hover {
  color: #c47a2c;
}
.fv-search-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2000;
}
.fv-search-line--nav .fv-search-suggest {
  top: calc(100% + 6px);
}
.fv-suggest-box {
  background: #fff !important;
  opacity: 1 !important;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  max-height: min(70vh, 480px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  text-align: left;
  isolation: isolate;
}
.fv-suggest-title {
  padding: 12px 14px 8px;
  font-weight: 600;
  font-size: 13px;
  color: #888;
}
.fv-suggest-empty {
  padding: 12px 14px 16px;
  color: #666;
}
.fv-suggest-row {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
  border-top: 1px solid #f0f0f0;
}
.fv-suggest-row:hover {
  background: #fff8f0;
}
.fv-suggest-img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 56px;
  background: #f3f3f3;
}
.fv-suggest-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fv-suggest-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fv-suggest-name {
  font-weight: 600;
  font-size: 14px;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fv-suggest-sub {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fv-suggest-when {
  font-size: 12px;
  color: #c47a2c;
  margin-top: 2px;
}
.fv-suggest-box--empty,
.fv-suggest-box--chips {
  max-height: min(70vh, 480px);
}
.fv-suggest-recent {
  padding: 12px 14px 6px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.fv-suggest-recent__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.fv-suggest-recent__title {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}
.fv-suggest-recent__clear {
  border: 0;
  background: transparent;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
}
.fv-suggest-recent__clear:hover {
  color: #c47a2c;
}
.fv-suggest-recent__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.fv-suggest-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  background: #f3f3f3;
  border-radius: 8px;
  overflow: hidden;
}
.fv-suggest-pill__text {
  border: 0;
  background: transparent;
  color: #333;
  font-size: 13px;
  padding: 7px 4px 7px 10px;
  cursor: pointer;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fv-suggest-pill__text:hover {
  color: #c47a2c;
}
.fv-suggest-pill__x {
  border: 0;
  background: transparent;
  color: #999;
  font-size: 16px;
  line-height: 1;
  padding: 6px 8px 6px 4px;
  cursor: pointer;
}
.fv-suggest-pill__x:hover {
  color: #c47a2c;
}
.fv-suggest-facet-block {
  padding: 0 0 4px;
  border-bottom: 1px solid #f0f0f0;
}
.fv-suggest-facet-block .fv-suggest-title {
  padding-bottom: 6px;
}
.fv-suggest-facet-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}
.fv-suggest-facet {
  border: 1px solid #e8e0d6;
  background: #fff8f0;
  color: #5a4632;
  font-size: 13px;
  line-height: 1.2;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(196, 122, 44, 0.2);
  position: relative;
  z-index: 2;
}
.fv-suggest-facet:hover {
  background: #ffefd9;
  border-color: #e0c39a;
  color: #c47a2c;
}
.fv-suggest-facet::before {
  content: '+';
  display: inline-block;
  margin-right: 5px;
  font-weight: 600;
  color: #c47a2c;
}

.fv-main-menu {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 40px;
  box-shadow: 0 4px 18px rgba(0,0,0,.06);
  overflow: visible;
  position: relative;
}
.fv-main-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  min-width: 0;
}
.fv-main-menu-list-item {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  border-right: 1px solid #eee;
  user-select: none;
}
.fv-main-menu-list-item:last-child {
  border-right: none;
}
.fv-main-menu-list-item span.count {
  color: #999;
  font-size: 12px;
}
.fv-main-menu-list-item.active,
.fv-main-menu-list-item:hover {
  color: #c47a2c;
}
.fv-children-wrapper {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  min-width: 260px;
  max-width: 420px;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.14);
  padding: 12px 14px 14px;
  text-align: left;
  z-index: 60;
}
.fv-main-menu-list-item.active .fv-children-wrapper {
  display: block;
}
.fv-children-wrapper .uncheck {
  margin: 0 0 8px;
  color: #c47a2c;
  cursor: pointer;
  font-size: 13px;
}
.fv-children-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fv-children-list li {
  margin: 0 0 6px;
}
.fv-children-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
}
.fv-children-list input[type=radio],
.fv-children-list input[type=checkbox] {
  margin: 0;
}
.fv-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  margin: 6px;
  padding: 0 22px;
  height: 40px;
  border-radius: 28px;
  background: #e8a45a;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 600;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.fv-search-btn:hover {
  background: #d8923f;
  color: #fff !important;
}
.fv-search-btn .fv-ico {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url('../images/search-icon-w.svg') center/contain no-repeat;
}

/* Header placement — desktop */
.navbar > .container {
  position: relative;
}
.fv-nav-search--desk {
  display: none;
}
.fv-nav-search--desk .fv-search-line--nav .fv-search-field {
  min-height: 34px;
}
.fv-nav-search--desk .fv-search-line--nav .fv-search-field input {
  height: 24px;
  font-size: 13px;
}
/* Suggest may be wider than the pill; grow to the right */
.fv-nav-search--desk .fv-search-suggest {
  left: 0;
  right: auto;
  width: min(440px, calc(100vw - 24px));
  min-width: 100%;
}

/* Header placement — mobile loupe expand */
.fv-nav-search-mob {
  display: none;
}
.fv-nav-search-mob__toggle {
  width: 36px;
  height: 36px;
  border: 1px solid #e0e0e0;
  border-radius: 50%;
  background: #fff url('../images/search-icon.svg') center no-repeat;
  background-size: 16px 16px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.fv-nav-search-mob__panel {
  position: absolute;
  right: 0;
  top: 0;
  width: 36px;
  min-height: 36px;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transition: width .32s ease, opacity .2s ease;
}
.fv-nav-search-mob__panel .fv-search-field--mob {
  min-height: 36px;
  padding: 3px 34px 3px 34px;
  background-position: 12px 10px;
  background-size: 15px 15px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.fv-nav-search-mob__panel .fv-search-field--mob input {
  height: 26px;
  font-size: 14px;
  padding-right: 0;
}
.fv-nav-search-mob__close {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #888;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 0 1px;
  margin: 0;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}
.fv-nav-search-mob.is-open {
  height: auto;
  min-height: 36px;
  overflow: visible;
}
.fv-nav-search-mob.is-open .fv-nav-search-mob__toggle {
  visibility: hidden;
}
.fv-nav-search-mob.is-open .fv-nav-search-mob__panel {
  /* Leave ~14px so left rounded tip of the field stays visible */
  width: min(340px, calc(100vw - 80px)); /* loupe right:66px + 14px inset */
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
}
.fv-nav-search-mob .fv-search-suggest {
  /* Closed: must not cover the page (fixed+pointer-events:auto blocked clicks) */
  display: none;
  pointer-events: none;
  position: static;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  width: auto;
  height: auto;
  min-height: 0;
  max-height: none;
  background: transparent;
  z-index: auto;
  overflow: hidden;
  box-shadow: none;
}
.fv-nav-search-mob.is-open .fv-search-suggest {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  width: auto;
  top: 52px;
  bottom: 0;
  z-index: 2100;
  pointer-events: auto;
  background: #fff;
  /* Exact height set in JS from visualViewport (above keyboard) */
  overflow: hidden;
  box-shadow: none;
}
.fv-suggest-panel-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 6;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  padding: 0 0 1px;
  margin: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.fv-search-field__clear > span,
.fv-nav-search-mob__close > span,
.fv-suggest-panel-close > span {
  display: block;
  line-height: 1;
  font-size: inherit;
  transform: translateY(-0.04em);
}
.fv-suggest-panel-close:hover,
.fv-suggest-panel-close:active {
  background: rgba(0, 0, 0, 0.1);
  color: #333;
}
.fv-search-suggest .fv-suggest-box .fv-suggest-title,
.fv-search-suggest .fv-suggest-box .fv-suggest-recent__head {
  padding-right: 44px;
}
.fv-nav-search-mob .fv-suggest-box {
  /* Fill sheet even with few rows; JS sets exact height from visualViewport */
  height: 100%;
  min-height: 100%;
  max-height: 100%;
  border-radius: 0;
  box-shadow: none;
  background: #fff !important;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
html.fv-mob-search-open,
body.fv-mob-search-open {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
body.fv-mob-search-open {
  /* position/top set in JS to freeze scroll offset on iOS */
  width: 100%;
}
.fv-nav-search-mob .fv-suggest-facet,
.fv-nav-search-mob .fv-suggest-pill__text,
.fv-nav-search-mob .fv-suggest-pill__x,
.fv-nav-search-mob .fv-search-chip__x {
  touch-action: manipulation;
}

@media (min-width: 768px) {
  .fv-nav-search--desk {
    display: block;
    float: none;
    position: absolute;
    left: auto;
    right: 420px; /* fallback until JS places */
    top: 8px;
    width: 220px;
    max-width: 260px;
    margin: 0;
    padding: 0;
    z-index: 20;
    visibility: hidden; /* avoid flash over logo before placeDeskSearch */
  }
  .fv-nav-search--desk.is-placed {
    visibility: visible;
  }
  .fv-nav-search-mob {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .fv-nav-search--desk {
    display: none !important;
  }
  /* Guest: loupe left of hamburger. Logged-in: loupe left of avatar */
  .fv-nav-search-mob {
    display: block;
    position: absolute;
    right: 66px;
    top: 7px;
    width: 36px;
    height: 36px;
    z-index: 1002;
  }
  .navbar-header:has(.nav-user-mobile-bar) .fv-nav-search-mob {
    right: 110px; /* … loupe | avatar | burger */
  }
  .navbar-header:has(.nav-user-mobile-bar) .fv-nav-search-mob.is-open .fv-nav-search-mob__panel {
    width: min(340px, calc(100vw - 124px)); /* loupe right:110px + 14px inset */
  }
  .navbar-header .nav-user-mobile-bar {
    right: 62px !important;
  }
  .navbar-header .mobile-icons {
    right: 154px !important;
  }
  .fv-main-menu {
    flex-wrap: wrap;
    border-radius: 18px;
  }
  .fv-main-menu-list {
    width: 100%;
    flex-wrap: wrap;
  }
  .fv-main-menu-list-item {
    flex: 1 1 33%;
    padding: 12px 6px;
    font-size: 13px;
  }
  .fv-search-btn {
    width: calc(100% - 12px);
    margin: 6px;
  }
  .fv-children-wrapper {
    left: 50%;
    transform: translateX(-50%);
    min-width: 240px;
    width: 90vw;
    max-width: 340px;
  }
}

@media (min-width: 992px) {
  .fv-nav-search--desk {
    width: 240px;
    max-width: 260px;
  }
}
@media (min-width: 1200px) {
  .fv-nav-search--desk {
    width: 260px;
    max-width: 260px;
  }
}
