/* KBSNEAK Mobile Glass Navigation — isolated, dependency-free styles. */
.kbs-mgn-shell,
.kbs-mgn-search,
.kbs-mgn-topbar,
.kbs-mgn-filter {
  --kbs-mgn-glass: rgba(255, 255, 255, .76);
  --kbs-mgn-text: #111111;
  --kbs-mgn-active: #e8e8e8;
  --kbs-mgn-accent: #ff4d00;
  --kbs-mgn-blur: 22px;
  --kbs-mgn-bottom: 10px;
  box-sizing: border-box;
  color: var(--kbs-mgn-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.kbs-mgn-shell *,
.kbs-mgn-search *,
.kbs-mgn-topbar *,
.kbs-mgn-filter * { box-sizing: border-box; }

.kbs-mgn-shell :where(a, button, input, select, label),
.kbs-mgn-search :where(a, button, input, select, label),
.kbs-mgn-topbar :where(a, button, input, select, label),
.kbs-mgn-filter :where(a, button, input, select, label) {
  -webkit-tap-highlight-color: transparent !important;
}

.kbs-mgn-shell :where(a, button, input, select):focus,
.kbs-mgn-search :where(a, button, input, select):focus,
.kbs-mgn-topbar :where(a, button, input, select):focus,
.kbs-mgn-filter :where(a, button, input, select):focus {
  outline: none !important;
}

.kbs-mgn-shell :where(a, button, input, select):focus:not(:focus-visible),
.kbs-mgn-search :where(a, button, input, select):focus:not(:focus-visible),
.kbs-mgn-topbar :where(a, button, input, select):focus:not(:focus-visible),
.kbs-mgn-filter :where(a, button, input, select):focus:not(:focus-visible) {
  box-shadow: none !important;
}

.kbs-mgn-shell :where(a, button, input, select):focus-visible,
.kbs-mgn-search :where(a, button, input, select):focus-visible,
.kbs-mgn-topbar :where(a, button, input, select):focus-visible,
.kbs-mgn-filter :where(a, button, input, select):focus-visible {
  outline: 2px solid var(--kbs-mgn-text) !important;
  outline-offset: 2px;
}

.kbs-mgn-shell {
  position: fixed;
  right: 12px;
  bottom: calc(var(--kbs-mgn-bottom) + env(safe-area-inset-bottom, 0px));
  left: 12px;
  z-index: 99970;
  width: auto;
  max-width: 560px;
  height: 76px;
  margin: 0 auto;
  display: none;
  align-items: stretch;
  gap: 9px;
  pointer-events: none;
  direction: ltr;
}

.kbs-mgn-rail,
.kbs-mgn-search-button {
  color: var(--kbs-mgn-text) !important;
  background: var(--kbs-mgn-glass) !important;
  border: 1px solid rgba(255,255,255,.58) !important;
  box-shadow: 0 10px 34px rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.62) !important;
  -webkit-backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(150%);
  backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(150%);
  pointer-events: auto;
}

.kbs-mgn-rail {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  padding: 5px;
  display: flex;
  align-items: stretch;
  border-radius: 999px;
}

.kbs-mgn-item {
  position: relative;
  min-width: 0;
  min-height: 64px;
  flex: 1 1 0;
  margin: 0;
  padding: 6px 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
  color: var(--kbs-mgn-text) !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px;
  box-shadow: none !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s ease, transform .16s ease;
}

.kbs-mgn-item.is-active {
  background: var(--kbs-mgn-active) !important;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.13), inset 0 -1px 0 rgba(255,255,255,.7) !important;
}
.kbs-mgn-item:active {
  background: var(--kbs-mgn-active) !important;
  box-shadow: inset 0 4px 11px rgba(0,0,0,.2) !important;
  transform: translateY(2px) scale(.94);
}
.kbs-mgn-item:focus-visible { outline: 2px solid var(--kbs-mgn-text); outline-offset: -3px; }

.kbs-mgn-icon {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 28px;
}

.kbs-mgn-icon svg,
.kbs-mgn-search-button svg,
.kbs-mgn-search-head svg,
.kbs-mgn-search-panel form button svg {
  width: 100%;
  height: 100%;
  display: block;
}

