/* ==========================================================================
   itDealSg — Header (Nov 2026 design): search panel, mobile menu, bottom bar.
   Loaded on every page after mega-cart.css.
   ========================================================================== */

/* ---------- Search box ---------- */
.itd-header .itd-search:focus-within { border-color: var(--itd-red); background: #fff; box-shadow: 0 0 0 3px rgba(217,11,28,.08); }
.itd-header .itd-search__clear:not([hidden]) { width: 24px; height: 24px; border-radius: 50% !important; background: #E6E8EE !important; color: var(--itd-ink-2) !important; font-size: 16px !important; padding: 0 !important; align-items: center; justify-content: center; flex: 0 0 auto; }

/* Page dims behind the open desktop panel (header stays bright). */
html.itd-suggest-open body::after { content: ""; position: fixed; inset: 0; background: rgba(11,13,18,.45); z-index: 45; pointer-events: none; }
html.itd-suggest-open .itd-rednav::after { content: ""; position: absolute; inset: 0; background: rgba(11,13,18,.45); pointer-events: none; z-index: 3; }

/* ---------- Search panel ---------- */
.itd-search__suggest.itd-sp-box { padding: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--itd-line); box-shadow: 0 24px 60px rgba(11,13,18,.22); }
.itd-sp { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr); }
.itd-sp__label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--itd-muted); }
.itd-sp__sugs { border-right: 1px solid var(--itd-line); padding: 14px 0 0; display: flex; flex-direction: column; min-width: 0; }
.itd-sp__sugs > .itd-sp__label { padding: 0 16px 8px; }
.itd-sp__list { list-style: none; margin: 0; padding: 0; }
.itd-sp__row { display: flex; align-items: center; }
.itd-body .itd-search__suggest a.itd-sp__sug { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 0; font-size: 14px; color: var(--itd-ink); min-width: 0; }
.itd-body .itd-search__suggest a.itd-sp__sug:hover, .itd-body .itd-search__suggest a.itd-sp__sug.is-active { background: var(--itd-soft); box-shadow: inset 3px 0 0 var(--itd-red); color: var(--itd-ink); }
.itd-sp__ico { flex: 0 0 auto; color: var(--itd-faint); display: inline-flex; }
.itd-sp__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.itd-sp__text b { font-weight: 700; }
.itd-sp__text em { font-style: italic; color: var(--itd-muted); font-size: 13px; }
.itd-sp__fill { display: none; }
.itd-sp__hint { margin: auto 0 0; padding: 10px 16px; border-top: 1px solid var(--itd-line); font-size: 11.5px; color: var(--itd-faint); }

