.smc-desktop-tools {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
}

.smc-desktop-divider,
.smc-mobile-divider {
  width: 1px;
  height: 24px;
  flex: 0 0 1px;
  background: rgba(28, 31, 36, .12);
}

.smc-control {
  display: inline-flex;
  position: relative;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  color: inherit;
  font: inherit;
  line-height: 1;
}

.smc-native-select {
  width: auto;
  min-width: 84px;
  height: 40px;
  margin: 0;
  padding: 0 28px 0 8px;
  border: 1px solid #dedfe2;
  border-radius: 8px;
  background-color: #fff;
  color: inherit;
  font: inherit;
}

.smc-control[data-smc-enhanced="true"] .smc-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.smc-picker-button {
  display: inline-flex;
  width: auto;
  min-width: 0;
  height: 40px;
  margin: 0;
  padding: 0 9px;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.smc-picker-button:hover,
.smc-control.is-open .smc-picker-button {
  border-color: #dedfe2;
  background: #fff;
}

.smc-picker-button:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 1px;
}

.smc-picker-flag,
.smc-option-flag {
  display: inline-flex;
  width: 23px;
  height: 17px;
  flex: 0 0 23px;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 19px;
  line-height: 17px;
  filter: saturate(.92);
}

.smc-picker-label {
  max-width: 126px;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smc-picker-chevron {
  width: 7px;
  height: 7px;
  margin-inline-start: 2px;
  transform: translateY(-2px) rotate(45deg);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: .58;
  transition: transform .16s ease;
}

.smc-control.is-open .smc-picker-chevron {
  transform: translateY(2px) rotate(225deg);
}

.smc-picker-panel {
  visibility: hidden;
  position: absolute;
  z-index: 100001;
  top: calc(100% + 8px);
  right: 0;
  width: 258px;
  padding: 9px;
  transform: translateY(-4px);
  border: 1px solid #e3e5e8;
  border-radius: 12px;
  opacity: 0;
  background: #fff;
  color: #20242a;
  box-shadow: 0 14px 38px rgba(20, 25, 35, .16);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}

.smc-control.is-open .smc-picker-panel {
  visibility: visible;
  transform: translateY(0);
  opacity: 1;
}

.smc-picker-search-wrap {
  display: flex;
  position: relative;
  align-items: center;
}

.smc-picker-search-icon {
  position: absolute;
  left: 11px;
  width: 15px;
  height: 15px;
  pointer-events: none;
  opacity: .52;
}

.smc-picker-search-icon::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.smc-picker-search-icon::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 6px;
  height: 1.5px;
  transform: rotate(45deg);
  transform-origin: right center;
  border-radius: 1px;
  background: currentColor;
}

.smc-picker-search {
  width: 100%;
  height: 38px;
  margin: 0;
  padding: 0 10px 0 34px;
  border: 1px solid #d9dce1;
  border-radius: 8px;
  background: #fafbfc;
  color: #20242a;
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  line-height: 38px;
}

.smc-picker-search:focus {
  border-color: #2271b1;
  outline: 0;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(34, 113, 177, .12);
}

