/* Header autocomplete (site search) */
[data-grt-search-form] {
  position: relative;
}

.grt-search-autocomplete {
  z-index: 1085;
  top: calc(100% + 0.25rem);
  left: 0;
  max-height: 28rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
}

.grt-search-autocomplete__thumb {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 52px;
}

.grt-search-autocomplete .list-group-item {
  background: #fff !important;
  color: #212529 !important;
  border: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.grt-search-autocomplete .list-group-item:last-child {
  border-bottom: 0;
}

.grt-search-autocomplete .list-group-item:hover,
.grt-search-autocomplete .list-group-item:focus {
  background-color: rgba(241, 101, 57, 0.08) !important;
  color: #212529 !important;
}

.grt-search-autocomplete .list-group-item.active,
.grt-search-autocomplete .list-group-item[aria-selected="true"] {
  background: #f16539 !important;
  border-color: #f16539 !important;
  color: #fff !important;
}

.grt-search-autocomplete .list-group-item.active *,
.grt-search-autocomplete .list-group-item[aria-selected="true"] *,
.grt-search-autocomplete .list-group-item.active .text-muted,
.grt-search-autocomplete .list-group-item[aria-selected="true"] .text-muted,
.grt-search-autocomplete .list-group-item.active .text-dark,
.grt-search-autocomplete .list-group-item[aria-selected="true"] .text-dark,
.grt-search-autocomplete .list-group-item.active .small,
.grt-search-autocomplete .list-group-item[aria-selected="true"] .small,
.grt-search-autocomplete .list-group-item.active .fw-semibold,
.grt-search-autocomplete .list-group-item[aria-selected="true"] .fw-semibold {
  color: #fff !important;
}

/* Shell layout — disable global card hover lift on filter chrome */
.grt-local-search-shell .grt-filter-panel,
.grt-local-search-shell .grt-local-search-toolbar {
  transform: none !important;
}

.grt-local-search-shell .grt-filter-panel:hover,
.grt-local-search-shell .grt-local-search-toolbar:hover {
  transform: none !important;
}

/* Toolbar */
.grt-local-search-toolbar {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.grt-local-search-toolbar__inner {
  display: grid;
  gap: 0.75rem;
  align-items: center;
}

@media (min-width: 992px) {
  .grt-local-search-toolbar__inner {
    grid-template-columns: minmax(0, 1fr) 11rem auto;
  }
}

.grt-local-search-toolbar__meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

@media (min-width: 992px) {
  .grt-local-search-toolbar__meta {
    align-items: flex-end;
    text-align: right;
  }
}

.grt-local-search-stats {
  font-size: 0.8125rem;
  color: #6c757d;
  font-weight: 500;
}

/* Inline filter search (no autocomplete) */
.grt-filter-search-input {
  position: relative;
}

.grt-filter-search-input__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: #adb5bd;
  pointer-events: none;
  font-size: 0.875rem;
}

.grt-filter-search-input .form-control {
  padding-left: 2.25rem;
  padding-right: 2.25rem;
  border-color: rgba(0, 0, 0, 0.12);
}

.grt-filter-search-input .form-control:focus {
  border-color: rgba(241, 101, 57, 0.45);
  box-shadow: 0 0 0 0.15rem rgba(241, 101, 57, 0.12);
}

.grt-filter-search-input__clear {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #6c757d;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.grt-filter-search-input__clear:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #212529;
}

/* Filter panel (single sidebar card) */
.grt-filter-panel {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.grt-filter-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(241, 101, 57, 0.03);
  min-height: 3rem;
}

.grt-filter-panel__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #2c2c2c;
}

.grt-filter-panel__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: #495057;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.grt-filter-panel__clear i {
  font-size: 0.6875rem;
  opacity: 0.85;
}

.grt-filter-panel__clear:hover,
.grt-filter-panel__clear:focus {
  border-color: rgba(241, 101, 57, 0.45);
  background: rgba(241, 101, 57, 0.08);
  color: #c24e22;
  box-shadow: 0 1px 3px rgba(241, 101, 57, 0.12);
}

