
html.search-open,
body.search-open {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

html.search-open::-webkit-scrollbar,
body.search-open::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/**
 * GoodTHCA Search & Predictive Search Styles
 * 1:1 Parity with Shopify Dawn / GoodTHCA search listing
 * STRICT RULE: ZERO letter-spacing declarations
 */

/* Header Search Modal (Image 1 Parity) */
details[open] > .search-modal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: absolute !important;
  top: 0;
  left: 0 !important;
  right: 0 !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  height: 100% !important;
  min-height: 110px !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  z-index: 1000 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.section-header.shopify-section-group-header-group.scrolled-past-header .search-modal {
  top: -41px !important;
}


.search-modal__content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px;
  position: relative;
  box-sizing: border-box;
}

.search-modal .search-modal__form {
  flex: 1;
  max-width: 820px;
  position: relative;
}

.search-modal .search-modal__form .field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-modal .search__input.field__input {
  width: 100%;
  height: 52px;
  background: #ffffff;
  border: 1px solid #d4d4d4;
  border-radius: 15px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  color: #000000;
  padding: 12px 60px 12px 24px;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.search-modal .search__input.field__input:focus {
  border-color: #888888;
  outline: none;
  box-shadow: none;
}

.search-modal .search__input.field__input::placeholder {
  opacity: 1 !important;
  color: #767676 !important;
}

.search-modal .search__button.field__button {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 32px;
  height: 32px;
  z-index: 2;
}

.search-modal .search__button.field__button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.search-modal .search__button.field__button svg path {
  stroke: #c4c4c4;
}

.search-modal .search-modal__close-button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  margin-left: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  flex-shrink: 0;
}

.search-modal .search-modal__close-button:hover svg path {
  stroke: #14aa00;
}

/* Search Results Template Wrapper */
.template-search {
  background-color: #f5f5f5;
  padding-top: 60px;
  padding-bottom: 80px;
  min-height: 60vh;
}

@media screen and (min-width: 750px) {
  .template-search {
    padding-top: 80px;
    padding-bottom: 100px;
  }
}

.template-search__header {
  margin-bottom: 35px;
  text-align: left;
}

/* Heading: SEARCH RESULTS */
.template-search__header h1.template-search__title,
body.search .template-search__header .h2.center {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 45px;
  line-height: 1.2;
  color: #000000;
  text-transform: uppercase;
  margin: 0 0 25px 0;
  text-align: left;
}

@media screen and (max-width: 749px) {
  .template-search__header {
    text-align: center;
  }
  .template-search__header h1.template-search__title,
  body.search .template-search__header .h2.center {
    font-size: 28px;
    line-height: 36px;
    text-align: center;
    margin-bottom: 18px;
  }
}

/* Search Bar Container */
.template-search__search {
  margin: 0 0 20px 0;
  max-width: 741px;
  position: relative;
}

.template-search__search .search {
  position: relative;
  width: 100%;
}

.template-search__search .field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Search Input Field */
.template-search .search__input.field__input {
  width: 100%;
  height: 52px;
  background: transparent;
  border: 1px solid #000000;
  border-radius: 15px;
  color: #000000;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  padding: 12px 90px 12px 20px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.template-search .search__input.field__input:focus {
  border-color: #20fc03;
  box-shadow: 0 0 10px rgba(32, 252, 3, 0.25);
}

.template-search .search__input.field__input::placeholder {
  color: #777777;
}

/* Action Buttons inside Input */
.template-search .field__button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #1e1e1e;
  z-index: 2;
  transition: transform 0.15s ease, color 0.15s ease;
}

.template-search .field__button:hover {
  color: #20fc03;
}