.smc-picker-options {
  max-height: 252px;
  margin-top: 7px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.smc-picker-option {
  display: flex;
  width: 100%;
  min-height: 42px;
  margin: 1px 0;
  padding: 7px 9px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  box-shadow: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.smc-picker-option:hover,
.smc-picker-option.is-active {
  background: #f2f5f8;
}

.smc-picker-option[aria-selected="true"] {
  background: #edf5fb;
  color: #145a8d;
}

.smc-option-main {
  min-width: 0;
  flex: 1;
}

.smc-option-label {
  display: block;
  overflow: hidden;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smc-option-meta {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #6a717b;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smc-option-check {
  visibility: hidden;
  width: 15px;
  flex: 0 0 15px;
  color: #2271b1;
  font-size: 15px;
  font-weight: 700;
}

.smc-picker-option[aria-selected="true"] .smc-option-check {
  visibility: visible;
}

.smc-picker-empty {
  padding: 18px 10px;
  color: #737a84;
  font-size: 13px;
  text-align: center;
}

.smc-mobile-tools {
  display: none;
}

@media (min-width: 993px) {
  .top-bar .col-full.smc-tools-layout,
  .top-bar .col-full:has(.smc-desktop-tools) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .top-bar .col-full.smc-tools-layout > .top-bar-left,
  .top-bar .col-full:has(.smc-desktop-tools) > .top-bar-left {
    grid-column: 1;
    width: auto;
    min-width: 0;
    justify-self: start;
  }

  .top-bar .col-full.smc-tools-layout > .top-bar-center,
  .top-bar .col-full:has(.smc-desktop-tools) > .top-bar-center {
    grid-column: 2;
    width: auto;
    max-width: none;
    justify-self: center;
  }

  .top-bar .col-full > .smc-tools-widget,
  .top-bar .col-full > .top-bar-right:has(.smc-desktop-tools) {
    grid-column: 3;
    flex: 0 0 auto;
    width: auto;
    margin-inline-start: 0;
    justify-self: end;
  }

  .top-bar .col-full > .smc-merged-widget,
  .top-bar .col-full > .top-bar-right:has(.smc-desktop-placeholder-merged) {
    display: none;
  }

  .top-bar-right .smc-picker-button {
    font-size: 13px;
  }
}

.smc-reference-price {
  display: inline-block;
  margin-inline-start: .38em;
  color: #60646c;
  font-size: .82em;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  white-space: nowrap;
}

.order-total .smc-reference-price,
.product-total .smc-reference-price {
  display: block;
  margin-top: 3px;
  margin-inline-start: 0;
}

.smc-settlement-notice {
  margin: 0 0 1rem;
  padding: 10px 12px;
  border-inline-start: 3px solid #2271b1;
  border-radius: 3px;
  background: #f0f6fc;
  color: #1d2327;
  font-size: 13px;
  line-height: 1.45;
}

.smc-toast {
  visibility: hidden;
  position: fixed;
  z-index: 100000;
  right: 18px;
  bottom: 18px;
  max-width: min(390px, calc(100vw - 36px));
  padding: 12px 16px;
  transform: translateY(12px);
  border-radius: 6px;
  opacity: 0;
  background: #1d2327;
  color: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .24);
  font-size: 14px;
  line-height: 1.45;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.smc-toast.is-error {
  background: #8a2424;
}

.smc-toast.is-visible {
  visibility: visible;
  transform: translateY(0);
  opacity: 1;
}

.smc-is-translating .smc-language-control .smc-picker-flag {
  animation: smc-pulse .85s ease-in-out infinite alternate;
}

@keyframes smc-pulse {
  to { transform: scale(.86); opacity: .55; }
}

@media (max-width: 992px) {
  .smc-mobile-tools {
    display: flex;
    position: sticky;
    z-index: 20;
    top: 70px;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-top: 1px solid #ececec;
    border-bottom: 1px solid #e4e4e4;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .045);
    color: #222;
  }

  .smc-mobile-tools .smc-control {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 48px;
    justify-content: center;
  }

  .smc-mobile-tools .smc-picker-button {
    min-width: 0;
    height: 44px;
    padding-inline: 10px;
    border-radius: 7px;
    font-size: 14px;
  }

  .smc-mobile-tools .smc-language-control .smc-picker-button {
    min-width: 120px;
  }

  .smc-mobile-tools .smc-currency-control .smc-picker-button {
    min-width: 94px;
  }

  .smc-mobile-tools .smc-picker-label {
    max-width: 92px;
  }

  .smc-mobile-tools .smc-picker-panel {
    position: fixed;
    top: 126px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: min(420px, calc(100vh - 150px));
  }

  .smc-mobile-tools .smc-picker-options {
    max-height: min(330px, calc(100vh - 230px));
  }

  body.admin-bar .smc-mobile-tools {
    top: 116px;
  }

  body.admin-bar .smc-mobile-tools .smc-picker-panel {
    top: 172px;
  }

  .smc-toast {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 360px) {
  .smc-mobile-tools .smc-picker-button {
    padding-inline: 8px;
  }

  .smc-mobile-tools .smc-language-control .smc-picker-button {
    min-width: 112px;
  }

  .smc-mobile-tools .smc-currency-control .smc-picker-button {
    min-width: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smc-picker-button,
  .smc-picker-panel,
  .smc-picker-chevron,
  .smc-toast {
    transition: none;
  }

  .smc-is-translating .smc-language-control .smc-picker-flag {
    animation: none;
  }
}

/* Block-theme header integration. */
.smc-header-tools {
  flex: 0 0 auto;
  min-height: 44px;
  margin-inline-start: 14px;
  gap: 3px;
  color: #0b1f33;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
}

/* WooCommerce auto-injects icon-only account/cart blocks after Navigation.
   Hide those legacy duplicates only in headers that contain our full toolset. */
.ime-header:has(.smc-header-tools) > .ime-header__inner > .wp-block-woocommerce-customer-account,
.ime-header:has(.smc-header-tools) > .ime-header__inner > .wp-block-woocommerce-mini-cart {
  display: none !important;
}

.smc-header-tools > p {
  display: contents;
  margin: 0;
}

.smc-header-tools > br {
  display: none;
}

.smc-header-tools .smc-control,
.smc-header-tools .smc-picker-button {
  min-height: 42px;
  height: 42px;
}

.smc-header-tools .smc-picker-button {
  padding-inline: 8px;
  border-radius: 7px;
}

.smc-header-tools .smc-language-control .smc-picker-label {
  max-width: 86px;
}

.smc-header-tools .smc-currency-control .smc-picker-label {
  max-width: 54px;
}

.smc-header-action {
  display: inline-flex;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #0b1f33;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}

.smc-header-action:hover {
  border-color: #d7dee7;
  background: #f5f7fa;
  color: #0057b8;
}

.smc-header-action:focus-visible {
  outline: 3px solid #70b6ff;
  outline-offset: 2px;
}

.smc-header-action svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.smc-header-account .smc-header-action-label {
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smc-header-cart-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: #0057b8;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

@media (max-width: 1200px) {
  .ime-header .smc-header-tools {
    margin-inline-start: auto;
    order: 4;
  }
}

@media (max-width: 720px) {
  .smc-header-tools {
    margin-inline-start: 4px;
    gap: 1px;
  }

  .smc-header-tools .smc-desktop-divider {
    height: 20px;
  }

  .smc-header-tools .smc-picker-button,
  .smc-header-action {
    min-width: 38px;
    height: 40px;
    min-height: 40px;
    padding-inline: 6px;
  }

  .smc-header-tools .smc-picker-label,
  .smc-header-action-label,
  .smc-header-tools .smc-picker-chevron {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
  }

  .smc-header-tools .smc-picker-panel {
    position: fixed;
    top: 76px;
    right: 12px;
    left: 12px;
    width: auto;
    max-height: calc(100vh - 96px);
  }

  body.admin-bar .smc-header-tools .smc-picker-panel {
    top: 122px;
  }
}

@media (max-width: 480px) {
  .ime-header .ime-brand .wp-block-site-title {
    display: none;
  }

  .smc-header-tools .smc-commerce-divider {
    display: none;
  }

  .smc-header-cart-count {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    font-size: 9px;
  }

  .smc-header-cart {
    position: relative;
  }
}

/* Public sizing tokens for theme integration; labels retain their full text. */
.smc-desktop-tools{gap:var(--smc-tools-gap,8px);flex:0 0 auto;width:auto;max-width:none}
.smc-desktop-tools .smc-control{flex:0 0 auto}
.smc-desktop-tools .smc-picker-label{max-width:var(--smc-label-max-width,none)}
@media(max-width:992px){.smc-desktop-tools{display:none}}
