/**
 * Sintech header controls — pill search, circular avatar, compact cart badge.
 */

:root {
  --ift-header-brand: #c8102e;
  --ift-header-brand-dark: #8b0c21;
  --ift-header-ink: #1a1a1a;
  --ift-header-muted: #6b7280;
  --ift-header-line: #e5e7eb;
  --ift-header-wash: #f3f4f6;
  --ift-header-radius: 999px;
  --ift-header-control: 42px;
}

/* ---- Desktop search pill ---- */
#desktop-header .ift-search-widget,
#desktop-header .search-widget.ift-search-widget {
  width: 100%;
  max-width: 100%;
}

#desktop-header .ift-search-group {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  margin: 0;
  border: 1.5px solid var(--ift-header-line);
  border-radius: var(--ift-header-radius);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#desktop-header .ift-search-group:focus-within {
  border-color: var(--ift-header-brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

#desktop-header .ift-search-input.form-control,
#desktop-header .ift-search-input {
  flex: 1 1 auto;
  height: var(--ift-header-control);
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 0.25rem 0 1.15rem !important;
  font-size: 0.95rem;
  color: var(--ift-header-ink);
}

#desktop-header .ift-search-input::placeholder {
  color: var(--ift-header-muted);
  opacity: 1;
}

#desktop-header .ift-search-btn.search-btn,
#desktop-header .ift-search-btn {
  flex: 0 0 auto;
  width: 48px;
  min-width: 48px;
  height: var(--ift-header-control);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ift-header-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

#desktop-header .ift-search-btn:hover,
#desktop-header .ift-search-btn:focus {
  color: var(--ift-header-brand);
  background: rgba(200, 16, 46, 0.06);
  outline: none;
}

/* ---- Right action cluster ---- */
#desktop-header .col-header-right {
  flex: 0 0 auto;
  max-width: none;
  z-index: 2;
}

#desktop-header .col-header-center {
  min-width: 0;
}

#desktop-header .ift-header-actions {
  gap: 0.5rem;
  flex-wrap: nowrap;
}

#desktop-header .ift-header-user,
#desktop-header #ps-shoppingcart-wrapper {
  flex: 0 0 auto;
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}

/* ---- Circular avatar ---- */
#desktop-header .ift-avatar-btn.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--ift-header-control);
  height: var(--ift-header-control);
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: none;
  line-height: 1;
}

#desktop-header .ift-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ift-header-control);
  height: var(--ift-header-control);
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #d1d5db;
  color: var(--ift-header-ink);
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

#desktop-header .ift-avatar__initial {
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

#desktop-header .ift-avatar-btn:hover .ift-avatar,
#desktop-header .ift-avatar-btn:focus .ift-avatar {
  border-color: var(--ift-header-brand);
  background: rgba(200, 16, 46, 0.08);
  color: var(--ift-header-brand);
}

#desktop-header .ift-avatar-label,
#desktop-header .ift-avatar-btn .title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hide legacy fa-user icon if theme injects it outside our avatar */
#desktop-header .ift-avatar-btn > .fa.icon {
  display: none !important;
}

/* ---- Compact cart ---- */
#desktop-header .ift-cart-btn.header-cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--ift-header-control);
  height: var(--ift-header-control);
  padding: 0;
  text-decoration: none;
  position: relative;
}

#desktop-header .ift-cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ift-header-control);
  height: var(--ift-header-control);
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid #d1d5db;
  color: var(--ift-header-ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

#desktop-header .ift-cart-btn:hover .ift-cart-icon-wrap,
#desktop-header .ift-cart-btn:focus .ift-cart-icon-wrap {
  border-color: var(--ift-header-brand);
  background: rgba(200, 16, 46, 0.08);
  color: var(--ift-header-brand);
}

#desktop-header .ift-cart-icon-wrap .icon,
#desktop-header .ift-cart-icon-wrap .fa {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1;
}

#desktop-header .ift-cart-badge.cart-products-count-btn,
#desktop-header .ift-cart-badge {
  position: absolute !important;
  top: -4px;
  right: -4px;
  left: auto !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ift-header-brand) !important;
  color: #fff !important;
  font-size: 0.65rem !important;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: none;
}

#desktop-header .ift-cart-badge.d-none {
  display: none !important;
}

#desktop-header .ift-cart-info {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Mobile header controls ---- */
#mobile-header .row-mobile-header.ift-mobile-header-bar,
#mobile-header .ift-mobile-header-bar {
  min-height: 56px;
}

#mobile-header .ift-mobile-header-bar .m-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-width: 44px;
  padding: 0.35rem 0.4rem;
  color: var(--ift-header-ink);
  text-decoration: none;
}

#mobile-header .ift-mobile-header-bar .m-nav-btn > span:not(.ift-mobile-badge):not(.cart-products-count):not(.cart-products-count-btn) {
  /* Keep screen-reader / tiny labels visually quiet */
  font-size: 0;
  line-height: 0;
  height: 0;
  overflow: hidden;
  opacity: 0;
}