/* Reset / Clear Button */
.template-search .reset__button {
  right: 48px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-search .reset__button::after {
  content: '';
  position: absolute;
  right: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background-color: rgba(0, 0, 0, 0.12);
}

.template-search .reset__button.hidden {
  display: none !important;
}

/* Submit Arrow Button */
.template-search .search__button {
  right: 14px;
  width: 30px;
  height: 30px;
}

.template-search .search__button:hover svg path {
  fill: #14aa00;
}

/* Status Result Count */
.template-search__status,
.template-search__header p[role="status"] {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  line-height: 22px;
  color: #1e1e1e;
  margin: 15px 0 0 0;
}

@media screen and (max-width: 749px) {
  .template-search__status,
  .template-search__header p[role="status"] {
    text-align: center;
    font-size: 14px;
  }
}

/* Product Grid */
.product-grid-container {
  width: 100%;
}

.template-search .product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media screen and (max-width: 989px) {
  .template-search .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 749px) {
  .template-search .product-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.template-search .product-grid .grid__item {
  width: 100%;
}

/* Card Parity Enhancements */
.template-search .card-wrapper,
.product-card-wrapper {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  transform: none !important;
  cursor: pointer !important;
  transition: box-shadow 0.3s ease !important;
}

.template-search .card-wrapper:hover,
.product-card-wrapper:hover {
  transform: none !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

.template-search .card {
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  text-decoration: none;
  flex: 1;
  cursor: pointer !important;
}

.product-card-wrapper,
.product-card-wrapper .card {
  height: 100%;
}

.product-card-wrapper .card {
  display: flex;
  flex-direction: column;
}

.template-search .card__inner,
.product-card-wrapper .card__inner {
  position: relative;
  width: 100%;
  height: 284px !important;
  flex: 0 0 284px !important;
  max-height: 284px !important;
  aspect-ratio: auto !important;
  overflow: hidden;
  background-color: #f7f7f7;
  border-radius: 15px 15px 0 0;
  display: flex;
  align-items: stretch;
  cursor: pointer !important;
}

.template-search .card__inner::before,
.product-card-wrapper .card__inner::before {
  display: none !important;
}

.template-search .card__media,
.template-search .card .media,
.product-card-wrapper .card__inner .media,
.product-card-wrapper .card__inner img {
  height: 100% !important;
  width: 100% !important;
  object-fit: cover !important;
}

.card__media-link {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

.template-search .card__media,
.template-search .card .media,
.product-card-wrapper .card__inner .media {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: transparent;
  border-radius: 12px 12px 0 0;
  cursor: pointer !important;
}

.template-search .card__media img,
.template-search .card .media img,
.product-card-wrapper .card__inner img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px 12px 0 0;
  transform: scale(1);
  transition: transform 0.4s ease, opacity 0.4s ease !important;
}

/* Search results: no second image on hover (live search has "show second image" off; search.php
   also skips it). The hover zoom comes from the shared card hover rules in app.css. This file
   loads on every page (header search), so these rules must stay scoped to .template-search. */
.template-search .media.media--hover-effect > img + img {
  display: none;
}

.template-search .card-wrapper:hover .card__heading a,
.product-card-wrapper:hover .card__heading a,
.card-wrapper:hover .card__heading a,
.card:hover .card__heading a,
.underline-links-hover:hover .card__heading a {
  text-decoration: underline !important;
  text-underline-offset: 0.3rem !important;
  color: #0a0a0a !important;
}

.template-search .card__inner .card__content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  pointer-events: none;
  z-index: 2;
}

.template-search .card__inner .card__badge {
  pointer-events: auto;
}

.template-search .card > .card__content {
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.template-search .card__heading {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 24px;
  line-height: 1.1;
  margin: 0 0 10px 0;
}

.template-search .card__heading a {
  color: #0a0a0a;
  text-decoration: none;
}

.template-search .card__heading a:hover {
  color: #0a0a0a;
}

.template-search .thca-description {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.template-search .price {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #19ff00;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.template-search .price-item--regular small {
  color: #0a0a0a;
  font-weight: 500;
  font-size: 14px;
  margin-right: 2px;
}

.template-search .price .price-item {
  color: #19ff00;
}

.template-search .quick-add {
  margin-top: auto;
  padding-top: 15px;
}

.template-search .quick-add__submit {
  min-height: 52px;
  border-radius: 999px;
  background: #000000;
  color: #19ff00;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 800;
  font-size: 14px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.template-search .quick-add__submit svg path {
  fill: #19ff00;
  transition: fill 0.2s ease;
}

.template-search .quick-add__submit:hover {
  background: #19ff00;
  color: #000000;
}

.template-search .quick-add__submit:hover svg path {
  fill: #000000;
}

/* Sold out (disabled) card button: same blocked cursor as the shared product card */
.template-search .quick-add__submit:disabled {
  cursor: not-allowed;
}

/* Star Rating inside Product Card */
.template-search .card-rating,
.product-card-wrapper .card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 14px;
  font-family: 'Instrument Sans', sans-serif;
}

.template-search .card-rating__stars,
.product-card-wrapper .card-rating__stars {
  display: inline-flex;
  gap: 3px;
  color: #19ff00;
}

.template-search .card-rating__stars svg,
.product-card-wrapper .card-rating__stars svg {
  width: 15px;
  height: 15px;
  fill: #19ff00;
}

.template-search .card-rating__score,
.product-card-wrapper .card-rating__score,
.template-search .card-rating__count,
.product-card-wrapper .card-rating__count {
  color: #19ff00;
  font-size: 14px;
  font-weight: 700;
}

/* Predictive Search Dropdown Overlay */
.predictive-search {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  z-index: 100;
  overflow: hidden;
  box-sizing: border-box;
}

predictive-search[open] .predictive-search,
.predictive-search.is-open {
  display: block;
}

.predictive-search__heading {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 700;
  font-size: 11px;
  color: #777777;
  text-transform: uppercase;
  padding: 14px 20px 10px;
  margin: 0;
  border-bottom: 1px solid #f0f0f0;
}

.predictive-search__results-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 380px;
  overflow-y: auto;
}

.predictive-search__item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  text-decoration: none;
  color: #000000;
  border-bottom: 1px solid #f7f7f7;
  transition: background-color 0.15s ease;
}

.predictive-search__item:hover,
.predictive-search__item.is-selected {
  background-color: #f7f7f7;
}

.predictive-search__image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 6px;
  background-color: #f0f0f0;
  flex-shrink: 0;
}

.predictive-search__item-content {
  flex: 1;
  min-width: 0;
}

.predictive-search__item-heading {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  color: #111111;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.predictive-search__item:hover .predictive-search__item-heading {
  text-decoration: underline;
}

.predictive-search__item-price {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  color: #14aa00;
  font-weight: 600;
  margin-top: 3px;
}

.predictive-search__search-for-button {
  display: block;
  width: 100%;
  border-top: 1px solid #eeeeee;
  background: #fafafa;
}

.predictive-search__search-for-button button,
.predictive-search__search-for-button a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

.predictive-search__search-for-button button:hover,
.predictive-search__search-for-button a:hover {
  background-color: #f0f0f0;
  color: #14aa00;
}

.predictive-search__search-for-button svg {
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.predictive-search__search-for-button:hover svg {
  transform: translateX(3px);
}

/* Empty State */
.template-search--empty-wrap {
  text-align: center;
  padding: 40px 20px 80px;
}

.template-search--empty-wrap p {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  color: #666666;
  max-width: 550px;
  margin: 0 auto;
}

/* Dawn Pagination */
.pagination-wrapper {
  margin-top: 50px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.pagination__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination__item {
  color: #000000;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  text-decoration: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.pagination__item:hover {
  color: #14aa00;
}

.pagination__item--current {
  font-weight: 700;
  color: #000000;
}

.pagination__item--current::after {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #14aa00;
}

.pagination__item-arrow {
  color: #14aa00 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination__item-arrow svg {
  display: block;
  stroke: #14aa00;
  transition: stroke 0.15s ease, transform 0.15s ease;
}

.pagination__item-arrow:hover svg {
  stroke: #000000;
  transform: scale(1.1);
}


/* ==========================================================================
   MIGRATED RULES FOR SEARCH.CSS (from custom.css)
   ========================================================================== */

details[open]>.search-modal {
  left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    min-height: 144px;
}
.search-modal .search-modal__form {
  max-width: 90rem;
}
.search-modal .search-modal__form .field:after {
  border-radius: 15px;
}
.search-modal .search-modal__form .field:focus-visible {
  outline: none;
}
.predictive-search__heading {
  font-family: Instrument Sans;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    letter-spacing: -1%;
    text-transform: uppercase;
}
.predictive-search__result-group .predictive-search__results-list .predictive-search__item .predictive-search__image {
  width: 50px;
    height: 50px;
    object-fit: cover;
}
.predictive-search__result-group .predictive-search__results-list .predictive-search__item .predictive-search__item-heading {
  font-family: Instrument Sans;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0%;
    color: #000;
}
body.search .template-search__header {
  text-align: left;
}
body.search .template-search__header .h2.center {
  text-align: left;
    font-family: Montserrat;
    font-weight: 800;
    font-size: 45px;
    line-height: 60px;
    letter-spacing: -3%;
    vertical-align: middle;
    text-transform: uppercase;
}
body.search .template-search__search {
  margin-left: 0;
    margin-bottom: 20px;
}
.template-search {
  background: #F5F5F5;
}
body.search .template-search .template-search__header .field:before {
  display: none;
}
body.search .template-search .template-search__header .field:after {
  display: none;
}
.template-search .search__input.field__input {
  background: transparent;
    border: 1px solid #000000;
    border-radius: 15px;
}
.template-search__search .search {
  margin-top: 2rem;
}

@media screen and (max-width: 767px) {
  .mbf-outer .mbf-search {
    margin-bottom: 25px;
  }
  .mbf-outer .mbf-search .mbf-search__input {
    padding: 17px 11px 17px 30px;
        font-family: Instrument Sans;
        font-size: 16px;
        line-height: 24px;
        letter-spacing: -1%;
        min-height: 58px;
  }
  .mbf-outer .mbf-search__btn {
    width: 36px;
        height: 36px;
        padding: 0;
        margin-right: 15px;
  }
  body.search .template-search__header .h2.center {
    font-size: 28px;
        line-height: 36px;
        letter-spacing: -4%;
        text-align: center;
  }
  body.search .template-search__header p {
    font-size: 16px;
        line-height: 24px;
        letter-spacing: -1%;
        text-align: center;
  }
}

