/* =============================================================================
   Site search — live dropdown + results page
   Palette: white / light grey / black accent. No build step (served directly).
   ========================================================================== */

/* ---------- Menu (sidebar) search box: centre the icon, room for text ----------
   Overrides critical.css `.search-sidebar button{position:absolute;right:5px;top:3px}`
   which pinned the icon to the top-right instead of vertically centring it. */
.search-sidebar .form-group { position: relative; }
.search-sidebar .form-group input[name="q"] { padding-right: 42px; }
.search-sidebar .form-group button {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 34px; height: 34px; padding: 0; margin: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: #6b7280; cursor: pointer; line-height: 1;
}
.search-sidebar .form-group button:hover { color: #111; }

/* ---------- Live instant-search dropdown ---------- */
.ss-ac { position: relative; }
.ss-ac-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 1200;
  background: #fff;
  border: 1px solid #e6e8ec;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
  overflow: hidden;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  display: none;
}
.ss-ac.is-open .ss-ac-panel { display: block; }

.ss-ac-state {
  padding: 16px 18px;
  font-size: 13px;
  color: #6b7280;
}
.ss-ac-group + .ss-ac-group { border-top: 1px solid #f1f2f4; }
.ss-ac-group__title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9aa1ab;
  padding: 12px 18px 4px;
}
.ss-ac-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px;
  text-decoration: none;
  color: #111;
  cursor: pointer;
}
.ss-ac-item:hover,
.ss-ac-item.is-active { background: #f5f6f8; text-decoration: none; color: #111; }
.ss-ac-item__img {
  width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 9px; object-fit: cover;
  background: #f1f2f4; border: 1px solid #eef0f3;
}
.ss-ac-item__body { min-width: 0; flex: 1; }
.ss-ac-item__title {
  font-size: 13.5px; font-weight: 600; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ss-ac-item__title b { font-weight: 800; }
.ss-ac-item__price { font-size: 12px; color: #6b7280; margin-top: 1px; }
.ss-ac-foot {
  display: block;
  padding: 13px 18px;
  font-size: 13px; font-weight: 800; color: #fff;
  background: #111; text-align: center; text-decoration: none;
}
.ss-ac-foot:hover { background: #000; color: #fff; text-decoration: none; }

/* ---------- Results page ---------- */
.ss-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 16px 60px; }

.ss-head { margin-bottom: 22px; }
.ss-head__title { font-size: 26px; font-weight: 800; color: #111; margin: 0 0 4px; line-height: 1.2; }
.ss-head__sub { font-size: 14px; color: #6b7280; margin: 0 0 16px; }
.ss-head__sub strong { color: #111; }

.ss-refine { display: flex; gap: 10px; max-width: 560px; }
.ss-refine input {
  flex: 1; height: 46px; border: 1.5px solid #e2e8f0; border-radius: 12px;
  padding: 0 16px; font-size: 15px; outline: none;
}
.ss-refine input:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(17,17,17,.08); }
.ss-refine button {
  height: 46px; padding: 0 22px; border: none; border-radius: 12px;
  background: #111; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer;
}
.ss-refine button:hover { background: #000; }

.ss-secnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; position: sticky; top: 64px; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: blur(6px); padding: 8px 0; }
.ss-secnav a {
  font-size: 13px; font-weight: 700; color: #475569; text-decoration: none;
  border: 1px solid #e2e8f0; background: #fff; border-radius: 999px; padding: 7px 14px;
}
.ss-secnav a:hover { border-color: #111; color: #111; text-decoration: none; }
.ss-secnav a .c { color: #9aa1ab; font-weight: 800; margin-left: 4px; }

.ss-section { padding-top: 18px; scroll-margin-top: 80px; }
.ss-section__title { font-size: 18px; font-weight: 800; color: #111; margin: 0 0 14px; }

.ss-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .ss-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 620px) { .ss-grid { grid-template-columns: repeat(2, 1fr); } }

.ss-card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid #eef0f3; border-radius: 14px; overflow: hidden;
  text-decoration: none; color: #111; transition: box-shadow .15s, transform .15s;
}
.ss-card:hover { box-shadow: 0 10px 28px rgba(15,23,42,.10); transform: translateY(-2px); text-decoration: none; color: #111; }
.ss-card__imgwrap { position: relative; aspect-ratio: 1 / 1; background: #f6f7f9; }
.ss-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ss-card__tag {
  position: absolute; top: 8px; left: 8px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .03em;
  background: rgba(17,17,17,.86); color: #fff; padding: 3px 8px; border-radius: 999px;
}
.ss-card__body { padding: 12px 13px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ss-card__title { font-size: 13.5px; font-weight: 700; line-height: 1.35; color: #111; }
.ss-card__title b { font-weight: 900; }
.ss-card__price { font-size: 13px; color: #111; margin-top: auto; }
.ss-card__price .was { color: #9aa1ab; text-decoration: line-through; font-size: 12px; margin-right: 5px; }
.ss-card__cta { font-size: 12px; font-weight: 800; color: #111; margin-top: 6px; }

/* Help/pages list */
.ss-list { display: grid; gap: 10px; }
.ss-list a {
  display: block; background: #fff; border: 1px solid #eef0f3; border-radius: 12px;
  padding: 14px 16px; text-decoration: none; color: #111;
}
.ss-list a:hover { border-color: #111; text-decoration: none; }
.ss-list__title { font-size: 14.5px; font-weight: 700; }
.ss-list__title b { font-weight: 900; }
.ss-list__excerpt { font-size: 12.5px; color: #6b7280; margin-top: 3px; }

/* FAQ accordion */
.ss-faqs { display: grid; gap: 10px; }
.ss-faq { background: #fff; border: 1px solid #eef0f3; border-radius: 12px; overflow: hidden; }
.ss-faq__q { width: 100%; text-align: left; background: none; border: none; cursor: pointer;
  padding: 14px 16px; font-size: 14px; font-weight: 700; color: #111; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; line-height: 1.4; }
.ss-faq__qtext { flex: 1 1 auto; min-width: 0; }
.ss-faq__qtext b { font-weight: 900; }
.ss-faq__q .ico { flex: 0 0 auto; font-size: 18px; line-height: 1.3; transition: transform .2s; color: #9aa1ab; }
.ss-faq.is-open .ss-faq__q .ico { transform: rotate(45deg); }
.ss-faq__a { padding: 0 16px; max-height: 0; overflow: hidden; transition: max-height .25s ease, padding .25s ease; color: #475569; font-size: 13.5px; line-height: 1.6; }
.ss-faq.is-open .ss-faq__a { max-height: 600px; padding: 0 16px 16px; }

/* Empty state */
.ss-empty { text-align: center; padding: 50px 20px; }
.ss-empty__icon { font-size: 40px; color: #cbd5e1; margin-bottom: 14px; }
.ss-empty__title { font-size: 20px; font-weight: 800; color: #111; margin: 0 0 8px; }
.ss-empty__text { font-size: 14px; color: #6b7280; margin: 0 auto 22px; max-width: 460px; line-height: 1.6; }
.ss-empty__links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.ss-chip {
  font-size: 13px; font-weight: 700; text-decoration: none;
  border: 1px solid #e2e8f0; border-radius: 999px; padding: 8px 15px; color: #111; background: #fff;
}
.ss-chip:hover { background: #111; color: #fff; border-color: #111; text-decoration: none; }
.ss-chip--solid { background: #111; color: #fff; border-color: #111; }
.ss-chip--solid:hover { background: #000; color: #fff; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
  .ss-wrap { padding: 18px 12px 48px; }
  .ss-head__title { font-size: 21px; }
  .ss-head__sub { font-size: 13px; }

  /* Stack the refine search: full-width input then full-width button */
  .ss-refine { flex-wrap: wrap; }
  .ss-refine input { flex: 1 1 100%; height: 44px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
  .ss-refine button { flex: 1 1 100%; }

  /* Section nav scrolls sideways instead of wrapping into a tall block */
  .ss-secnav { top: 56px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 8px 0; }
  .ss-secnav::-webkit-scrollbar { display: none; }
  .ss-secnav a { white-space: nowrap; flex: 0 0 auto; }

  .ss-section__title { font-size: 16px; }
  .ss-grid { gap: 12px; }

  /* Dropdown: never wider than the viewport, comfy tap targets */
  .ss-ac-panel { max-height: min(64vh, 460px); }
  .ss-ac-item { padding: 11px 16px; }
  .ss-faq__q { font-size: 13.5px; }
}

@media (max-width: 380px) {
  .ss-grid { grid-template-columns: repeat(2, 1fr); }
  .ss-card__title { font-size: 12.5px; }
}
