/* Global language control shared by desktop and mobile headers. */
.global-language-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.global-language-switcher summary {
  height: 36px;
  min-width: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--line, #deded8);
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #171717);
  font: 800 11px var(--body, Inter, sans-serif);
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.global-language-switcher summary::-webkit-details-marker { display: none; }
.global-language-switcher summary:hover,
.global-language-switcher summary:focus-visible,
.global-language-switcher[open] summary {
  border-color: var(--accent, #ef233c);
  outline: none;
}
.global-language-switcher summary svg {
  width: 10px;
  height: 7px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  transition: transform .18s ease;
}
.global-language-switcher[open] summary svg { transform: rotate(180deg); }
.global-language-switcher__menu {
  position: absolute;
  z-index: 130;
  top: calc(100% + 9px);
  right: 0;
  min-width: 76px;
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid var(--line, #deded8);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 20, 20, .16);
}
.global-language-switcher__option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--ink, #171717);
  font: 800 11px var(--body, Inter, sans-serif);
  text-decoration: none;
}
.global-language-switcher__option:hover,
.global-language-switcher__option.is-active {
  background: var(--accent, #ef233c);
  color: #fff;
}
.mobile-menu-language {
  display: grid;
  gap: 10px;
  padding: 2px 0 18px;
  border-bottom: 1px solid var(--line, #deded8);
}
.mobile-menu-language > span {
  color: var(--muted, #727272);
  font: 800 10px var(--mono, monospace);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.mobile-menu-language__links {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px !important;
  padding: 0 !important;
  border: 0 !important;
}
.mobile-menu .mobile-menu-language__links a,
.mobile-menu-language__option {
  min-width: 0 !important;
  min-height: 38px;
  display: grid !important;
  place-items: center;
  padding: 0 8px !important;
  border: 1px solid var(--line, #deded8) !important;
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #171717);
  font: 800 11px var(--body, Inter, sans-serif) !important;
  text-align: center !important;
  text-decoration: none;
}
.mobile-menu .mobile-menu-language__links a.is-active,
.mobile-menu .mobile-menu-language__links a[aria-current="page"],
.mobile-menu-language__option.is-active {
  border-color: var(--accent, #ef233c) !important;
  background: var(--accent, #ef233c);
  color: #fff;
}
@media (min-width: 901px) {
  body.has-existing-language-switcher .global-language-switcher { display: none; }
}

/* Fresh mobile navigation and homepage mobile overrides. */
.mobile-bottom-nav { display: none; }
.hero-catalog-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 18px;
  width: 100%;
}
.hero-catalog-meta .hero-updated { margin-top: 0; }
.hero-spreadsheet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink, #171717);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}
.hero-spreadsheet-link span,
.hero-spreadsheet-link:hover { color: var(--accent, #ef233c); }

@media (max-width: 760px) {
  body.has-mobile-bottom-nav {
    padding-bottom: calc(74px + env(safe-area-inset-bottom)) !important;
  }
  .home-page .home-popular-products { display: none !important; }
  .hero-catalog-meta {
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 9px;
    padding: 2px 2px 0;
    text-align: center;
  }
  .hero-catalog-meta .hero-updated { margin: 0 auto; }
  .hero-spreadsheet-link { font-size: 11px; }
  .mobile-bottom-nav {
    position: fixed;
    z-index: 80;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 66px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(24, 24, 24, .13);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 -8px 24px rgba(24, 24, 24, .07);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  .mobile-bottom-nav__link {
    min-width: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border-radius: 10px;
    color: #777773;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-bottom-nav__link:active { background: #f5f5f2; }
  .mobile-bottom-nav__icon {
    position: relative;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
  }
  .mobile-bottom-nav__icon svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-bottom-nav__label {
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    font-family: var(--body, Inter, sans-serif);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-bottom-nav__link.is-active { color: var(--accent, #ef233c); }
  .mobile-bottom-nav__link.is-active .mobile-bottom-nav__label { font-weight: 850; }
  .mobile-bottom-nav__count {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--accent, #ef233c);
    color: #fff;
    font: 800 8px/1 var(--body, Inter, sans-serif);
  }
  .mobile-bottom-nav__count[hidden] { display: none; }
}

/* Tablet and compact-desktop navigation opens as a contained dropdown, not a full-screen sheet. */
@media (min-width: 761px) {
  .mobile-menu {
    top: 74px !important;
    right: clamp(18px, 4vw, 48px) !important;
    bottom: auto !important;
    left: auto !important;
    width: min(390px, calc(100vw - 36px));
    max-height: min(680px, calc(100vh - 94px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 22px 22px !important;
    border: 1px solid var(--line, #deded8) !important;
    border-radius: 14px;
    background: #fff !important;
    box-shadow: 0 22px 60px rgba(20, 20, 20, .17);
    transform: translateY(-12px) scale(.985) !important;
    transform-origin: top right;
  }
  .mobile-menu.open {
    transform: translateY(0) scale(1) !important;
  }
  .mobile-menu > a,
  .mobile-menu > button {
    padding: 11px 0 !important;
    font-size: 20px !important;
    line-height: 1.15;
  }
  .mobile-menu-language { padding-top: 4px; }
}

/* Language visibility and mobile scrollbar cleanup v0.23.12. */
.catalog-language-switcher a[aria-current="page"],
.language-switcher a[aria-current="page"],
.account-language-switcher a[aria-current="page"] {
  display: inline-grid !important;
  place-items: center;
  background: var(--accent, #f12b3d) !important;
  color: #fff !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 760px) {
  html,
  body,
  .mobile-menu {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  html::-webkit-scrollbar,
  body::-webkit-scrollbar,
  .mobile-menu::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }
}
