/* Brand + language/theme cluster (left), cart/account stay right */

.sf-brand-prefs {
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  flex-shrink: 0 !important;
  width: max-content !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: visible !important;
}

.sf-pref-controls {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
  flex-shrink: 0 !important;
  width: max-content !important;
}

.sf-theme {
  box-sizing: border-box;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0b1220;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}

.sf-theme:hover {
  background: rgba(15, 23, 42, 0.06);
}

.sf-theme:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.sf-theme-icon {
  display: none;
  line-height: 0;
}

.sf-theme-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

html:not([data-theme="dark"]) .sf-theme-icon-moon,
html[data-theme="light"] .sf-theme-icon-moon {
  display: block;
}

html[data-theme="dark"] .sf-theme-icon-sun {
  display: block;
}

html[data-theme="dark"] .sf-theme-icon-moon {
  display: none;
}

.sf-header-pro .sf-pref-controls .sf-lang,
.sf-header-pro .sf-pref-controls .sf-theme {
  height: 34px !important;
  min-height: 34px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #334155 !important;
}

.sf-header-pro .sf-pref-controls .sf-lang:hover,
.sf-header-pro .sf-pref-controls .sf-theme:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.sf-header-pro .sf-pref-controls .sf-lang {
  padding: 0 6px !important;
  gap: 5px !important;
}

@media (max-width: 900px) {
  .sf-pref-controls {
    gap: 0 !important;
    margin-inline-end: 0 !important;
    max-width: none !important;
  }

  .sf-pref-controls .sf-lang,
  .sf-pref-controls .sf-theme {
    width: 28px !important;
    min-width: 28px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    color: #0b1220 !important;
    background: transparent !important;
  }

  .sf-pref-controls .sf-lang {
    width: auto !important;
    min-width: 0 !important;
    padding: 0 2px !important;
    gap: 2px !important;
  }

  .sf-pref-controls .sf-lang-code {
    font-size: 0.58rem !important;
    letter-spacing: 0.04em !important;
  }

  .sf-pref-controls .sf-theme svg {
    width: 15px !important;
    height: 15px !important;
  }

  /* Right cluster: cart + account only — never clip */
  .sf-actions-pro {
    flex-shrink: 0 !important;
    overflow: visible !important;
    width: max-content !important;
    min-width: 0 !important;
  }

  .sf-pref-controls {
    width: max-content !important;
    max-width: max-content !important;
  }

  .sf-profile-wrap,
  .sf-profile-btn {
    display: inline-grid !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
  }
}

/* ——— Professional dark theme ——— */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] body.page-home,
html[data-theme="dark"] body.page-inner,
html[data-theme="dark"] body.page-product,
html[data-theme="dark"] body.page-shop,
html[data-theme="dark"] body.page-category,
html[data-theme="dark"] body.page-brand-new,
html[data-theme="dark"] body.page-used,
html[data-theme="dark"] main {
  background: #0a0e16 !important;
  background-color: #0a0e16 !important;
  background-image: none !important;
  color: #e8edf5 !important;
}