.grt-filter-scope-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.grt-filter-scope-actions__btn {
  border: 1px solid rgba(241, 101, 57, 0.35);
  background: rgba(241, 101, 57, 0.08);
  color: #c24e22;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.grt-filter-scope-actions__btn:hover,
.grt-filter-scope-actions__btn:focus {
  background: rgba(241, 101, 57, 0.14);
  border-color: rgba(241, 101, 57, 0.5);
  color: #a8431c;
}

.grt-filter-scope-actions__link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #6c757d;
  text-decoration: none;
}

.grt-filter-scope-actions__link:hover {
  color: #f16539;
  text-decoration: underline;
}

.grt-filter-section {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.grt-filter-section--last {
  border-bottom: 0;
}

.grt-filter-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
}

.grt-filter-checks .form-check {
  margin-bottom: 0.45rem;
}

.grt-filter-checks .form-check:last-child {
  margin-bottom: 0;
}

/* Category breadcrumbs + tree */
.grt-filter-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
}

.grt-filter-breadcrumbs__link {
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 0.8125rem;
  color: #6c757d;
}

.grt-filter-breadcrumbs__link:hover,
.grt-filter-breadcrumbs__link.is-current {
  color: #f16539;
}

.grt-filter-breadcrumbs__sep {
  color: #ced4da;
  font-size: 0.75rem;
}

.grt-filter-tree__parent {
  display: block;
  width: 100%;
  border: 0;
  background: rgba(241, 101, 57, 0.06);
  color: #c24e22;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-radius: 0.375rem;
  margin-bottom: 0.65rem;
}

.grt-filter-tree__parent:hover {
  background: rgba(241, 101, 57, 0.1);
}

.grt-filter-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.grt-filter-tree--nested {
  margin-top: 0.15rem;
  margin-left: 0.65rem;
  padding-left: 0.65rem;
  border-left: 1px solid rgba(0, 0, 0, 0.08);
}

.grt-filter-tree__item {
  margin-bottom: 0.15rem;
}

.grt-filter-tree__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.4rem 0.55rem;
  border-radius: 0.375rem;
  color: #495057;
  font-size: 0.875rem;
  line-height: 1.35;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.grt-filter-tree__link:hover,
.grt-filter-tree__link:focus {
  background: rgba(241, 101, 57, 0.06);
  color: #212529;
}

.grt-filter-tree__item.is-active > .grt-filter-tree__link {
  background: rgba(241, 101, 57, 0.1);
  color: #c24e22;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #f16539;
}

.grt-filter-tree__label {
  flex: 1 1 auto;
  min-width: 0;
}

.grt-filter-tree__count {
  flex: 0 0 auto;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: #6c757d;
}

.grt-filter-tree__item.is-active > .grt-filter-tree__link .grt-filter-tree__count {
  background: rgba(241, 101, 57, 0.15);
  color: #c24e22;
}

/* Price range slider */
.grt-price-filter__summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2c2c2c;
}

.grt-price-filter__dash {
  color: #adb5bd;
}

.grt-price-filter__track {
  position: relative;
  height: 1.25rem;
}

.grt-price-filter__track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 999px;
  background: #e9ecef;
}

.grt-price-filter__track-fill {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  border-radius: 999px;
  background: #f16539;
  left: 0;
  right: 0;
}

.grt-price-filter__range {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1.25rem;
  margin: 0;
  pointer-events: none;
  appearance: none;
  background: transparent;
}

.grt-price-filter__range::-webkit-slider-thumb {
  appearance: none;
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #f16539;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.grt-price-filter__range::-moz-range-thumb {
  pointer-events: auto;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #f16539;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.grt-price-filter__range::-webkit-slider-runnable-track,
.grt-price-filter__range::-moz-range-track {
  background: transparent;
  border: 0;
}

.grt-price-filter__range--max {
  z-index: 2;
}

.grt-price-filter__range--min {
  z-index: 3;
}

.grt-price-filter__inputs .form-control {
  font-size: 0.8125rem;
}

/* Product cards */
.grt-local-search-shell [data-grt-results] .col {
  display: flex;
}

.grt-search-card {
  width: 100%;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
}

.grt-search-card:hover {
  transform: none;
  border-color: rgba(241, 101, 57, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07) !important;
}

.grt-search-card .card-body {
  padding: 0.75rem;
}

.grt-search-card__inner {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
  height: 100%;
}

.grt-search-card__media {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
}

.grt-search-card__media:hover {
  opacity: 0.92;
}

.grt-search-card img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 88px;
  height: auto;
  object-fit: contain;
}

