/* See Sea header search.
   The markup is the theme's own header-search-bar plus the predictive-search
   section it injects. The theme styles both for a full-width header overlay, so
   none of that CSS is reused here: this lays them out as a compact dropdown. */

.ss-search { position: relative; display: inline-flex; align-items: center; }

.ss-search__toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; margin: 0; background: none; border: 0; color: inherit; cursor: pointer; }
.ss-search__toggle svg { width: 20px; height: 20px; }

/* ---- panel ---- */
.ss-search .header-search-bar {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline: auto 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  width: min(400px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  height: auto;
  margin: 0;
  overflow: hidden;
  color: #10323f;
  pointer-events: auto;
  opacity: 1;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(6, 34, 45, .22);
  transition: none;
}
.ss-search .header-search-bar.open { display: flex; }
.ss-search .header-search-bar__backdrop { position: fixed; inset: 0; z-index: -1; display: block; background: rgba(6, 34, 45, .38); }

/* ---- input row ---- */
.ss-search .header-search-bar__form { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; margin: 0; background: transparent; border: 0; border-block-end: 1px solid #e6ebee; }
.ss-search .header-search-bar__icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; padding: 0; color: #6c8794; background: none; border: 0; cursor: pointer; }
.ss-search .header-search-bar__icon svg { width: 18px; height: 18px; }
.ss-search .header-search-bar__form .field__input { flex: 1; min-width: 0; padding: 0; font-size: 15px; line-height: 1.4; color: inherit; background: transparent; border: 0; outline: 0; }
.ss-search .header-search-bar__form .field__input::placeholder { color: #90a6b0; }
.ss-search .header-search-bar__form .field__input::-webkit-search-cancel-button { display: none; }

/* ---- results ---- */
.ss-search .header-search-bar__results { display: none; flex: 1 1 auto; width: 100%; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ss-search .header-search-bar__results.shown { display: block; }
.ss-search .header-search-bar__results-loading { display: none; padding: 24px; text-align: center; }
.ss-search .header-search-bar__results.loading .header-search-bar__results-loading { display: block; }
.ss-search .header-search-bar__results-spinner { width: 22px; height: 22px; }
.ss-search .header-search-bar__results-list { display: block; width: 100%; }
.ss-search .header-search-bar__results-list:empty { display: none; }

/* The injected predictive-search markup arrives wrapped in .section, which
   carries a colour scheme. Strip it back to plain white. */
.ss-search .header-search-bar__results .section { padding: 0; margin: 0; background: transparent; color: inherit; }
.ss-search .predictive-search-section { padding: 0; }

.ss-search .predictive-search__title { padding: 14px 16px 6px; margin: 0; font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: .09em; text-transform: uppercase; color: #8aa0ab; }

.ss-search .predictive-search__results { display: block; padding: 0 0 4px; margin: 0; list-style: none; }
.ss-search .predictive-search__result-item { display: block; margin: 0; }
.ss-search .predictive-search__result-item > a { display: block; padding: 0; color: inherit; text-decoration: none; }
.ss-search .predictive-search__result-item > a:hover { background: #f4f8f9; }

.ss-search .predictive-search__product { display: flex; align-items: center; gap: 12px; padding: 9px 16px; }
.ss-search .predictive-search__product-image-wrap { position: relative; flex: 0 0 auto; width: 52px; height: 52px; overflow: hidden; background: #eef3f5; border-radius: 4px; }
.ss-search .predictive-search__product-image { width: 100%; height: 100%; object-fit: cover; }
/* Belt and braces: the template now only renders this when the saving is
   positive, but keep it out of a 52px thumbnail regardless. */
.ss-search .predictive-search__product-save-price { display: none; }

.ss-search .predictive-search__product-content { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ss-search .predictive-search__product-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 0; font-size: 14px; font-weight: 500; line-height: 1.35; color: #10323f; }
.ss-search .predictive-search__product-price { font-size: 13px; line-height: 1.2; color: #6c8794; }

/* ---- footer ---- */
.ss-search .predictive-search__footer { display: block; padding: 0; margin: 0; background: transparent; border-block-start: 1px solid #e6ebee; }
.ss-search .predictive-search__footer input { display: none; }
.ss-search .predictive-search__more { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 0; padding: 13px 16px; font-size: 14px; font-weight: 500; line-height: 1.2; color: #10323f; text-align: start; text-decoration: none; background: transparent; border: 0; cursor: pointer; }
.ss-search .predictive-search__more:hover { background: #f4f8f9; }
.ss-search .predictive-search__more svg { flex: 0 0 auto; width: 16px; height: 16px; }

body.header-search-bar--lockscreen { overflow: hidden; }

@media (max-width: 767px) {
  .ss-search .header-search-bar { position: fixed; inset-block-start: 0; inset-inline: 0; width: 100%; max-height: 100dvh; border-radius: 0; }
}
/* The injected predictive-search footer picks up a dark colour scheme from a
   theme stylesheet that also ships from the CDN, which left dark text on a navy
   block. Forcing it here is deliberate: the source rule cannot be overridden on
   specificity alone from this file. */
.ss-search .header-search-bar__results .predictive-search__footer {
  padding: 0 !important;
  margin: 0 !important;
  color: #10323f !important;
  background: #fff !important;
  border: 0 !important;
  border-block-start: 1px solid #e6ebee !important;
}
.ss-search .header-search-bar__results .predictive-search__more {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 0 !important;
  padding: 13px 16px !important;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  color: #10323f !important;
  text-align: start;
  background: transparent !important;
  border: 0 !important;
}
.ss-search .header-search-bar__results .predictive-search__more:hover { background: #f4f8f9 !important; }
.ss-search .header-search-bar__results .predictive-search__more svg { flex: 0 0 auto; width: 16px; height: 16px; }
/* The backdrop is a child of the bar in the theme's markup and sits at
   z-index:-1. Because the panel itself is positioned it forms a stacking
   context, so that -1 lands ABOVE the panel background and greys out the whole
   dropdown. Lifting the form and results onto their own layer fixes it. */
.ss-search .header-search-bar__form,
.ss-search .header-search-bar__results { position: relative; z-index: 1; background: #fff; }
