.sm-display-toggle {
  position:relative; display:grid; place-items:center; flex-shrink:0;
  width:34px; height:44px; padding:0; border:0; border-radius:8px;
  background:transparent; color:#fff; cursor:pointer;
}
.sm-display-toggle[hidden], .sm-display-panel[hidden] { display:none; }
.sm-display-toggle[aria-expanded=true] { background:#ffffff26; }
.sm-display-panel {
  position:absolute; z-index:40; top:100%; right:max(14px,calc((100% - 1320px)/2));
  width:min(350px,calc(100% - 28px)); max-height:calc(100dvh - 90px);
  overflow-y:auto; padding:18px; border:1px solid #dce6f2;
  border-radius:14px; background:#fff; color:#17324b; box-shadow:0 12px 35px #102b4930;
  font-size:14px; text-align:left;
}
.sm-display-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.sm-display-heading h2 { font-size:18px; margin:0; }
.sm-display-heading button { background:transparent; color:inherit; border:0; min-width:44px; min-height:44px; font-size:26px; cursor:pointer; }
.sm-display-panel fieldset { margin:12px 0; padding:0; border:0; }
.sm-display-panel legend { display:flex; align-items:center; gap:8px; font-weight:600; margin-bottom:10px; }
.sm-theme-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.sm-theme-options label { display:flex; align-items:center; justify-content:center; gap:5px; min-height:44px; padding:6px; border:1px solid #ccdaec; border-radius:8px; cursor:pointer; }
.sm-theme-options label:has(:checked) { border-color:#0866e8; background:#edf5ff; color:#0755c1; }
.sm-theme-options input { margin:0; accent-color:#0866e8; }
.sm-display-panel .sm-language-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; gap:10px; min-height:44px; }
.sm-language-row button { min-height:44px; background:#f2f6fb; border:1px solid #dce6f2; color:#63758a; border-radius:8px; padding:8px 14px; font:inherit; }
.sm-language-row small { color:#63758a; font-size:13px; }
.sm-display-panel .sm-notifications-link { color:#0866e8!important; display:flex!important; justify-content:flex-start!important; gap:10px; width:auto!important; height:auto!important; min-height:44px; border-top:1px solid #dce6f2; padding-top:10px; }
@media(max-width:370px) { .sm-display-toggle { width:30px; } }
@media(max-width:380px) { .sm-theme-options label { flex-direction:column; gap:4px; min-width:0; } }

/* Customer surfaces share dark tokens while product photography keeps its original colors. */
html[data-sm-theme=dark] { color-scheme:dark; background:#101923; }
html[data-sm-theme=dark] body.sm-marketplace {
  --ink:#e4edf8; --muted:#a9bbcf; --line:#34465b;
  --brand-ink:#e4edf8; --brand-surface:#101923; --paper:#101923;
  --bg:#101923; --bg-body:#101923; --bg-soft:#1d2b3d;
  --text:#e4edf8; --text-main:#e4edf8; --text-muted:#a9bbcf; --border-soft:#34465b;
  background:#101923; color:#e4edf8;
}
html[data-sm-theme=dark] body.sm-marketplace :is(
 .product-card,.mp-store-card,.mp-service-card,.fl-panel,.fl-published-card,.sm-category-group,
 .sm-product-detail,.sm-review,.mp-zone-empty,.sm-display-panel,.card,.panel,.modal-content,
 .cart-item-card,.cart-summary,.cart-section,.empty,.bo-shop-card,.bo-toolbar,.empty-box) {
  background:#192637; color:#e4edf8; border-color:#34465b;
}
html[data-sm-theme=dark] body.sm-marketplace :is(
 .section-title p,.sm-help,.sm-catalog-heading p,.fl-note,.sm-breadcrumb,.sm-price-label,
 .mp-market-member-note,.mp-store-area,.mp-provider,.mp-service-description,.mp-zone-empty p,
 .mp-service-price>span,.sm-list-price,.sm-review time,.sm-rating-empty,.sm-display-panel small) { color:#a9bbcf; }
html[data-sm-theme=dark] body.sm-marketplace :is(.mp-market-categories,.mp-skill-categories>a,.sm-store-footer,.sm-store-header .sm-seller-menu>div) { background:#192637; color:#e4edf8; border-color:#34465b; }
html[data-sm-theme=dark] body.sm-marketplace :is(.mp-market-categories>a,.mp-skill-categories>a,.product-card h3,.mp-store-body h3,.mp-service-body h3,.sm-category-group li a,.sm-category-group h2) { color:#e4edf8; }
html[data-sm-theme=dark] body.sm-marketplace :is(.mp-market-categories>a:hover,.sm-theme-options label:has(:checked),.sm-member-notice,.sm-review blockquote,.fl-status-note,.fl-package) { background:#233c57; color:#e4edf8; border-color:#536e8b; }
html[data-sm-theme=dark] body.sm-marketplace :is(.mp-market-category-icon,.product-picture,.sm-product-main-image) { color-scheme:light; }
html[data-sm-theme=dark] body.sm-marketplace :is(.product-card .price,.sm-product-detail .price,.mp-service-price strong,.fl-price,.section-title>a,.sm-review-video-link,.sm-secondary-catalog-link,.mp-store-visit,.sm-group-link) { color:#7eb6ff; }
html[data-sm-theme=dark] body.sm-marketplace :is(.sm-card-saving,.sm-member-discount) { background:#164c3b; color:#aff4d2; }
html[data-sm-theme=dark] body.sm-marketplace .sm-card-rating { color:#f1ce77; }
html[data-sm-theme=dark] body.sm-marketplace .sm-rating-empty { color:#a9bbcf; }
html[data-sm-theme=dark] body.sm-marketplace :is(.sm-filter input,.sm-filter select,.sm-buy-form input,.fl-field input,.fl-field textarea,.fl-field select,.sm-theme-options label,.sm-language-row button) { background:#142030; color:#e4edf8; border-color:#49617c; }
html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom { background:#152233; border-color:#34465b; }
html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom a { color:#bacce0; }
html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom a.active { color:#85bcff; }
html[data-sm-theme=dark] body.sm-marketplace :is(.mp-slider-controls button,.mp-market-more,.sm-pagination a,.category-list a,.sm-product-actions>.btn:last-child,.sm-product-actions .sm-secondary) { background:#21344b; color:#a5ceff; border-color:#49617c; }
html[data-sm-theme=dark] body.sm-marketplace .sm-display-panel .sm-notifications-link { color:#a5ceff!important; border-color:#34465b; }
html[data-sm-theme=dark] body.sm-marketplace .sm-store-header .search { color-scheme:light; }
html[data-sm-theme=dark] body.sm-marketplace :is(
 .bo-card,.bo-card-head,.bo-card-foot,.bo-info,.bo-menu-pill,
 .shop-cart-item,.target-member-selector-card,.saved-address-card,.custom-address-card,
 .company-pickup-card,.shop-manual-payment-card,.select2-custom-rendered,.select2-custom-dropdown) {
  background:#192637; color:#e4edf8; border-color:#34465b;
}
html[data-sm-theme=dark] body.sm-marketplace :is(
 .bo-card h3,.bo-info-row,.shop-cart-item-title,.receipt-label,.receipt-value,.receipt-total-label,
 .select2-custom-name,.saved-address-text) { color:#e4edf8!important; }
html[data-sm-theme=dark] body.sm-marketplace .receipt-row-total { background:#23364d!important; border-color:#49617c!important; }
html[data-sm-theme=dark] body.sm-marketplace :is(.receipt-price-highlight,.shop-cart-item-meta) { color:#8bc3ff!important; }
html[data-sm-theme=dark] body.sm-marketplace :is(.shop-cart-page input,.shop-cart-page select,.shop-cart-page textarea) { background:#142030; color:#e4edf8; border-color:#49617c; }

/* Mobile header controls and guest navigation. */
.sm-mobile-language,.sm-mobile-theme { display:none; }
@media(max-width:760px) {
 body.sm-marketplace .sm-store-header .account>a:not(.sm-cart-link):not(.sm-notifications-link).sm-account-entry { display:none; }
 body.sm-marketplace .sm-store-header .sm-display-toggle { display:none; }
 body.sm-marketplace .sm-store-header :is(.sm-mobile-language,.sm-mobile-theme) {
   display:grid; place-items:center; flex-shrink:0; width:40px; min-height:44px;
   border:0; border-radius:8px; padding:0; background:transparent; color:#fff; cursor:pointer;
 }
 body.sm-marketplace .sm-store-header :is(.sm-mobile-language,.sm-mobile-theme)[hidden] { display:none; }
 body.sm-marketplace .sm-store-header .sm-mobile-language[aria-expanded=true] { background:#ffffff26; }
 body.sm-marketplace .mobile-bottom.sm-guest-bottom { grid-template-columns:repeat(3,minmax(0,1fr)); }
}

/* The globe opens only the language list, anchored directly below it. */
.sm-language-picker { display:none; position:relative; }
.sm-language-options { position:absolute; z-index:50; top:calc(100% + 6px); right:0; width:190px; padding:5px; border:1px solid #dce6f2; border-radius:12px; background:#fff; color:#17324b; box-shadow:0 10px 28px #102b4930; }
.sm-language-options[hidden] { display:none; }
.sm-language-options button { display:flex; justify-content:space-between; align-items:center; gap:12px; width:100%; min-height:44px; padding:9px 12px; border:0; border-radius:8px; background:transparent; color:inherit; font:inherit; font-size:14px; cursor:pointer; }
.sm-language-options [data-language-current] { background:#edf5ff; color:#0755c1; font-weight:600; }
.sm-language-options button:disabled { color:#718197; cursor:default; }
.sm-language-options small { font-size:11px; }
.sm-language-options button:focus-visible { outline:2px solid #0866e8; outline-offset:-2px; }
html[data-sm-theme=dark] .sm-language-options { background:#192637; color:#e4edf8; border-color:#49617c; }
html[data-sm-theme=dark] .sm-language-options [data-language-current] { background:#233c57; color:#c3e2ff; }
html[data-sm-theme=dark] .sm-language-options button:disabled { color:#a9bbcf; }
@media(max-width:760px) { .sm-language-picker { display:block; } }

.sm-language-label { display:inline-flex; align-items:center; gap:8px; white-space:nowrap; }
.sm-language-label .sm-language-flag { display:block; flex-shrink:0; width:24px; height:16px; object-fit:cover; border-radius:2px; box-shadow:0 0 0 1px #17324b20; }
.sm-language-options { width:214px; }

@media(max-width:760px) {
  body.sm-marketplace .mobile-bottom {
    background:linear-gradient(105deg,rgba(239,255,250,.96) 0%,rgba(236,247,255,.97) 52%,rgba(232,243,255,.98) 100%);
    backdrop-filter:blur(12px);
    border-top:1px solid #cfe4f5;
    box-shadow:0 -6px 20px -8px rgba(8,102,232,.14);
    gap:6px;
    padding:6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  body.sm-marketplace .mobile-bottom a {
    color:#3d638c; gap:3px; min-height:50px; padding:5px 4px;
    border-radius:13px; justify-content:center; line-height:1.3; font-weight:600;
    transition:background .15s,color .15s;
  }
  body.sm-marketplace .mobile-bottom a.active {
    color:#0658cf;
    background:linear-gradient(135deg,#dcfdf4 0%,#dbeeff 100%);
    box-shadow:inset 0 0 0 1px #b6dcf8;
    font-weight:700;
  }
  body.sm-marketplace .mobile-bottom a:focus-visible { outline:2px solid #0866d8; outline-offset:-2px; }
  body.sm-marketplace .mobile-bottom .sm-bottom-icon { display:grid; place-items:center; line-height:1; }
  body.sm-marketplace .mobile-bottom .sm-bottom-icon svg { display:block; width:22px; height:22px; stroke-width:1.85; }
  body.sm-marketplace .mobile-bottom .sm-chat-nav-badge { background:#0866e8; color:#fff; }
  html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom {
    background:linear-gradient(105deg,rgba(20,34,51,.97),rgba(22,39,59,.98));
    border-color:#2f4966;
    box-shadow:0 -6px 20px -8px rgba(0,0,0,.45);
  }
  html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom a { color:#9fc0e2; }
  html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom a.active {
    color:#9be7ff;
    background:linear-gradient(135deg,rgba(21,90,94,.45),rgba(28,74,128,.6));
    box-shadow:inset 0 0 0 1px rgba(125,220,233,.3);
  }
}

/* Direct language and theme controls on desktop, matching mobile. */
@media(min-width:761px) {
 body.sm-marketplace .sm-store-header .sm-display-toggle { display:none; }
 body.sm-marketplace .sm-store-header .sm-language-picker { display:block; order:4; }
 body.sm-marketplace .sm-store-header .sm-mobile-theme { order:5; }
 body.sm-marketplace .sm-store-header :is(.sm-mobile-language,.sm-mobile-theme) { display:grid; place-items:center; flex-shrink:0; width:40px; height:44px; border:0; border-radius:8px; padding:0; background:transparent; color:#fff; cursor:pointer; }
 body.sm-marketplace .sm-store-header :is(.sm-mobile-language,.sm-mobile-theme)[hidden] { display:none; }
 body.sm-marketplace .sm-store-header :is(.sm-mobile-language,.sm-mobile-theme):hover { background:#ffffff1c; }
 body.sm-marketplace .sm-store-header .sm-mobile-language[aria-expanded=true] { background:#ffffff26; }
 body.sm-marketplace .sm-store-header .sm-desktop-notifications { display:grid; place-items:center; position:relative; width:40px; min-height:44px; color:#fff; }
}
@media(max-width:760px) { body.sm-marketplace .sm-store-header .sm-desktop-notifications { display:none; } }

@media(max-width:760px) { body.sm-marketplace .sm-store-header .sm-desktop-home { display:none; } }

@media(max-width:760px) {
 body.sm-marketplace .mobile-bottom { padding:0 0 env(safe-area-inset-bottom); }
 body.sm-marketplace .mobile-bottom a { margin:0; padding:4px 2px; min-height:58px; border-radius:0; }
 body.sm-marketplace .mobile-bottom a.active { border-radius:0; }
}

@media(max-width:760px) {
 body.sm-marketplace .mobile-bottom { background:linear-gradient(100deg,#b9dcf6 0%,#d4edf4 55%,#eef9f8 100%); }
 html[data-sm-theme=dark] body.sm-marketplace .mobile-bottom { background:linear-gradient(100deg,#214c72 0%,#1c3a55 55%,#172c40 100%); }
}

@media(max-width:760px) {
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom { background:linear-gradient(100deg,#a8d2f1 0%,#c5e5ef 55%,#e0f3f3 100%); }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a { color:#315f92; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a.active { background:#c2e1fb; color:#0755c1; }
}

@media(max-width:760px) {
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom { background:linear-gradient(105deg,#78b5ef 0%,#a0d9f5 55%,#cef2fb 100%); }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a { color:#124b85; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a.active { background:#ffffff70; color:#064fb6; }
}

@media(max-width:760px) {
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a { color:#10345b; font-weight:600; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a.active { color:#063b84; background:#f3faffbd; font-weight:700; }
}

@media(max-width:760px) {
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom { background:#f5faff; border-top:1px solid #d7e6f5; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a { color:#315574; font-weight:600; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a.active { color:#0755c1; background:#dceeff; font-weight:700; }
}

@media(max-width:760px) {
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom { background:linear-gradient(110deg,#0756ba,#0879d4 65%,#068fae); border-top:1px solid #ffffff55; box-shadow:0 -3px 14px #0755bf24; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a { color:#e0efff; font-weight:600; }
 html:not([data-sm-theme=dark]) body.sm-marketplace .mobile-bottom a.active { background:#ffffff27; color:#fff; font-weight:700; box-shadow:inset 0 3px 0 #8ef6e1; }
}

/* Members can reach notifications directly from the customer header on mobile. */
@media(max-width:760px) {
 body.sm-marketplace .sm-store-header .account .sm-desktop-notifications { display:grid; place-items:center; position:relative; flex-shrink:0; width:38px; min-height:44px; color:#fff; }
 body.sm-marketplace .sm-store-header .account .sm-desktop-notifications svg { width:22px; height:22px; }
 body.sm-marketplace .sm-store-header .account .sm-desktop-notifications .sm-header-count { top:1px; right:0; }
}
@media(max-width:360px) {
 body.sm-marketplace .sm-store-header .account { gap:0; }
 body.sm-marketplace .sm-store-header .account :is(.sm-mobile-language,.sm-mobile-theme,.sm-desktop-notifications) { width:34px; }
}

@media(max-width:760px) { body.sm-marketplace .sm-store-header .account>a.sm-desktop-notifications:not(.sm-cart-link):not(.sm-notifications-link) { display:grid; } }

@media(max-width:760px) {
 body.sm-marketplace .sm-store-header .account > .sm-cart-link { width:38px; height:44px; }
}
@media(max-width:360px) {
 body.sm-marketplace .sm-store-header .account > .sm-cart-link { width:34px; }
}

.sm-notice-panel {
  position:absolute; z-index:51; top:100%; right:max(12px,calc((100% - 1280px)/2));
  width:min(400px,calc(100% - 24px)); padding:12px; border:1px solid #d8e5f4;
  border-radius:14px; background:#fff; color:#17324b; box-shadow:0 8px 24px #102b4926;
  font-size:14px;
}
.sm-notice-panel[hidden] { display:none; }
.sm-notice-head,.sm-notice-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.sm-notice-head h2 { margin:0; font-size:18px; color:inherit; }
.sm-notice-panel [data-sm-notice-status] { margin:0; }
.sm-notice-panel ul { list-style:none; margin:4px 0 8px; padding:0; max-height:min(50dvh,440px); overflow:auto; }
.sm-notice-panel li { display:grid; gap:2px; padding:10px 8px; border-bottom:1px solid #dce9f5; }
.sm-notice-panel li.unread { background:#edf5ff; border-inline-start:3px solid #0866e8; }
.sm-notice-panel li > div { min-width:0; overflow-wrap:anywhere; }
.sm-notice-panel li p { margin:3px 0; line-height:1.5; }
.sm-notice-item-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.sm-notice-item-actions button { margin-inline-start:auto; }
.sm-notice-item-actions a { display:inline-flex; align-items:center; min-height:44px; }
.sm-notice-panel button,.sm-notice-actions a { min-height:44px; padding:4px 10px; border:0; border-radius:8px; background:transparent; color:#0755c1; font:inherit; cursor:pointer; }
.sm-notice-panel button { flex-shrink:0; }
.sm-notice-panel button:disabled { opacity:.55; cursor:default; }
.sm-notice-panel a { color:#0755c1; }
.sm-notice-actions a { display:inline-flex; align-items:center; font-weight:700; }
html[data-sm-theme=dark] .sm-notice-panel { background:#192637; color:#e4edf8; border-color:#34465b; }
html[data-sm-theme=dark] .sm-notice-panel li { border-bottom-color:#34465b; }
html[data-sm-theme=dark] .sm-notice-panel li.unread { background:#233c57; }
html[data-sm-theme=dark] .sm-notice-panel :is(button,a) { color:#a9d1ff; }

body.sm-marketplace .sm-store-header.sm-header-has-credit .account > a.sm-header-credit {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  background: #ecfdf5;
  color: #065f46;
  line-height: 1.25;
}
.sm-header-credit svg { flex: 0 0 auto; width: 16px; height: 16px; }
.sm-header-credit strong { font-size: .84375rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.sm-marketplace .sm-store-header.sm-header-has-credit .account > a.sm-header-credit:hover { background: #d1fae5; }
html[data-sm-theme=dark] body.sm-marketplace .sm-store-header.sm-header-has-credit .account > a.sm-header-credit {
  background: #123c32;
  color: #c3f7df;
  border-color: #35755e;
}
@media (max-width:900px) {
  body.sm-marketplace .sm-header-has-credit .header-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }
  body.sm-marketplace .sm-header-has-credit .brand {
    container: sm-credit-brand / inline-size;
    justify-self: stretch;
    width: auto;
    min-width: 0;
  }
  body.sm-marketplace .sm-header-has-credit .brand img { flex-shrink: 0; }
}
@media (max-width:760px) {
  body.sm-marketplace .sm-store-header.sm-header-has-credit .account > a.sm-header-credit { padding-inline: 6px; }
  .sm-header-has-credit .header-main { position: relative; }
  .sm-header-has-credit .sm-language-picker { position: static; }
  .sm-header-has-credit .sm-language-options { right: 0; max-width: 100%; }
}
@container sm-credit-brand (max-width: 10.5rem) {
  .sm-brand-name { display: none; }
}
@supports not (container-type: inline-size) {
  @media (max-width: 470px) {
    .sm-header-has-credit .sm-brand-name { display: none; }
  }
}
@media (max-width:360px) {
  body.sm-marketplace .sm-store-header.sm-header-has-credit .account > a.sm-header-credit { padding-inline: 4px; gap: 3px; }
  .sm-header-credit svg { width: 13px; height: 13px; }
  .sm-header-credit strong { font-size: .6875rem; }
}
