/* Shared navbar search; all component rules remain isolated from product forms. */
.ipm-site-header--search .ipm-site-header__inner { position: relative; gap: 18px; }
.ipm-site-header--search .ipm-header-actions { gap: 8px; }
.ipm-site-header--search .ipm-header-actions > .ip-btn--outline { display: none; }
.ipm-site-header--search .ipm-nav__list { gap: clamp(10px, 1.2vw, 22px); }
.ipm-site-header--search .ipm-nav__list > li > a { white-space: nowrap; font-size: 13px; }
.ipm-header-search { flex: 0 0 auto; color: var(--black); font-family: var(--ip-font-body); }
.ipm-header-search [hidden] { display: none !important; }
.ipm-header-search button, .ipm-header-search input { font-family: inherit; }
.ipm-header-search svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ipm-header-search__toggle, .ipm-header-search__close, .ipm-header-search__fallback { display: none; }
.ipm-header-search__surface { position: relative; width: clamp(200px, 16vw, 260px); }
.ipm-header-search__form { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 6px 0 12px; margin: 0; border: 1px solid var(--light-silver); border-radius: var(--ip-radius-button, 9px); background: var(--white); }
.ipm-header-search__form:focus-within { border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(0, 196, 248, .12); }
.ipm-header-search__glass { display: flex; color: var(--secondary); }
.ipm-header-search__form input { display: block; width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 0; border: 0; outline: 0; box-shadow: none; background: transparent; color: var(--black); font-size: 14px; line-height: 1.4; }
.ipm-header-search__form input::placeholder { color: var(--gray); opacity: 1; }
.ipm-header-search__form input::-webkit-search-cancel-button { display: none; }
.ipm-header-search__form button { flex: 0 0 32px; display: grid; place-items: center; width: 32px; height: 36px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--secondary); cursor: pointer; }
.ipm-header-search__form .ipm-header-search__close { display: none; }
.ipm-header-search__form button:hover { background: rgba(0, 196, 248, .08); }
.ipm-header-search__panel { position: absolute; z-index: 100; top: calc(100% + 12px); right: 0; width: min(490px, calc(100vw - 32px)); max-height: min(680px, var(--ipm-search-available, 70vh)); overflow-y: auto; overscroll-behavior: contain; padding: 16px; border: 1px solid var(--light-silver); border-radius: var(--ip-radius-card, 16px); background: var(--white); box-shadow: 0 18px 50px rgba(0, 0, 0, .12); }
.ipm-header-search__heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 8px; }
.ipm-header-search__heading strong { color: var(--secondary); font-size: 14px; font-weight: 800; }
.ipm-header-search__heading > span { color: var(--gray); font-size: 11px; padding: 2px 6px; border: 1px solid var(--light-silver); border-radius: 4px; }
.ipm-header-search__status { margin: 8px 0; color: var(--gray); font-size: 13px; line-height: 1.55; }
.ipm-header-search__status.is-results { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ipm-header-search__results { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.ipm-header-search__results > li { margin: 0; padding: 0; list-style: none; }
.ipm-search-result { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid transparent; border-radius: 10px; color: var(--black); text-decoration: none; transition: background-color .15s, border-color .15s; }
.ipm-search-result:hover, .ipm-search-result[aria-selected="true"] { background: rgba(0, 196, 248, .045); border-color: var(--light-silver); color: var(--black); }
.ipm-search-result > img { flex: 0 0 64px; width: 64px; height: 72px; object-fit: contain; border-radius: 6px; background: var(--white); }
.ipm-search-result__body { flex: 1; min-width: 0; }
.ipm-search-result__title { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14px; font-weight: 800; line-height: 1.4; }
.ipm-search-result__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; margin-top: 5px; color: var(--gray); font-size: 11px; line-height: 1.5; }
.ipm-search-result__condition { padding: 2px 7px; border-radius: 5px; color: var(--secondary); background: rgba(51, 8, 103, .06); font-weight: 700; }
.ipm-search-result__condition.is-refurbished { color: #075d3b; background: rgba(8, 116, 67, .08); }
.ipm-search-result__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 8px; margin-top: 6px; color: var(--black); font: 700 16px/1.35 var(--ip-font-round); }
.ipm-search-result__price :is(.amount, ins, bdi) { color: inherit; font: inherit; }
.ipm-search-result__price .amount { white-space: nowrap; }
.ipm-search-result__price ins { text-decoration: none; }
.ipm-search-result__price del { color: var(--gray); font-size: 11px; font-weight: 400; }
.ipm-search-result__price .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ipm-header-search__all { position: sticky; bottom: -16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; margin-top: 12px; padding: 10px 16px; border-radius: var(--ip-radius-button, 9px); color: var(--white); background: linear-gradient(90deg, var(--secondary) 0%, var(--primary) 50%, var(--secondary) 100%); background-size: 220% 100%; background-position: 0% 50%; font-size: 14px; font-weight: 800; text-decoration: none; transition: background-position .4s ease; }
.ipm-header-search__all:hover { color: var(--white); background-position: 100% 50%; }
.ipm-header-search :is(a, button):focus-visible { outline: 2px solid var(--secondary); outline-offset: 3px; }
.ipm-header-search__panel[aria-busy="true"] .ipm-header-search__heading::after { content: ''; width: 14px; height: 14px; border: 2px solid var(--light-silver); border-top-color: var(--secondary); border-radius: 50%; animation: ipm-search-spin .8s linear infinite; }
@keyframes ipm-search-spin { to { transform: rotate(360deg); } }
@media (max-width: 1359px) {
  .ipm-site-header--search .ipm-site-header__inner { gap: 12px; }
  .ipm-site-header--search .ipm-nav__list { gap: 10px; }
  .ipm-header-search__surface { display: none; position: absolute; top: calc(100% + 10px); right: 12px; width: min(520px, calc(100% - 24px)); padding: 12px; border: 1px solid var(--light-silver); border-radius: var(--ip-radius-card, 16px); background: var(--white); box-shadow: 0 18px 50px rgba(0, 0, 0, .12); }
  .ipm-header-search.is-open .ipm-header-search__surface { display: block; }
  .ipm-header-search[data-ready] .ipm-header-search__toggle, .ipm-header-search__fallback { display: grid; place-items: center; width: 42px; height: 42px; padding: 8px; border: 0; border-radius: var(--ip-radius-button, 9px); color: var(--secondary); background: transparent; cursor: pointer; }
  .ipm-header-search__toggle:hover, .ipm-header-search.is-open .ipm-header-search__toggle { background: rgba(0, 196, 248, .08); }
  .ipm-header-search__panel { position: static; width: 100%; max-height: calc(var(--ipm-search-available, 65vh) - 70px); padding: 14px 0 0; border: 0; border-radius: 0; box-shadow: none; }
  .ipm-header-search__form input { font-size: 16px; }
  .ipm-header-search__form .ipm-header-search__close { display: grid; }
  .ipm-header-search__all { bottom: 0; }
}
@media (min-width: 1021px) and (max-width: 1180px) {
  .ipm-site-header--search .ipm-header-actions > .ip-btn--primary { min-width: 0; padding-inline: 12px; font-size: 13px; }
  .ipm-site-header--search .ipm-nav__list > li > a { font-size: 12px; }
  .ipm-site-header--search .ipm-language-switcher summary { min-width: 60px; padding-inline: 7px; }
  .ipm-site-header--search .ipm-language-switcher__globe { display: none; }
}
@media (max-width: 620px) {
  .ipm-site-header--search .ipm-site-header__inner { width: 100%; padding-inline: max(12px, env(safe-area-inset-left)); gap: 8px; }
  .ipm-site-header--search .ipm-header-actions { gap: 4px; }
  .ipm-site-header--search .ipm-language-switcher summary { min-width: 48px; padding-inline: 6px; }
  .ipm-site-header--search .ipm-language-switcher__globe { display: none; }
  .ipm-header-search__surface { right: 0; width: 100%; }
  .ipm-search-result { padding: 8px 3px; gap: 10px; }
  .ipm-search-result > img { width: 56px; flex-basis: 56px; height: 64px; }
  .ipm-search-result__title { font-size: 13px; }
  .ipm-search-result__price { font-size: 15px; }
  .ipm-header-search__form button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .ipm-header-search__all, .ipm-search-result { transition: none; }
  .ipm-header-search__panel[aria-busy="true"] .ipm-header-search__heading::after { animation: none; }
}

/* The same product search becomes the first, full-width drawer control on mobile. */
@media (max-width: 1020px) {
  .ipm-mobile-drawer-tools > .ipm-header-search {
    flex: 0 0 auto;
    order: -1;
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ip-border);
    background: var(--white);
  }

  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__toggle,
  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__fallback {
    display: none;
  }

  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__surface {
    position: static;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__form {
    min-height: 52px;
    padding-left: 14px;
    border-color: var(--ip-border);
  }

  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__panel {
    position: static;
    width: 100%;
    max-height: none;
    padding: 14px 0 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__heading > span {
    display: none;
  }

  .ipm-mobile-drawer-tools > .ipm-header-search .ipm-header-search__all {
    position: static;
    bottom: auto;
  }
}