.kbs-mgn-label {
  max-width: 100%;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kbs-mgn-cart-count {
  position: absolute;
  top: -5px;
  right: -8px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--kbs-mgn-accent);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.kbs-mgn-cart-count.is-empty { display: none; }

.kbs-mgn-search-button,
button.kbs-mgn-search-button {
  width: 76px !important;
  min-width: 76px !important;
  height: 76px !important;
  min-height: 76px !important;
  margin: 0 !important;
  padding: 23px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  appearance: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease;
}

.kbs-mgn-search-button:active {
  box-shadow: inset 0 5px 13px rgba(0,0,0,.2) !important;
  transform: translateY(2px) scale(.93);
}
.kbs-mgn-search-button:focus-visible { outline: 2px solid var(--kbs-mgn-text); outline-offset: 3px; }

.kbs-mgn-search {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s;
}

.kbs-mgn-search.is-open { visibility: visible; opacity: 1; pointer-events: auto; }

.kbs-mgn-search-scrim,
button.kbs-mgn-search-scrim {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(0,0,0,.42) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  appearance: none;
}

.kbs-mgn-search-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  margin: 0;
  padding: 18px;
  color: var(--kbs-mgn-text);
  background: var(--kbs-mgn-glass);
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 28px;
  box-shadow: 0 22px 60px rgba(0,0,0,.24);
  -webkit-backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(160%);
  backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(160%);
  transform: translateY(24px);
  transition: transform .24s cubic-bezier(.2,.75,.25,1);
}

.kbs-mgn-search.is-open .kbs-mgn-search-panel { transform: translateY(0); }

.kbs-mgn-search-head {
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kbs-mgn-search-head strong { font-size: 22px; font-weight: 700; }

.kbs-mgn-search-head button,
button[data-kbs-mgn-search-close]:not(.kbs-mgn-search-scrim) {
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 9px !important;
  color: var(--kbs-mgn-text) !important;
  background: rgba(255,255,255,.55) !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  appearance: none;
  cursor: pointer;
}

.kbs-mgn-search-panel form {
  width: 100%;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 8px;
}

.kbs-mgn-search-panel input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 52px;
  margin: 0;
  padding: 0 18px;
  color: #111;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 999px;
  box-shadow: none;
  font: inherit;
  font-size: 16px;
  outline: none;
}

