/* =========================================
   HEADER SEARCH
   scope: desktop nav right + mobile toggle
========================================= */

.header-search__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* DESKTOP SLOT */
.navigation-web .header-search-desktop-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.navigation-web .header-search--desktop {
  width: 100%;
  display: flex;
  justify-content: flex-end;
}

/* FORM BASE */
.header-search__form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 340px;
  height: 42px;
  background: #fff;
  border: 1px solid #d9dde3;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: none;
}

.header-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 0 !important;
  outline: 0 !important;
  background: transparent;
  font-size: 14px;
  line-height: 1.2;
  color: #1f2937;
  font-family: inherit;
  box-shadow: none !important;
}

.header-search__input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.header-search__submit {
  flex: 0 0 46px;
  width: 46px;
  height: 42px;
  padding: 0;
  border: 0 !important;
  border-left: 1px solid #e5e7eb !important;
  background: #f8fafc;
  color: #111827;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  transition: background-color .2s ease, color .2s ease;
}

.header-search__submit:hover,
.header-search__submit:focus {
  color: #111827;
  background: #eef2f7;
}

.header-search__submit svg,
.header-search__toggle svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

/* NAV ALIGNMENT DESKTOP */
.navigation-web .row {
  align-items: center;
}

.navigation-web .m-navigation__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0;
}

.navigation-web .header-nav-desktop {
  display: flex;
  align-items: center;
}

/* MOBILE BASE */
.header-search-mobile-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.header-search__toggle {
  width: 44px;
  height: 46px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  background: transparent !important;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  line-height: 1 !important;
}

.header-search__toggle:hover,
.header-search__toggle:focus {
  color: #ffffff;
  background: transparent !important;
}

.header-search-mobile-panel {
  width: 100%;
}

.header-search__form--mobile {
  max-width: 100%;
  width: 100%;
  margin: 0 !important;
}

/* DESKTOP */
@media (min-width: 992px) {
  .navigation-web .header-search-desktop-slot {
    margin-left: auto;
  }

  .navigation-mob,
  .header-search-mobile-panel {
    display: none !important;
  }
}

/* MOBILE + TABLET */
@media (max-width: 991.98px) {
  .navigation-web {
    display: none !important;
  }

  .navigation-mob {
    position: relative;
    z-index: 30;
  }

  .navigation-mob .container {
    position: relative;
  }

  .navigation-mob .row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    min-height: 46px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .navigation-mob .header-nav-mobile {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding-right: 44px !important;
  }

  .navigation-mob .m-navigation__list {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    overflow: hidden !important;
    margin-bottom: 0 !important;
  }

  .navigation-mob .m-navigation__item {
    flex: 0 1 auto !important;
    min-width: 0 !important;
  }

  .navigation-mob .m-navigation__link {
    white-space: nowrap !important;
  }

  .navigation-mob .header-search-mobile-slot {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 44px !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 3 !important;
  }

  .navigation-mob .header-search--mobile {
    width: 44px !important;
    height: 46px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .navigation-mob .header-search__toggle {
    width: 44px !important;
    height: 46px !important;
  }

  .navigation-mob .header-search-mobile-panel {
    position: absolute !important;
    top: 46px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 8px 0 0 0 !important;
    margin: 0 !important;
    z-index: 20 !important;
  }

  .navigation-mob .header-search__form--mobile .header-search__input {
    height: 42px !important;
  }

  .navigation-mob .header-search__form--mobile .header-search__submit {
    width: 42px !important;
    height: 42px !important;
    flex: 0 0 42px !important;
  }
}

/* SMALL MOBILE */
@media (max-width: 575.98px) {
  .header-search__form {
    height: 40px;
  }

  .header-search__input {
    height: 38px;
    font-size: 14px;
    padding: 0 12px;
  }

  .header-search__submit {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .navigation-mob .header-search__toggle {
    width: 44px !important;
    height: 46px !important;
  }
}

@media (min-width: 992px) {
  .navigation-web .header-search__form {
    max-width: 360px;
    height: 44px;
    border: 1px solid #d7dde5;
    background: #ffffff;
  }

  .navigation-web .header-search__input {
    height: 42px;
    padding: 0 16px;
    font-size: 14px;
  }

  .navigation-web .header-search__input::placeholder {
    color: #7b8794;
  }

  .navigation-web .header-search__submit {
    width: 46px;
    height: 44px;
    flex: 0 0 46px;
  }
}

/* =====================================================
   DESKTOP SEARCH STYLE - VALUECOM INSPIRED
   rettangolare, compatta, integrata nella navbar
===================================================== */
@media (min-width: 992px) {

  .navigation-web .header-search-desktop-slot {
    flex: 0 0 320px !important;
    max-width: 320px !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .navigation-web .header-search--desktop {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .navigation-web .header-search__form {
    width: 100%;
    max-width: 320px;
    height: 38px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f3f4f6;
    overflow: hidden;
    box-shadow: none;
  }

  .navigation-web .header-search__input {
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1;
    color: #374151;
    background: transparent;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }

  .navigation-web .header-search__input::placeholder {
    color: #6b7280;
    opacity: 1;
  }

  .navigation-web .header-search__submit {
    width: 40px;
    height: 38px;
    flex: 0 0 40px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-left: 1px solid #e5e7eb !important;
    background: #ff5a3c;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
  }

  .navigation-web .header-search__submit:hover,
  .navigation-web .header-search__submit:focus {
    background: #ff4a28;
    color: #ffffff;
  }

  .navigation-web .header-search__submit svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
  }

  .navigation-web .row {
    align-items: center !important;
  }

  .navigation-web .m-navigation__list {
    align-items: center !important;
    margin-bottom: 0 !important;
  }
}

/* =====================================================
   DESKTOP SEARCH CLEAN
   white field + mycouponcodes orange submit
===================================================== */
@media (min-width: 992px) {

  .navigation-web .row {
    min-height: 60px;
    align-items: center !important;
  }

  .navigation-web .header-nav-desktop {
    display: flex;
    align-items: center;
    min-height: 60px;
  }

  .navigation-web .m-navigation__list {
    display: flex;
    align-items: center !important;
    margin-bottom: 0 !important;
  }

  .navigation-web .header-search-desktop-slot {
    flex: 0 0 300px !important;
    max-width: 300px !important;
    display: flex;
    align-items: center !important;
    justify-content: flex-end;
    min-height: 60px;
  }

  .navigation-web .header-search--desktop {
    width: 100%;
    display: flex;
    align-items: center !important;
    justify-content: flex-end;
  }

  .navigation-web .header-search__form--desktop-clean,
  #headerSearchDesktopForm {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
    height: 36px;
    margin: 0 !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    overflow: visible;
    box-shadow: none;
  }

  .navigation-web .header-search__input--desktop-clean,
  #headerSearchDesktopInput {
    flex: 1 1 auto;
    width: 100%;
    height: 34px;
    padding: 0 48px 0 12px;
    margin: 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent;
    color: #374151;
    font-size: 13px;
    line-height: 1;
    box-shadow: none !important;
  }

  .navigation-web .header-search__input--desktop-clean::placeholder,
  #headerSearchDesktopInput::placeholder {
    color: #9ca3af;
    opacity: 1;
  }

  .navigation-web .header-search__submit--desktop-clean,
  #headerSearchDesktopForm .header-search__submit {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-left: 0 !important;
    border-radius: 7px;
    background: #ff6900 !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    box-shadow: none !important;
  }

  .navigation-web .header-search__submit--desktop-clean:hover,
  .navigation-web .header-search__submit--desktop-clean:focus,
  #headerSearchDesktopForm .header-search__submit:hover,
  #headerSearchDesktopForm .header-search__submit:focus {
    background: #ff6900 !important;
    color: #ffffff !important;
  }

  .navigation-web .header-search__submit--desktop-clean svg,
  #headerSearchDesktopForm .header-search__submit svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: currentColor;
  }
}