.grt-search-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.grt-search-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin-bottom: 0.2rem;
}

.grt-search-card__sku {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #868e96;
}

.grt-search-card__sku::before {
  content: "SKU ";
  font-weight: 500;
  opacity: 0.85;
}

.grt-search-card__stock {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.grt-search-card__stock--out {
  color: #b02a37;
}

.grt-search-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.35;
}

.grt-search-card__title a {
  color: #2c2c2c;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grt-search-card__title a:hover {
  color: #f16539;
}

.grt-search-card__excerpt {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #868e96;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.grt-search-card__price {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: baseline;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
}

.grt-search-card__price-compare {
  color: #868e96;
  text-decoration: line-through;
  font-size: 0.8125rem;
  font-weight: 500;
}

.grt-search-card__price-current {
  color: #f16539;
}

.grt-search-card__excerpt + .grt-search-card__price {
  margin-top: 0.15rem;
}

.grt-search-card__actions {
  margin-top: auto;
  padding-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.grt-search-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.grt-search-card__cta--details {
  background: #fff;
  border-color: rgba(0, 0, 0, 0.12);
  color: #495057;
}

.grt-search-card__cta--details:hover {
  border-color: rgba(241, 101, 57, 0.35);
  color: #c24e22;
  background: rgba(241, 101, 57, 0.05);
}

.grt-search-card__cta--cart {
  background: #f16539;
  border-color: #f16539;
  color: #fff;
}

.grt-search-card__cta--cart:hover {
  background: #e05a30;
  border-color: #e05a30;
  color: #fff;
}

.grt-search-card__cta--cart:disabled {
  opacity: 0.72;
  cursor: wait;
}

.grt-search-badge,
.grt-search-sale-ribbon {
  position: absolute;
  left: 0.35rem;
  top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: #fff;
}

.grt-search-badge--new {
  background: #198754;
}

.grt-search-badge--classic {
  background: #6f42c1;
}

.grt-search-sale-ribbon {
  top: auto;
  bottom: 0.35rem;
  left: 0.35rem;
  background: #f16539;
}

.grt-local-search-active-filters .btn {
  border-radius: 999px;
  background: rgba(241, 101, 57, 0.06);
  border-color: rgba(241, 101, 57, 0.18);
  color: #495057;
}

.grt-local-search-active-filters .btn:hover {
  background: rgba(241, 101, 57, 0.12);
  border-color: rgba(241, 101, 57, 0.28);
  color: #212529;
}

.grt-local-search-feedback {
  font-size: 0.9375rem;
}

.grt-local-search-pagination .btn {
  min-width: 2.5rem;
}

/* Dynamic shop header for local search */
.shop-header--local-search {
  padding: 1.35rem 0;
  transition: padding 0.2s ease;
}

.shop-header--local-search.is-filtering {
  padding: 0.85rem 0;
}

.shop-header--local-search .page-title {
  margin-bottom: 0.35rem;
  transition: font-size 0.2s ease;
}

.shop-header--local-search.is-filtering .page-title {
  font-size: 1.65rem;
}

.shop-header--local-search .shop-header__context {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.88);
  min-height: 1.35rem;
}

.shop-header--local-search .shop-header__description {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.92);
}

.shop-header--local-search .shop-header__description .term-description,
.shop-header--local-search .shop-header__description p {
  margin-bottom: 0;
}

.shop-header--local-search.shop-header--embedded {
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  text-align: left;
}

.shop-header--local-search.shop-header--embedded .page-title {
  font-size: 1.5rem;
}

@media (max-width: 991.98px) {
  .grt-search-autocomplete {
    position: absolute !important;
  }

  .grt-local-search-toolbar__inner {
    grid-template-columns: 1fr;
  }
}