.kbs-mgn-search-panel input[type="search"]:focus { border-color: #111; }
.kbs-mgn-search-panel input[type="hidden"] { display: none; }

.kbs-mgn-search-panel form button,
button.kbs-mgn-search-panel-submit {
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #fff !important;
  background: #111 !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.kbs-mgn-search-panel form button svg { width: 20px; height: 20px; }
body.kbs-mgn-search-open { overflow: hidden; }

/* Product archive glass toolbar. It uses the exact same variables as the bottom dock. */
.kbs-mgn-topbar {
  width: min(100%, 760px);
  min-height: 66px;
  margin: 0 auto;
  padding: 8px 16px;
  display: none;
  grid-template-columns: 50px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 12px;
  color: var(--kbs-mgn-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  direction: ltr;
}

.kbs-mgn-topbar-title {
  min-width: 0;
  overflow: hidden;
  color: var(--kbs-mgn-text);
  font-size: clamp(16px, 4.5vw, 23px);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kbs-mgn-glass-button,
button.kbs-mgn-glass-button {
  position: relative;
  width: 50px !important;
  min-width: 50px !important;
  height: 50px !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 14px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--kbs-mgn-text) !important;
  background: var(--kbs-mgn-glass) !important;
  border: 1px solid rgba(255,255,255,.58) !important;
  border-radius: 50% !important;
  box-shadow: 0 9px 28px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.65) !important;
  -webkit-backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(150%);
  backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(150%);
  appearance: none !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .16s ease, box-shadow .16s ease;
}

.kbs-mgn-glass-button svg { width: 100%; height: 100%; display: block; }
.kbs-mgn-glass-button:active {
  box-shadow: inset 0 5px 13px rgba(0,0,0,.2) !important;
  transform: translateY(2px) scale(.92);
}
.kbs-mgn-glass-button:focus-visible { outline: 2px solid var(--kbs-mgn-text); outline-offset: 3px; }

.kbs-mgn-filter-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--kbs-mgn-accent);
  border: 2px solid #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

/* Focused filter sheet: sorting, size and color only. */
.kbs-mgn-filter {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: var(--kbs-mgn-text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s;
}

.kbs-mgn-filter.is-open { visibility: visible; opacity: 1; pointer-events: auto; }

.kbs-mgn-filter-scrim,
button.kbs-mgn-filter-scrim {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(0,0,0,.4) !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  appearance: none;
}

.kbs-mgn-filter-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  height: min(86vh, 760px);
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  overflow: hidden;
  color: #111;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -16px 60px rgba(0,0,0,.22);
  -webkit-backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(150%);
  backdrop-filter: blur(var(--kbs-mgn-blur)) saturate(150%);
  transform: translateY(105%);
  transition: transform .28s cubic-bezier(.2,.75,.25,1);
}

.kbs-mgn-filter.is-open .kbs-mgn-filter-panel { transform: translateY(0); }

.kbs-mgn-filter-head {
  min-height: 76px;
  padding: 14px 18px 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(0,0,0,.08);
}

.kbs-mgn-filter-head strong { font-size: 22px; font-weight: 700; }

.kbs-mgn-filter-head button,
button[data-kbs-mgn-filter-close]:not(.kbs-mgn-filter-scrim) {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 12px !important;
  color: #fff !important;
  background: #111 !important;
  border: 0 !important;
  border-radius: 50% !important;
  box-shadow: none !important;
  appearance: none;
  cursor: pointer;
}

.kbs-mgn-filter-head svg { width: 100%; height: 100%; display: block; }

.kbs-mgn-filter-scroll {
  padding: 0 24px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.kbs-mgn-filter-section {
  min-width: 0;
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-bottom: 1px solid #d7d7d7;
}

.kbs-mgn-filter-section:last-child { border-bottom: 0; }
.kbs-mgn-filter-section legend { width: 100%; margin: 0 0 16px; padding: 0; color: #111; font-size: 18px; font-weight: 700; }

.kbs-mgn-radio {
  min-height: 42px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #111;
  font-size: 16px;
  cursor: pointer;
}

.kbs-mgn-radio input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #111;
}

.kbs-mgn-size-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 7px;
}

.kbs-mgn-size-grid label { position: relative; margin: 0; cursor: pointer; }
.kbs-mgn-size-grid input { position: absolute; opacity: 0; pointer-events: none; }
.kbs-mgn-size-grid span {
  min-height: 46px;
  padding: 7px 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111;
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.kbs-mgn-size-grid input:checked + span { color: #fff; background: #111; border-color: #111; box-shadow: inset 0 3px 8px rgba(255,255,255,.12); }
.kbs-mgn-size-grid label:active span { transform: translateY(2px) scale(.96); }
.kbs-mgn-size-grid input:focus-visible + span { outline: 2px solid #111; outline-offset: 2px; }

.kbs-mgn-color-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px 8px;
}

.kbs-mgn-color-grid label {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: #111;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}

.kbs-mgn-color-grid input { position: absolute; opacity: 0; pointer-events: none; }
.kbs-mgn-color-grid label > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbs-mgn-swatch {
  width: 38px;
  height: 38px;
  display: block;
  background: var(--kbs-mgn-swatch);
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 50%;
  box-shadow: 0 0 0 3px #fff, 0 0 0 4px transparent;
  transition: box-shadow .16s ease, transform .16s ease;
}
.kbs-mgn-color-grid input:checked + .kbs-mgn-swatch { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #111; transform: scale(.9); }
.kbs-mgn-color-grid label:active .kbs-mgn-swatch { transform: scale(.84); }
.kbs-mgn-color-grid input:focus-visible + .kbs-mgn-swatch { outline: 2px solid #111; outline-offset: 5px; }

.kbs-mgn-filter-actions {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom,0px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: rgba(255,255,255,.92);
  border-top: 1px solid rgba(0,0,0,.09);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.kbs-mgn-filter-actions a,
.kbs-mgn-filter-actions button {
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfcfcf !important;
  border-radius: 999px !important;
  box-shadow: none !important;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}
.kbs-mgn-filter-actions a { color: #111 !important; background: #fff !important; }
.kbs-mgn-filter-actions button { color: #fff !important; background: #111 !important; border-color: #111 !important; }
.kbs-mgn-filter-actions a:active,
.kbs-mgn-filter-actions button:active { box-shadow: inset 0 4px 10px rgba(0,0,0,.22) !important; transform: translateY(2px) scale(.98); }

body.kbs-mgn-filter-open { overflow: hidden; }

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .kbs-mgn-rail,
  .kbs-mgn-search-button,
  .kbs-mgn-search-panel,
  .kbs-mgn-glass-button,
  .kbs-mgn-filter-panel { background: rgba(255,255,255,.96) !important; }
}

@media (max-width: 390px) {
  .kbs-mgn-shell { right: 8px; left: 8px; height: 70px; gap: 7px; }
  .kbs-mgn-rail { padding: 4px; }
  .kbs-mgn-item { min-height: 62px; padding-right: 2px; padding-left: 2px; }
  .kbs-mgn-icon { width: 25px; height: 25px; flex-basis: 25px; }
  .kbs-mgn-label { font-size: 10px; }
  .kbs-mgn-search-button,
  button.kbs-mgn-search-button { width: 70px !important; min-width: 70px !important; height: 70px !important; min-height: 70px !important; padding: 22px !important; }
  .kbs-mgn-topbar { min-height: 62px; padding: 7px 12px; grid-template-columns: 46px minmax(0,1fr) 46px; gap: 8px; }
  .kbs-mgn-topbar-title { display: -webkit-box; overflow: hidden; line-height: 1.12; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .kbs-mgn-glass-button,
  button.kbs-mgn-glass-button { width: 46px !important; min-width: 46px !important; height: 46px !important; min-height: 46px !important; padding: 12px !important; }
  .kbs-mgn-filter-scroll { padding-right: 18px; padding-left: 18px; }
  .kbs-mgn-size-grid { gap: 5px; }
  .kbs-mgn-size-grid span { min-height: 44px; font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .kbs-mgn-shell *,
  .kbs-mgn-search *,
  .kbs-mgn-topbar *,
  .kbs-mgn-filter * { transition-duration: .01ms !important; }
}