.itd-sp__prods { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.itd-sp__phead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.itd-sp__trust { font-size: 12px; color: var(--itd-muted); }
.itd-body .itd-search__suggest a.itd-sp__prod { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px; margin: 0 -8px; border-radius: 10px; color: var(--itd-ink); }
.itd-body .itd-search__suggest a.itd-sp__prod:hover, .itd-body .itd-search__suggest a.itd-sp__prod.is-active { background: var(--itd-soft); }
.itd-sp__pic { position: relative; width: 52px; height: 44px; border-radius: 10px; background: var(--itd-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.itd-sp__pic > svg { width: 86%; height: auto; }
.itd-search__suggest .itd-sp__pic > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4px; border-radius: 10px; background: var(--itd-soft); mix-blend-mode: multiply; }
.itd-sp__info { display: flex; flex-direction: column; min-width: 0; }
.itd-sp__info strong { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itd-sp__spec { font-size: 12px; color: var(--itd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itd-sp__eta { font-size: 12px; color: var(--itd-green); font-weight: 600; }
.itd-sp__price { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.itd-sp__price b { font-family: var(--itd-mono); font-size: 15px; font-weight: 600; }
.itd-sp__off { background: var(--itd-red); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; }
.itd-body .itd-search__suggest a.itd-sp__all { display: flex; justify-content: center; align-items: center; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--itd-line-2); border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--itd-ink); }
.itd-body .itd-search__suggest a.itd-sp__all:hover, .itd-body .itd-search__suggest a.itd-sp__all.is-active { border-color: var(--itd-ink); background: #fff; }
.itd-sp__empty { margin: 6px 0; font-size: 13px; color: var(--itd-muted); }
.itd-sp__note { margin: 0; padding: 14px 16px 24px; text-align: center; font-size: 12px; color: var(--itd-muted); }

/* ---------- Phones ---------- */
@media (max-width: 767px) {
  /* Search lives in the bottom bar; the header keeps ☰, logo and account. */
  html:not(.itd-search-is-open):not(.itd-search-reveal) body:not(.single-product) .itd-header .itd-search { display: none; }
  body:not(.single-product) .itd-header .itd-iconbtn--cart { display: none; }

  /* Full-screen search view */
  .itd-search-is-open .itd-search__suggest.itd-sp-box { border: 0; border-radius: 0; box-shadow: none; overflow: visible; padding: 0; margin: 0 -12px; flex-basis: calc(100% + 24px); }
  .itd-sp { grid-template-columns: 1fr; }
  .itd-sp__sugs { border-right: 0; padding-top: 4px; border-bottom: 8px solid var(--itd-soft); }
  .itd-sp__sugs > .itd-sp__label, .itd-sp__hint { display: none; }
  .itd-sp__row { border-bottom: 1px solid var(--itd-line); }
  .itd-sp__row:last-child { border-bottom: 0; }
  .itd-body .itd-search__suggest a.itd-sp__sug { padding: 14px 4px 14px 16px; font-size: 15px; }
  .itd-body .itd-search__suggest a.itd-sp__sug:hover, .itd-body .itd-search__suggest a.itd-sp__sug.is-active { box-shadow: none; }
  .itd-sp__fill { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border: 0; background: none !important; color: var(--itd-faint) !important; padding: 0 !important; }
  .itd-sp__prods { padding: 16px 16px 4px; gap: 6px; }
  .itd-sp__trust { display: none; }
  .itd-body .itd-search__suggest a.itd-sp__prod { grid-template-columns: 56px minmax(0, 1fr) auto; margin: 0; padding: 6px 0; }
  .itd-sp__pic { width: 56px; height: 56px; }
  .itd-sp__info strong { font-size: 15px; white-space: normal; }
  .itd-body .itd-search__suggest a.itd-sp__all { padding: 13px; font-size: 14px; margin-top: 10px; border-radius: 12px; }
  .itd-search-is-open .itd-search__clear:not([hidden]) { width: 26px; height: 26px; right: 84px; top: 23px; }

  /* Bottom bar: Search in the middle */
  .itd-tabbar .itd-tabbar__search .itd-ico { color: var(--itd-ink); }
}

/* ---------- Mobile menu ---------- */
.itd-mmenu__panel { width: min(380px, 88%); }
.itd-mmenu__head { border-bottom: 0; padding: 14px 16px 6px; }
.itd-mmenu__list.itd-mm { padding: 6px 0 20px; }
.itd-body a.itd-mm__account { display: flex; align-items: center; gap: 12px; margin: 6px 16px 8px; padding: 12px 14px; border-radius: 12px; background: var(--itd-soft); color: var(--itd-ink); font-size: 14px; justify-content: flex-start; width: auto; }
.itd-mm__account > span { display: flex; flex-direction: column; min-width: 0; }
.itd-mm__account strong { font-size: 14px; font-weight: 700; }
.itd-mm__account small { font-size: 12px; color: var(--itd-muted); }
.itd-mm__sec ul { list-style: none; margin: 0; padding: 0; }
.itd-mm__head { margin: 0; padding: 18px 18px 6px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--itd-muted); }
.itd-mmenu__list.itd-mm .itd-mm__row { display: flex; align-items: center; justify-content: flex-start; gap: 12px; width: 100%; padding: 12px 18px; border: 0; border-bottom: 1px solid var(--itd-line); background: none; font: 500 15px var(--itd-font); color: var(--itd-ink); text-align: left; }
.itd-mmenu__list.itd-mm .itd-mm__row.has-ico { padding-top: 8px; padding-bottom: 8px; }
.itd-mm__label { flex: 1 1 auto; min-width: 0; }
.itd-mm__chev { flex: 0 0 auto; color: #9AA0AC; }
.itd-mm__ico { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 8px; background: var(--itd-soft); display: inline-flex; align-items: center; justify-content: center; }
.itd-mm__ico > svg { width: 28px; height: auto; }
.itd-mm__contact { margin: 0; padding: 16px 18px 8px; font-size: 12px; color: var(--itd-muted); }
.itd-body .itd-mm__contact a { color: var(--itd-ink); font-weight: 700; }
.itd-mmenu__list.itd-mm .itd-mm__back { justify-content: flex-start; padding: 10px 18px; font-size: 14px; }
.itd-mm__subtitle { margin: 0; padding: 6px 18px 10px; font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.itd-mmenu__list.itd-mm .itd-mm__all { font-weight: 700; color: var(--itd-red-dark); }
.itd-header .itd-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.itd-mm ul { list-style: none; margin: 0; padding: 0; }

/* ---------- Top bar: one fixed line (design) ---------- */
.itd-topbar--static .itd-topbar__inner { justify-content: space-between; }
.itd-topbar__static { display: flex; align-items: center; min-width: 0; font-size: 13px; color: #fff; }
.itd-topbar__desk { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.itd-topbar__desk .itd-ico { color: var(--itd-red-light); flex: 0 0 auto; }
.itd-topbar__mob { display: none; }
.itd-topbar--static .itd-topbar__links { gap: 22px; }
@media (max-width: 767px) {
  .itd-topbar--static .itd-topbar__inner { justify-content: center; }
  .itd-topbar--static .itd-topbar__desk { display: none; }
  .itd-topbar--static .itd-topbar__mob { display: inline; font-weight: 600; font-size: 13px; }
}

/* ---------- Header icons: the compare icon shows only once something is ticked ---------- */
.itd-header .itd-actions .itd-iconbtn:has([data-itd-compare-count][data-count="0"]) { display: none; }

/* ---------- Footer (design) ---------- */
.itd-footer__help { display: none; }
.itd-footer__note { margin-left: auto; }
@media (max-width: 767px) {
  .itd-footer__help { display: block; flex-basis: 100%; }
  .itd-body .itd-footer__help a { color: var(--itd-muted); }
  .itd-footer__legal { flex-direction: column; gap: 4px; }
  .itd-footer__note { margin-left: 0; }
  /* Phones: brand blurb, button and socials and the Services column are left out (design). */
  .itd-footer__brand .itd-footer__about, .itd-footer__brand .itd-footer__wa, .itd-footer__brand .itd-social, .itd-footer__col:nth-child(3) { display: none; }
}
@media (max-width: 767px) {
  .itd-footer .itd-pay > span:first-child { display: none; }
}