html[data-theme="dark"] .container,
html[data-theme="dark"] .ix-section,
html[data-theme="dark"] .ix-section-alt,
html[data-theme="dark"] .ix-section-products,
html[data-theme="dark"] .home-section,
html[data-theme="dark"] .rt-shop-section,
html[data-theme="dark"] .browse-layout,
html[data-theme="dark"] .browse-main,
html[data-theme="dark"] .bp-main,
html[data-theme="dark"] .rt-browse,
html[data-theme="dark"] .page-home .ix-section-alt {
  background: transparent !important;
  background-color: transparent !important;
  color: inherit !important;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .ix-head h2,
html[data-theme="dark"] .ix-week-hits-head h2,
html[data-theme="dark"] .sf-logo-name,
html[data-theme="dark"] .ltd-title,
html[data-theme="dark"] .rt-card-title,
html[data-theme="dark"] .ix-hit-name,
html[data-theme="dark"] .ix-renewed-promo-title {
  color: #f4f7fb !important;
}

html[data-theme="dark"] p,
html[data-theme="dark"] .ltd-sub,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .ix-hit-compare,
html[data-theme="dark"] .sf-topbar {
  color: #9aa8bc !important;
}

/* Header chrome */
html[data-theme="dark"] .sf-topbar {
  background: #070b12 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .sf-topbar a {
  color: #b7c2d2 !important;
}

html[data-theme="dark"] .sf-header-pro,
html[data-theme="dark"] .header.sf-header-pro,
html[data-theme="dark"] .sf-header.sf-header-pro {
  background: transparent !important;
}

html[data-theme="dark"] .sf-header-pro .sf-mainbar,
html[data-theme="dark"] .sf-header-pro .sf-mainbar.sf-mainbar {
  background: #121826 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45) !important;
}

html[data-theme="dark"] .sf-logo-name,
html[data-theme="dark"] .sf-header-pro .sf-pref-controls .sf-lang,
html[data-theme="dark"] .sf-header-pro .sf-pref-controls .sf-theme,
html[data-theme="dark"] .sf-header-pro .sf-cart-btn-pro,
html[data-theme="dark"] .sf-header-pro .sf-profile-btn,
html[data-theme="dark"] .sf-header-pro .menu-toggle,
html[data-theme="dark"] .sf-actions-pro .sf-cart-btn-pro,
html[data-theme="dark"] .sf-actions-pro .sf-profile-btn,
html[data-theme="dark"] .sf-actions-pro .menu-toggle {
  color: #eef2f7 !important;
}

html[data-theme="dark"] .sf-header-pro .sf-pref-controls .sf-lang:hover,
html[data-theme="dark"] .sf-header-pro .sf-pref-controls .sf-theme:hover,
html[data-theme="dark"] .sf-header-pro .sf-cart-btn-pro:hover,
html[data-theme="dark"] .sf-header-pro .sf-profile-btn:hover,
html[data-theme="dark"] .sf-profile-wrap.is-open .sf-profile-btn,
html[data-theme="dark"] .sf-actions-pro .menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
}

html[data-theme="dark"] .sf-search-pro,
html[data-theme="dark"] .sf-header-pro .sf-search-pro {
  background: #0c111b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .sf-search-pro input,
html[data-theme="dark"] .sf-header-pro .sf-search-pro input {
  background: transparent !important;
  color: #f4f7fb !important;
}

html[data-theme="dark"] .sf-search-pro input::placeholder {
  color: #7b879a !important;
}

html[data-theme="dark"] .menu-toggle span,
html[data-theme="dark"] .sf-actions-pro .menu-toggle span {
  background: #eef2f7 !important;
}

html[data-theme="dark"] .sf-profile-panel {
  background: #151c2b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #eef2f7 !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55) !important;
}

html[data-theme="dark"] .sf-profile-link,
html[data-theme="dark"] .sf-profile-head strong {
  color: #eef2f7 !important;
}

html[data-theme="dark"] .sf-profile-head em {
  color: #9aa8bc !important;
}

html[data-theme="dark"] .sf-profile-divider {
  background: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .sf-mobile-drawer,
html[data-theme="dark"] .sf-mobile-drawer-inner {
  background: #101624 !important;
  color: #eef2f7 !important;
}

html[data-theme="dark"] .sf-mobile-drawer a {
  color: #e8edf5 !important;
}

/* Soft promo bands → deep charcoal (no leftover lavender/pink wash) */
html[data-theme="dark"] .page-home .ix-limited-drop:not([hidden]),
html[data-theme="dark"] .page-home #homeOffersSection,
html[data-theme="dark"] .page-home section.ix-offers-section,
html[data-theme="dark"] .page-home .ix-certified-block:not([hidden]),
html[data-theme="dark"] .page-home #homeCertifiedUsed:not([hidden]),
html[data-theme="dark"] .page-home .ix-renewed-promo,
html[data-theme="dark"] .page-home #homeRenewedPromo,
html[data-theme="dark"] .page-home .ix-renewed-promo-inner,
html[data-theme="dark"] .page-home #homeRenewedPromo > .container {
  background: #121826 !important;
  background-color: #121826 !important;
  background-image: none !important;
}

html[data-theme="dark"] .page-home .ix-renewed-promo,
html[data-theme="dark"] .page-home #homeRenewedPromo {
  background: #0a0e16 !important;
}

html[data-theme="dark"] .rt-card,
html[data-theme="dark"] .ltd-card[data-ltd-live="1"],
html[data-theme="dark"] .sp-mkt-card,
html[data-theme="dark"] .cu-mkt-card,
html[data-theme="dark"] .ix-renewed-promo-inner,
html[data-theme="dark"] .ix-cat-tile,
html[data-theme="dark"] .ix-brand-explore-tile,
html[data-theme="dark"] .ix-type-tile {
  background: #151c2b !important;
  background-color: #151c2b !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: #eef2f7 !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35) !important;
}

