/* Sports Town — modern fullscreen live search */

body.st-search-open {
  overflow: hidden;
}

.st-search,
.search-form-inner.st-search {
  cursor: text;
}

.st-search input[readonly],
.search-form-inner.st-search input[readonly] {
  cursor: text;
  background: #fff;
}

.st-search-overlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity var(--st-drawer-ms-out, 280ms) var(--st-drawer-ease-out, cubic-bezier(0.4, 0, 1, 1)),
    visibility 0s linear var(--st-drawer-ms-out, 280ms);
}

.st-search-overlay.is-open {
  visibility: visible;
  pointer-events: auto;
  opacity: 1;
  transition:
    opacity var(--st-drawer-ms, 360ms) var(--st-drawer-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    visibility 0s linear 0s;
}

.st-search-overlay__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(244, 124, 74, 0.18), transparent 55%),
    rgba(8, 8, 8, 0.48);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--st-drawer-ms-out, 280ms) var(--st-drawer-ease-out, cubic-bezier(0.4, 0, 1, 1));
}

.st-search-overlay.is-open .st-search-overlay__veil {
  opacity: 1;
  transition: opacity var(--st-drawer-ms, 360ms) var(--st-drawer-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.st-search-overlay__panel {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  max-height: min(92vh, 920px);
  margin: 20px auto 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(180deg, #fff 0%, var(--st-off-white, #FFFFFB) 140%);
  border: 1px solid rgba(8, 8, 8, 0.08);
  border-radius: 24px;
  box-shadow:
    0 28px 80px rgba(8, 8, 8, 0.22),
    0 0 0 1px rgba(255, 255, 255, 0.4) inset;
  opacity: 0;
  transform: translateY(-18px) scale(0.97);
  filter: blur(8px);
  transition:
    transform var(--st-drawer-ms-out, 280ms) var(--st-drawer-ease-out, cubic-bezier(0.4, 0, 1, 1)),
    opacity var(--st-drawer-ms-out, 280ms) var(--st-drawer-ease-out, cubic-bezier(0.4, 0, 1, 1)),
    filter var(--st-drawer-ms-out, 280ms) var(--st-drawer-ease-out, cubic-bezier(0.4, 0, 1, 1)),
    box-shadow var(--st-drawer-ms-out, 280ms) var(--st-drawer-ease-out, cubic-bezier(0.4, 0, 1, 1));
  will-change: transform, opacity, filter;
}

.st-search-overlay.is-open .st-search-overlay__panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  box-shadow:
    0 36px 100px rgba(8, 8, 8, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.45) inset;
  transition:
    transform var(--st-drawer-ms, 360ms) var(--st-drawer-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity calc(var(--st-drawer-ms, 360ms) * 0.7) var(--st-drawer-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    filter var(--st-drawer-ms, 360ms) var(--st-drawer-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--st-drawer-ms, 360ms) var(--st-drawer-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

.st-search-overlay__inner {
  width: 100%;
  margin: 0 auto;
  padding: 18px 28px 28px;
  box-sizing: border-box;
}

.st-search-overlay__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.st-search-overlay__kicker {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--st-orange, #F47C4A);
}

.st-search-form {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
  padding: 3px 3px 3px 12px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(8, 8, 8, 0.1);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(8, 8, 8, 0.04);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.st-search-form:focus-within {
  border-color: rgba(244, 124, 74, 0.55);
  box-shadow:
    0 0 0 2px rgba(244, 124, 74, 0.14),
    0 8px 20px rgba(8, 8, 8, 0.05);
}

.st-search-form__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  color: rgba(8, 8, 8, 0.45);
  flex: 0 0 auto;
  line-height: 0;
}

.st-search-form:focus-within .st-search-form__icon {
  color: var(--st-orange, #F47C4A);
}

.st-search-form__submit {
  border: 0;
  background: var(--st-orange, #F47C4A);
  color: #fff;
  height: auto;
  min-height: 0;
  align-self: stretch;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 999px;
  font-family: 'Montserrat', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  transition: background 0.18s ease, color 0.18s ease;
}

.st-search-form__submit:hover {
  background: #080808;
  color: #fff;
}

.st-search-form__close {
  border: 0;
  background: #fff;
  color: var(--st-black, #080808);
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 999px;
  border: 1px solid rgba(8, 8, 8, 0.1);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.st-search-form__close:hover {
  background: #080808;
  border-color: #080808;
  color: #fff;
}

.st-search-form__close span {
  font-size: 20px;
  line-height: 1;
  font-weight: 300;
}

.st-search-form input.st-search-form__input,
.st-search-form .st-search-form__input,
.st-search-form input[type="search"] {
  flex: 1 1 auto;
  width: auto !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  font-size: 13px !important;
  font-weight: 600;
  line-height: 1 !important;
  color: var(--st-black, #080808) !important;
  background: transparent !important;
  padding: 0 4px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  min-width: 0;
  align-self: center;
  font-family: 'Montserrat', sans-serif !important;
  border-radius: 0 !important;
  -webkit-appearance: none;
  appearance: none;
}

.st-search-form__input::placeholder,
.st-search-form input[type="search"]::placeholder {
  color: #a8adb3;
  font-weight: 500;
}

.st-search-form input[type="search"]::-webkit-search-decoration,
.st-search-form input[type="search"]::-webkit-search-cancel-button,
.st-search-form input[type="search"]::-webkit-search-results-button,
.st-search-form input[type="search"]::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.st-search-popular {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 18px;
}

.st-search-popular__label {
  font-size: 10px;
  font-weight: 800;
  color: rgba(8, 8, 8, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: 'Montserrat', sans-serif;
}

.st-search-popular__list,
.st-search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.st-search-suggestions {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.st-search-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid rgba(244, 124, 74, 0.2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--st-black, #080808);
  background: rgba(244, 124, 74, 0.07);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  font-family: 'Montserrat', sans-serif;
}

.st-search-chip:hover {
  border-color: var(--st-orange, #F47C4A);
  color: #080808;
  background: rgba(244, 124, 74, 0.16);
}

.st-search-chip--suggest {
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(8, 8, 8, 0.06);
  padding: 7px 2px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  color: rgba(8, 8, 8, 0.78);
  letter-spacing: -0.01em;
}

.st-search-chip--suggest:last-child {
  border-bottom: 0;
}

.st-search-chip--suggest:hover {
  color: var(--st-orange, #F47C4A);
  background: transparent;
  transform: none;
}

.st-search-body {
  display: grid;
  grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.st-search-body__aside {
  position: sticky;
  top: 8px;
}

.st-search-body__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.st-search-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(8, 8, 8, 0.4);
  margin: 0 0 8px;
  font-family: 'Montserrat', sans-serif;
}

.st-search-body__head .st-search-section-title {
  margin: 0;
}

.st-search-status {
  font-weight: 600;
  color: #8a8f94;
  font-size: 12px;
  letter-spacing: 0;
  text-transform: none;
}

.st-search-empty {
  color: #7e7e7e;
  font-size: 15px;
  padding: 28px 0;
  margin: 0;
}

.st-search-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 8px;
}

.st-search-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--st-orange, #F47C4A);
  color: #fff !important;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 12px 28px rgba(244, 124, 74, 0.28);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.st-search-all:hover {
  background: #080808;
  color: #fff !important;
  transform: translateY(-1px);
}

.st-search-hint {
  margin: 0;
  font-size: 12px;
  color: rgba(8, 8, 8, 0.4);
  font-family: 'Montserrat', sans-serif;
}

.st-search-oos {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #a33;
  font-weight: 600;
}

.st-skel {
  display: block;
  background: linear-gradient(90deg, #eceae4 25%, var(--st-off-white, #FFFFFB) 37%, #eceae4 63%);
  background-size: 400% 100%;
  animation: st-skel 1.2s ease infinite;
  border-radius: 10px;
}

.st-skel-text {
  height: 14px;
}

.st-skel-text--sm {
  height: 12px;
}

.st-skel-card-img {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: var(--st-radius, 18px);
}

.st-search-suggest-skel {
  display: block;
  width: 70%;
  height: 10px;
  margin: 6px 0;
}

@keyframes st-skel {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.st-search-products {
  margin: 0 -8px;
}

.st-search-products > [class*='col-'] {
  padding-left: 8px;
  padding-right: 8px;
  margin-bottom: 16px;
}

.st-search-products .st-product-card,
.st-search-card {
  height: 100%;
  border-radius: var(--st-radius, 18px);
  overflow: hidden;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
  mask-image: radial-gradient(white, black);
}

.st-search-products .st-product-card__media-wrap,
.st-search-card .st-product-card__media-wrap {
  border-radius: var(--st-radius, 18px) var(--st-radius, 18px) 0 0;
  overflow: hidden;
}

.st-search-products .st-product-card__media,
.st-search-card .st-product-card__media {
  border-radius: var(--st-radius, 18px) var(--st-radius, 18px) 0 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(8, 8, 8, 0.06);
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.st-search-products .st-product-card:hover .st-product-card__media,
.st-search-card:hover .st-product-card__media {
  border-color: rgba(244, 124, 74, 0.45);
  transform: translateY(-2px);
}

/* Hide Popular once a typed query has returned */
.st-search-overlay.has-query .st-search-popular {
  display: none !important;
}

@media (max-width: 991px) {
  .st-search-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .st-search-body__aside {
    position: static;
  }

  .st-search-suggestions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .st-search-overlay {
    z-index: 10120;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    align-items: stretch;
  }

  .st-search-overlay__panel {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 100vh;
    max-height: 100dvh;
    height: 100%;
    margin: 0 !important;
    border-radius: 0;
    border: 0;
    overflow-x: hidden;
    overflow-y: auto;
    transform: translateY(8%) scale(1);
    filter: blur(6px);
  }

  .st-search-overlay.is-open .st-search-overlay__panel {
    transform: translateY(0) scale(1);
    filter: blur(0);
  }

  @media (prefers-reduced-motion: reduce) {
    .st-search-overlay,
    .st-search-overlay__veil,
    .st-search-overlay__panel {
      transition: none !important;
      filter: none !important;
    }

    .st-search-overlay__panel {
      transform: none !important;
      opacity: 1 !important;
    }
  }

  .st-search-overlay__inner,
  .st-search-body,
  .st-search-body__aside,
  .st-search-body__main,
  .st-search-form,
  .st-search-popular,
  .st-search-footer {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .st-search-overlay__inner {
    padding: 12px 16px calc(28px + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
  }

  .st-search-overlay__top {
    width: 100%;
    min-width: 0;
  }

  .st-search-form {
    padding: 2px 2px 2px 10px;
    margin-bottom: 12px;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
  }

  .st-search-form input.st-search-form__input,
  .st-search-form input[type="search"] {
    flex: 1 1 0% !important;
    width: 0 !important;
    min-width: 0 !important;
    font-size: 13px !important;
    height: auto !important;
    padding: 0 4px !important;
  }

  .st-search-form__submit {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    padding: 0 12px;
    font-size: 10px;
  }

  .st-search-popular {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
  }

  .st-search-popular__label {
    flex: 0 0 auto;
  }

  .st-search-popular__list,
  .st-search-suggestions {
    display: flex;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .st-search-popular__list {
    flex: 1 1 auto;
  }

  .st-search-popular__list::-webkit-scrollbar,
  .st-search-suggestions::-webkit-scrollbar {
    display: none;
  }

  .st-search-popular__list > *,
  .st-search-suggestions > * {
    flex: 0 0 auto;
    max-width: 70vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .st-search-chip--suggest {
    display: inline-flex;
    align-items: center;
    max-width: min(70vw, 280px);
    padding: 4px 9px;
    border: 1px solid rgba(244, 124, 74, 0.2);
    border-bottom: 1px solid rgba(244, 124, 74, 0.2);
    border-radius: 999px;
    background: rgba(244, 124, 74, 0.07);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    color: var(--st-black, #080808);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .st-search-chip--suggest:hover {
    border-color: var(--st-orange, #F47C4A);
    color: #080808;
    background: rgba(244, 124, 74, 0.16);
  }

  .st-search-suggest-skel {
    display: inline-block;
    width: 72px;
    height: 24px;
    margin: 0;
    border-radius: 999px;
    flex: 0 0 auto;
  }

  .st-search-products {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
    max-width: 100%;
  }

  .st-search-products > [class*='col-'] {
    padding-left: 6px;
    padding-right: 6px;
  }

  .st-search-overlay.has-query [data-st-search-suggestions-wrap] {
    display: none !important;
  }

  .st-search-hint {
    display: none;
  }
}

/* Phones — hide the crushed search field; header icon opens the overlay */
@media only screen and (max-width: 767px) {
  .header-v2 .inner-header .header-wrap .header-ct-center {
    display: none !important;
  }
}

/* Tablet only — keep a compact search field */
@media only screen and (max-width: 991px) and (min-width: 768px) {
  .header-v2 .inner-header .header-wrap .header-ct-center {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0 8px;
  }

  .header-v2 .header-wrap .header-ct-center .inner-center,
  .header-v2 .header-wrap .header-ct-center .search-form-inner,
  .header-v2 .header-wrap .header-ct-center .search-form {
    width: 100%;
    max-width: 100%;
  }

  .search-form-inner {
    width: 100% !important;
    max-width: 100% !important;
    border: 2px solid var(--st-orange, #F47C4A) !important;
    border-radius: 100px;
    overflow: hidden;
    background: #fff;
  }

  .search-form-inner .select-category {
    display: none !important;
  }

  .search-form-inner label {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-form-inner input[type="search"] {
    width: 100%;
    min-width: 0;
  }

  .search-form-inner button.search-submit {
    width: 72px;
    flex: 0 0 72px;
    padding: 12px 8px !important;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .st-search-overlay,
  .st-search-overlay__veil,
  .st-search-overlay__panel {
    transition: none !important;
    filter: none !important;
  }

  .st-search-overlay.is-open .st-search-overlay__panel,
  .st-search-overlay__panel {
    transform: none !important;
    opacity: 1 !important;
  }
}
