/* SearchResultsPage - filter row: default is normal flow so it always shows right after the title.
   JS adds .is-fixed on scroll to stick the bar under the nav. Filters visible and work on desktop and mobile. */
.search-results-filter-row-sticky {
  position: relative;
  z-index: 100;
  background: var(--longos-white, #fff);
  margin-bottom: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

.search-results-filter-row-sticky.is-fixed {
  position: fixed;
  left: 50%;
  top: var(--search-results-sticky-top, 133px);
  width: 100%;
  max-width: var(--bs-container-max-width, 1320px);
  transform: translateX(-50%);
  margin-bottom: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Mobile: sticky bar below compact header when present */
@media (max-width: 991px) {
  .search-results-filter-row-sticky.is-fixed {
    top: var(--search-results-sticky-top, 100px);
  }
}

@media (max-width: 575px) {
  .search-results-filter-row-sticky.is-fixed {
    top: var(--search-results-sticky-top, 80px);
  }
}

.search-results-filter-bar-inner,
.search-results-filter-row-sticky.is-fixed .search-results-filter-bar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: var(--bs-container-max-width, 1320px);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--bs-gutter-x, 0.75rem);
  padding-right: var(--bs-gutter-x, 0.75rem);
}



.search-results-filter-bar-inner .search-results-filters-cell {
  grid-column: 2;
}

/* Filter radios: white background, black indicator when checked (override global blue) */
.search-results-filters .form-check-input {
  background-color: #fff;
  border-color: #2a2a2a;
  border-width: 1px;
}

.search-results-filters .form-check-input:checked {
  background-color: #fff;
  border-color: #2a2a2a;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3ccircle r='6' fill='%232a2a2a' cx='8' cy='8'/%3e%3c/svg%3e");
}

.search-results-filters .form-check-input:focus {
  border-color: #2a2a2a;
  box-shadow: 0 0 0 0.25rem rgba(42, 42, 42, 0.25);
}

.search-results-filter-bar-inner .search-results-count {
  grid-column: 3;
}

/* Mobile: results count outside the filters container (below the white box) */
.search-results-count-mobile {
  color: var(--longos-dark-gray, #2a2a2a);
  margin-top: 0;
}

/* Mobile: filter dropdown (replaces radio group); flat list, no card, design-matched */
.search-results-filter-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  color: var(--longos-dark-gray, #2a2a2a);
  background: #fff;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}

.search-results-filter-dropdown-trigger:hover {
  border-color: #2a2a2a;
}

.search-results-filter-dropdown-caret {
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.2s ease;
}

.search-results-filter-dropdown.is-open .search-results-filter-dropdown-caret {
  transform: rotate(180deg);
}

/* Dropdown list: no white card – no shadow, no rounded container, flush with trigger */
.search-results-filter-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 0;
  background: #fff;
  border: 1px solid #2a2a2a;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: none;
  z-index: 10;
  max-height: 240px;
  overflow-y: auto;
}

.search-results-filter-dropdown-item {
  padding: 0.75rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  text-transform: uppercase;
  cursor: pointer;
  color: var(--longos-dark-gray, #2a2a2a);
  text-align: left;
  border-bottom: none;
}

.search-results-filter-dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.search-results-filter-dropdown-item.active {
  background: #e9e9e9;
  font-weight: 400;
}

/* Mobile: remove white card from filter bar; stack filters and count */
@media (max-width: 767px) {

  .search-results-filter-row-sticky,
  .search-results-filter-row-sticky.is-fixed {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    border-top: none;
  }

  .search-results-filter-row-sticky {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
  }

  .search-results-filter-bar-inner,
  .search-results-filter-row-sticky.is-fixed .search-results-filter-bar-inner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem;
  }

  .search-results-filter-bar-inner .search-results-filters-cell {
    grid-column: 1;
    grid-row: 1;
  }

  .search-results-filter-bar-inner .search-results-count {
    grid-column: 1;
    grid-row: 2;
    text-align: center;
  }

  /* Slightly larger dropdown and font on mobile */
  .search-results-filter-dropdown-trigger {
    font-size: 1.125rem;
    padding: 0.75rem 0.875rem;
  }

  .search-results-filter-dropdown-item {
    font-size: 1.125rem;
    padding: 0.875rem 0.875rem;
  }
}

.search-results-count {
  font-style: italic;
}

.search-results-page .card .ratio img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-results-empty-message .text-danger {
  font-weight: 600;
}

.search-results-title {
  color: var(--longos-dark-gray);
  font-size: 4rem;
}

@media (max-width: 767px) {
  .search-results-title {
    font-size: 3em;
  }
}

.search-results-section-title {
  color: var(--longos-dark-gray);
  font-size: 2rem;
}

/* Mobile only: extra horizontal padding on each category section so cards don’t sit flush to the sides */
@media (max-width: 767px) {
  .search-results-page .search-results-section {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Header: grapes/fig image above (right-aligned), search results title centered below */
.search-results-header-row {
  width: 100%;
}

.search-results-header-img-wrap {
  width: 100%;
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

.search-results-header-img {
  flex-shrink: 0;
  max-height: 80px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 575px) {
  .search-results-header-img {
    max-height: 56px;
  }
}

.search-results-page .search-highlight {
  background: rgba(200, 180, 160, 0.35);
  font-weight: 600;
  padding: 0 0.1em;
}

/* Product cards: on mobile, center the product image in its container */
@media (max-width: 767px) {

  #searchResultsProductsSection .catering-product>.col-4.bg-white,
  #searchResultsProductsSection .catering-product>div:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 120px;
  }

  #searchResultsProductsSection .product-card .product-image,
  #searchResultsProductsSection .product-card a.product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 100%;
    padding: 0.5rem;
    text-align: center;
    margin: 0;
    top: 0;
  }

  #searchResultsProductsSection .product-card .product-image img,
  #searchResultsProductsSection .product-card a.product-image img {
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 140px !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 1200px) {

  #searchResultsProductsSection .product-card .product-image,
  #searchResultsProductsSection .product-card a.product-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 100%;
    padding: 0.5rem;
    text-align: center;
    margin: 0;
    top: 0;
  }
}

/* Recipe cards: match Recipes page (pl10) – image rounded, title bold, Total Time, View Recipe underlined */
.search-results-recipes-grid {
  row-gap: 2.5rem;
}

.search-results-recipe-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.search-results-recipe-img-link {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(117, 117, 117, 0.33);
}

.search-results-recipe-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  vertical-align: middle;
}

.search-results-recipe-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.search-results-recipe-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--longos-dark-gray, #2a2a2a);
  line-height: 1.3;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.search-results-recipe-title a:hover {
  color: var(--longos-dark-gray, #2a2a2a);
  text-decoration: underline;
}

.search-results-recipe-time {
  font-size: 1.4rem;
  color: var(--longos-dark-gray, #2a2a2a);
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.search-results-recipe-view-link {
  color: var(--longos-dark-gray, #2a2a2a);
  text-decoration: underline;
  font-size: 1.4rem;
  margin-top: auto;
}

.search-results-recipe-view-link:hover {
  color: #2a2a2a;
  text-decoration: underline;
}

/* Cooking class card: price (dollars + superscript cents) and Book Class button on one row */
.search-results-class-footer {
  min-height: 2.5rem;
}

.search-results-class-price-wrap {
  flex: 0 0 auto;
}

.search-results-class-price {
  font-weight: 700;
  color: var(--longos-dark-gray, #2a2a2a);
  font-size: 1.25rem;
}

.search-results-class-price-cents {
  font-size: 0.75em;
  font-weight: 600;
  vertical-align: super;
  line-height: 0;
}

.search-results-class-book-btn {
  flex-shrink: 0;
}

/* Cooking class cards: match CookingClasses page (same text/price sizes). Override fixed dimensions for responsive grid. */
#searchResultsClassesSection .custom-cards-wrapper {
  margin: 0;
  width: 100%;
}

#searchResultsClassesSection .custom-card {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

#searchResultsClassesSection .custom-card-image-wrapper {
  width: 100%;
  height: 0;
  padding-bottom: 82.65%;
  /* 342/414 ≈ 4x3-ish */
  position: relative;
  overflow: hidden;
  background-color: #000;
  border-radius: 8px 8px 0 0;
}

#searchResultsClassesSection .custom-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#searchResultsClassesSection .custom-card-body {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Title: match ClassCardComponent .custom-title (2.6rem, font-weight 900) */
#searchResultsClassesSection .custom-card-title.custom-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 52px;
  font-size: 1.8rem;
}

/* Subtitle: match ClassCardComponent .custom-subtitle */
#searchResultsClassesSection .custom-subtitle {
  color: var(--longos-dark-gray);
  font-size: 1.5rem;
  font-family: var(--font-text);
  font-style: italic;
  font-weight: 600;
  word-wrap: break-word;
}

#searchResultsClassesSection .custom-price {
  margin-bottom: 0;
}

/* Price: match ClassCardComponent .custom-price-main (3.2rem) */
#searchResultsClassesSection .custom-price-main {
  color: #2A2A2A;
  font-size: 3.2rem;
  font-family: "Neutraface 2 Display", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  word-wrap: break-word
}

/* Price + button row: match ClassCardComponent layout */
#searchResultsClassesSection .custom-card-body .row {
  margin-top: auto;
  padding-top: 0.75rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

#searchResultsClassesSection .custom-card-body .row .col-sm:last-child {
  display: flex;
  justify-content: flex-end;
}

#searchResultsClassesSection .custom-book-button {
  padding: 10px 24px;
  width: 160px;
  height: 42px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1.5px;
}