#mobile-header .ift-mobile-header-bar .m-nav-btn > .fa,
#mobile-header .ift-mobile-header-bar .m-nav-btn .mobile-bag-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ift-header-wash);
  border: 1.5px solid var(--ift-header-line);
  font-size: 1rem;
  margin: 0;
  position: relative;
}

#mobile-header .ift-mobile-header-bar .col-mobile-btn-account .m-nav-btn > .fa {
  background: var(--ift-header-wash);
}

#mobile-header .ift-mobile-header-bar #mobile-cart-products-count,
#mobile-header .ift-mobile-header-bar .cart-products-count-btn {
  position: absolute;
  top: -5px;
  right: -6px;
  left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--ift-header-brand) !important;
  color: #fff !important;
  font-size: 0.6rem !important;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  border: 2px solid #fff;
}

/* Mobile search dropdown pill */
#mobile-header #search-widget-mobile .ift-search-group,
#search-widget-mobile .ift-search-group {
  border: 1.5px solid var(--ift-header-line);
  border-radius: var(--ift-header-radius);
  background: #fff;
  overflow: hidden;
}

#mobile-header #search-widget-mobile .ift-search-group:focus-within,
#search-widget-mobile .ift-search-group:focus-within {
  border-color: var(--ift-header-brand);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

#mobile-header #search-widget-mobile .ift-search-input,
#search-widget-mobile .ift-search-input {
  border: 0 !important;
  box-shadow: none !important;
  height: 42px;
  padding-left: 1rem !important;
  background: transparent !important;
}

#mobile-header #search-widget-mobile .ift-search-btn,
#search-widget-mobile .ift-search-btn {
  width: 46px;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--ift-header-ink);
}

@media (prefers-reduced-motion: reduce) {
  #desktop-header .ift-search-group,
  #desktop-header .ift-avatar,
  #desktop-header .ift-cart-icon-wrap {
    transition: none;
  }
}

/* ---- Top bar (free shipping / call / compare) ---- */
#header .header-nav.ift-topbar,
.header-nav.ift-topbar {
  --ift-topbar-bg: #f5f6f8;
  --ift-topbar-fg: #1a1a1a;
  --ift-topbar-muted: #6b7280;
  --ift-topbar-accent: #c8102e;
  --ift-topbar-line: #e5e7eb;
  background: var(--ift-topbar-bg) !important;
  background-color: var(--ift-topbar-bg) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ift-topbar-line) !important;
  box-shadow: none !important;
  color: var(--ift-topbar-fg) !important;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  padding: 0.5rem 0 !important;
  min-height: 0;
  line-height: 1.35;
}

#header .header-nav.ift-topbar .container,
.header-nav.ift-topbar .container {
  background: transparent !important;
}

.header-nav.ift-topbar .ift-topbar__row {
  min-height: 0;
}

.header-nav.ift-topbar a {
  color: var(--ift-topbar-fg);
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-nav.ift-topbar a:hover,
.header-nav.ift-topbar a:focus {
  color: var(--ift-topbar-accent);
  text-decoration: none;
}

.header-nav.ift-topbar .ift-topbar__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 !important;
  padding: 0;
  color: var(--ift-topbar-fg);
  font-size: inherit;
  line-height: 1.35;
  text-align: left;
}

.header-nav.ift-topbar .ift-topbar__item .fa {
  color: var(--ift-topbar-accent);
  font-size: 0.875rem;
  width: 1em;
  text-align: center;
}

/* Free-shipping as a compact brand pill */
.header-nav.ift-topbar .ift-topbar__ship {
  background: #fff;
  border: 1px solid var(--ift-topbar-line);
  border-radius: 999px;
  padding: 0.28rem 0.75rem 0.28rem 0.55rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.header-nav.ift-topbar .ift-topbar__ship strong {
  color: var(--ift-topbar-accent);
  font-weight: 700;
}

.header-nav.ift-topbar .ift-topbar__loc {
  color: var(--ift-topbar-accent);
  font-weight: 700;
}

.header-nav.ift-topbar .ift-topbar__rte p,
.header-nav.ift-topbar .rte-content p {
  margin: 0 !important;
}

.header-nav.ift-topbar .ift-topbar__compare-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--ift-topbar-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}

.header-nav.ift-topbar .ift-topbar__compare-link:hover,
.header-nav.ift-topbar .ift-topbar__compare-link:focus {
  color: var(--ift-topbar-fg);
  background: rgba(0, 0, 0, 0.04);
}

.header-nav.ift-topbar .ift-topbar__compare-link .fa {
  color: inherit;
}

/* Kill theme editor pipe dividers in the new top bar */
#header .header-nav.ift-topbar .left-nav > div::after,
#header .header-nav.ift-topbar .right-nav > div::after,
#header .header-nav.ift-topbar .center-nav > div::after {
  display: none !important;
  content: none !important;
}

@media (max-width: 991.98px) {
  .header-nav.ift-topbar .ift-topbar__compare {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .header-nav.ift-topbar {
    display: none !important;
  }
}


