/* Search page (Search design)
   Loaded on the search page after components.css and shop.css (product
   cards, ul.products grid). Templates: template-search.php, search.php,
   template-parts/search-page.php. Logic: inc/search.php, assets/js/search.js.
--------------------------------------------- */

.bluthe_search {
  font-family: var(--bl-font);
  color: var(--bl-navy);
  padding-bottom: clamp(64px, 8vw, 104px);
}

/* Heading + pill field
--------------------------------------------- */
.bluthe_search__hero {
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 96px) 0 0;
  text-align: center;
}
.bluthe_search__title {
  margin: 0;
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.15;
}
.bluthe_search__form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: clamp(22px, 3vw, 34px);
  padding: 14px 24px;
  border: 1px solid rgba(22, 40, 63, 0.22);
  border-radius: 999px;
  background: var(--bl-cream);
  color: var(--bl-text-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.bluthe_search__form:focus-within {
  border-color: var(--bl-navy);
  box-shadow: 0 6px 18px rgba(22, 40, 63, 0.08);
}
.bluthe_search__form svg {
  flex: 0 0 auto;
}
.bluthe_search__input {
  flex: 1;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: var(--bl-font);
  font-size: 16px;
  font-weight: 300;
  color: var(--bl-navy);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.bluthe_search__input::-webkit-search-cancel-button,
.bluthe_search__input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.bluthe_search__input::placeholder {
  color: rgba(22, 40, 63, 0.45);
}
.bluthe_search__clear {
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  font-family: var(--bl-font);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-navy);
  cursor: pointer;
}
.bluthe_search__clear:hover {
  background: transparent;
  color: var(--bl-accent);
  transform: none;
  box-shadow: none;
}
.bluthe_search__clear[hidden] {
  display: none;
}

/* Results
--------------------------------------------- */
.bluthe_search__body {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: clamp(44px, 6vw, 82px);
}
.bluthe_search__results[hidden],
.bluthe_search__grid[hidden],
.bluthe_search__empty[hidden] {
  display: none;
}
.bluthe_search__results {
  margin-bottom: clamp(44px, 6vw, 82px);
}
.bluthe_search__count {
  margin: 0 0 22px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bl-text-soft);
}
.bluthe_search__empty ~ .bluthe_search__count,
.bluthe_search__empty:not([hidden]) + .bluthe_search__count {
  display: none;
}
.bluthe_search.is-searching .bluthe_search__grid {
  opacity: 0.55;
  transition: opacity 0.18s ease;
}
/* The grid is WooCommerce's ul.products (components.css): the product
   card, badges and add-to-bag come from there. */
.bluthe_search__grid {
  margin: 0;
}
.bluthe_search__empty {
  max-width: 620px;
  border: 1px solid #E4DCD2;
  border-radius: 16px;
  padding: clamp(26px, 4vw, 48px);
}
.bluthe_search__empty_title {
  margin: 0 0 12px;
  font-family: var(--bl-font);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.2;
}
.bluthe_search__empty_text {
  margin: 0 0 24px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.7;
  color: var(--bl-text-soft);
}
.bluthe_search__empty_actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* "Shop by" sections
--------------------------------------------- */
.bluthe_search__sections {
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 68px);
}
.bluthe_search__section .bluthe_section_head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bl-line);
  margin-bottom: clamp(22px, 2.8vw, 34px);
  flex-wrap: nowrap;
}
.bluthe_search__section_title {
  margin: 0;
  font-family: var(--bl-font);
  font-weight: 400;
  font-size: clamp(19px, 2vw, 24px);
  letter-spacing: 0.01em;
}
.bluthe_search__section .bluthe_textlink {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--bl-text-soft);
}

/* Image tiles (occasions: 3 across, 3:2; flowers: 6 across, square) */
.bluthe_search__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 22px);
}
.bluthe_search__section--squares .bluthe_search__tiles {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(10px, 1.4vw, 18px);
}
.bluthe_search__tile {
  display: block;
  color: var(--bl-navy);
  text-decoration: none;
}
.bluthe_search__tile:hover {
  color: var(--bl-accent);
}
.bluthe_search__tile_media {
  display: block;
  position: relative;
  aspect-ratio: 3 / 2;
  border-radius: 18px;
  overflow: hidden;
  background: var(--bl-panel);
}
.bluthe_search__section--squares .bluthe_search__tile_media {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
}
.bluthe_search__tile_media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.bluthe_search__tile:hover .bluthe_search__tile_media img {
  transform: scale(1.03);
}
.bluthe_search__tile_label {
  display: block;
  margin-top: 12px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.bluthe_search__section--squares .bluthe_search__tile_label {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.16em;
  line-height: 1.4;
}

/* Rows of pills (colours, brands) */
.bluthe_search__row {
  display: flex;
  gap: clamp(18px, 3vw, 40px);
  flex-wrap: wrap;
  align-items: center;
}
.bluthe_search__pill {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--bl-navy);
  text-decoration: none;
}
.bluthe_search__pill:hover {
  color: var(--bl-accent);
}
.bluthe_search__pill_label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bluthe_search__swatch {
  display: block;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(22, 40, 63, 0.12);
}
.bluthe_search__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bl-panel);
  border: 1px solid rgba(22, 40, 63, 0.12);
}
.bluthe_search__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bluthe_search__logo_letter,
.bluthe_search__logo--all {
  font-size: 13px;
  color: var(--bl-navy);
}

/* Phones
--------------------------------------------- */
@media (max-width: 767px) {
  .bluthe_search__form {
    padding: 12px 18px;
  }
  .bluthe_search__tiles,
  .bluthe_search__section--squares .bluthe_search__tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bluthe_search__section--squares .bluthe_search__tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .bluthe_search__row {
    gap: 16px 22px;
  }
}