@media (min-width: 992px) {
  .navigation-web .header-search-desktop-slot {
    display: flex !important;
    align-items: center !important;
    align-self: center !important;
    min-height: 60px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .navigation-web .header-search--desktop {
    display: flex !important;
    align-items: center !important;
    min-height: 60px !important;
    width: 100%;
  }

  .navigation-web .header-search__form--desktop-clean,
  #headerSearchDesktopForm {
    margin: 0 !important;
    top: 0 !important;
    transform: none !important;
  }
}

@media (min-width: 992px) {
  .navigation-web .header-search__input-wrp {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
  }
}

/* =====================================================
   HEADER SEARCH AUTOCOMPLETE RESULTS
   scope: desktop clean search dropdown
===================================================== */
@media (min-width: 992px) {

  #headerSearchDesktopForm #search-header-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 100%;
    z-index: 200;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
    overflow: hidden;
  }

  #headerSearchDesktopForm #search-header-results.hidden,
  #headerSearchDesktopForm #search-header-results:empty {
    display: none !important;
  }

  #headerSearchDesktopForm #search-header-results .shop-autocomplete {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
  }

  #headerSearchDesktopForm #search-header-results .result-shop {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    border-bottom: 1px solid #eef2f7;
  }

  #headerSearchDesktopForm #search-header-results .result-shop:last-child {
    border-bottom: 0;
  }

  #headerSearchDesktopForm #search-header-results .result-shop a {
    display: block;
    padding: 10px 12px;
    text-decoration: none !important;
    background: #ffffff;
    transition: background-color .18s ease;
  }

  #headerSearchDesktopForm #search-header-results .result-shop a:hover,
  #headerSearchDesktopForm #search-header-results .result-shop a:focus {
    background: #fff7f0;
    text-decoration: none !important;
  }

  #headerSearchDesktopForm #search-header-results .result-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
  }

  #headerSearchDesktopForm #search-header-results .first-line {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #headerSearchDesktopForm #search-header-results .result-shop a:hover .first-line,
  #headerSearchDesktopForm #search-header-results .result-shop a:focus .first-line {
    color: #ff6900;
  }

  #headerSearchDesktopForm #search-header-results .second-line {
    display: block;
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    font-weight: 500;
    color: #6b7280;
  }

  #headerSearchDesktopForm #search-header-results hr,
  #headerSearchDesktopForm #search-header-results .clear,
  #headerSearchDesktopForm #search-header-results .result-media {
    display: none !important;
  }
}

/* =========================================
   NAVBAR VERTICAL ALIGN FIX
========================================= */

@media (min-width: 992px) {

  /* altezza navbar coerente */
  .navigation-web .row {
    min-height: 60px;
    align-items: center !important;
  }

  /* lista menu */
  .navigation-web .m-navigation__list {
    display: flex;
    align-items: center !important;
    height: 60px;
    margin-bottom: 0 !important;
  }

  /* singole voci menu */
  .navigation-web .m-navigation__item {
    display: flex;
    align-items: center;
    height: 60px;
  }

  /* link menu */
  .navigation-web .m-navigation__link {
    display: flex;
    align-items: center;
    height: 60px;
  }

  /* search container */
  .navigation-web .header-search-desktop-slot {
    display: flex;
    align-items: center !important;
    height: 60px;
  }

  /* search wrapper */
  .navigation-web .header-search--desktop {
    display: flex;
    align-items: center !important;
    height: 60px;
  }

}