html[data-theme="dark"] .ix-cat-tile,
html[data-theme="dark"] .ix-cat-tile span,
html[data-theme="dark"] .ix-cat-tile strong,
html[data-theme="dark"] .ix-cat-rail a,
html[data-theme="dark"] .ix-cat-rail .ix-cat-label {
  color: #e8edf5 !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .ix-cat-tile svg,
html[data-theme="dark"] .ix-cat-rail svg {
  stroke: #d7dee8 !important;
  color: #d7dee8 !important;
}

html[data-theme="dark"] .trade-polish .sf-search-pro,
html[data-theme="dark"] .sf-search-pro {
  background: #0c111b !important;
  background-color: #0c111b !important;
}

html[data-theme="dark"] .ltd-media,
html[data-theme="dark"] .ltd-body,
html[data-theme="dark"] .sp-mkt-media,
html[data-theme="dark"] .sp-mkt-body,
html[data-theme="dark"] .cu-mkt-media,
html[data-theme="dark"] .cu-mkt-body,
html[data-theme="dark"] .rt-card-media,
html[data-theme="dark"] .rt-card-media-wrap,
html[data-theme="dark"] .ix-renewed-promo-visual,
html[data-theme="dark"] .ix-hit-media,
html[data-theme="dark"] .ix-brand-explore-media {
  background: #1a2233 !important;
  background-color: #1a2233 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  color: #eef2f7 !important;
}

html[data-theme="dark"] .ix-cat-rail {
  background: #101624 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-theme="dark"] .sf-footer,
html[data-theme="dark"] .sf-footer a,
html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer a {
  background: #070b12 !important;
  color: #b7c2d2 !important;
}

html[data-theme="dark"] .ix-head a,
html[data-theme="dark"] .ix-head-minimal a {
  color: #8eb6ff !important;
}

html[data-theme="dark"] .sf-cat-drop,
html[data-theme="dark"] .sf-cat-drop-inner {
  background: #151c2b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #eef2f7 !important;
}

html[data-theme="dark"] .sf-cat-drop a,
html[data-theme="dark"] .sf-cat-drop-title {
  color: #e8edf5 !important;
}

html[data-theme="dark"] .ix-week-hits-head,
html[data-theme="dark"] .page-home #homeWeekHits .ix-week-hits-head {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-theme="dark"] .rt-price,
html[data-theme="dark"] .ix-hit-price,
html[data-theme="dark"] .ltd-price-row {
  color: #f4f7fb !important;
}

/* USP / promo strip: keep brand dark, not washed pink */
html[data-theme="dark"] .sf-usp,
html[data-theme="dark"] .sf-usp-marquee {
  background: #101b2e !important;
  color: #fff !important;
}

html[data-theme="dark"] .sf-usp a,
html[data-theme="dark"] .sf-usp-marquee a {
  color: #fff !important;
}

/* Beat trade-polish / finish white surfaces in dark mode */
html[data-theme="dark"] .sf-header-pro .sf-mainbar,
html[data-theme="dark"] .sf-header-pro .sf-mainbar.sf-mainbar {
  background: #121826 !important;
}

html[data-theme="dark"] .sf-header-pro .sf-search-pro,
html[data-theme="dark"] .sf-search-pro,
html[data-theme="dark"] .sf-mainbar-pro .sf-search-pro {
  background: #0c111b !important;
  background-color: #0c111b !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .page-home .ix-cat-rail .ix-cat-tile,
html[data-theme="dark"] .ix-cat-rail a.ix-cat-tile,
html[data-theme="dark"] a.ix-cat-tile {
  background: #151c2b !important;
  background-color: #151c2b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e8edf5 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .page-home .ix-cat-rail .ix-cat-tile span,
html[data-theme="dark"] a.ix-cat-tile span {
  color: #e8edf5 !important;
}

html[data-theme="dark"] .sf-brand-prefs .sf-theme,
html[data-theme="dark"] .sf-brand-prefs .sf-lang {
  color: #eef2f7 !important;
}

html[data-theme="dark"] .sf-brand-prefs .sf-theme:hover,
html[data-theme="dark"] .sf-brand-prefs .sf-lang:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

