/* Compact ZAR / GBP / USD catalogue switcher — content-width only; does not overlay main nav.
 * Scroll fade is driven by csmbac-nav.js (shared .nav-scroll-faded) — same opacity/timing as body > nav. */
.currency-switcher {
  --cs-fg: rgba(255, 255, 255, 0.62);
  --cs-fg-strong: #ffffff;
  --cs-bg: rgba(8, 8, 10, 0.42);
  --cs-border: rgba(255, 255, 255, 0.12);
  --cs-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  --cs-active-bg: rgba(0, 0, 0, 0.28);

  position: fixed;
  top: 5.6rem;
  left: 1rem;
  z-index: 50;
  width: max-content;
  max-width: calc(100vw - 2rem);
  margin: 0;
  padding: 0.28rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--cs-border);
  background: var(--cs-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--cs-shadow);
  pointer-events: auto;
  opacity: 1;
}

.currency-switcher__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 0.12rem;
}

.currency-switcher__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  padding: 0.24rem 0.4rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cs-fg);
  transition: color 0.2s, background 0.2s;
}

.currency-switcher__link:is(:link, :visited) {
  color: var(--cs-fg);
}

.currency-switcher__link:hover,
.currency-switcher__link:focus-visible {
  color: var(--cs-fg-strong);
  outline: none;
}

.currency-switcher__link.is-active,
.currency-switcher__link.is-active:is(:link, :visited) {
  color: #ffffff;
  background: var(--cs-active-bg);
  border-color: #e2e8f059;
  border-width: 0.1px;
  border-style: groove;
  text-decoration: none;
}

body.theme-light .currency-switcher,
html[data-theme='light'] .currency-switcher {
  --cs-fg: rgba(15, 23, 42, 0.62);
  --cs-fg-strong: #0f172a;
  --cs-bg: rgba(255, 255, 255, 0.55);
  --cs-border: rgba(15, 23, 42, 0.12);
  --cs-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
  --cs-active-bg: rgba(0, 0, 0, 0.28);
}

body.theme-light .currency-switcher__link.is-active,
html[data-theme='light'] .currency-switcher__link.is-active {
  color: var(--cs-fg-strong);
}

.market-selector:not(.currency-switcher) {
  display: none !important;
}

@media (max-width: 768px) {
  .currency-switcher {
    top: 4.9rem;
    left: 0.65rem;
    padding: 0.22rem 0.28rem;
  }

  body:has(#site-carousel) .currency-switcher {
    left: auto;
    right: 0.65rem;
  }

  .currency-switcher__link {
    min-width: 2rem;
    padding: 0.2rem 0.34rem;
    font-size: 0.6rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .currency-switcher__link {
    transition: none;
  }
}