/*
 * First-paint shell for public catalog pages and the homepage.
 *
 * The full site stylesheet remains the source of truth for interaction and
 * lower-page UI. This deliberately contains only the stable header and
 * breadcrumb/hero-shell geometry needed while that stylesheet downloads
 * asynchronously. Route-specific CSS (for example home.css) remains the
 * source of truth for page content.
 */

/* Accessibility primitives used before the full stylesheet is available. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #123766;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.24);
  transform: translateY(-180%);
}

.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid rgba(33, 103, 221, 0.55);
  outline-offset: 2px;
}

.main-content-skip-target {
  display: block;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Header: keep its final dimensions so the catalog hero does not move. */
.header {
  position: sticky;
  top: 0;
  z-index: 10000;
  width: 100%;
  padding: 12px 0;
  backdrop-filter: blur(15px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  position: relative;
  display: grid;
  flex: 0 0 auto;
}

.header__logo img {
  grid-area: 1 / 1;
  display: block;
  width: auto;
  height: 48px;
}

.header__logo-image--inverse {
  visibility: hidden;
  opacity: 0;
}

#js-header.header--inverse .header__logo-image--default {
  visibility: hidden;
  opacity: 0;
}

#js-header.header--inverse .header__logo-image--inverse {
  visibility: visible;
  opacity: 1;
}

#js-header.header--inverse :is(
  .nav__link,
  .nav__icon-btn,
  .design-trigger,
  .product-mega__toggle,
  .knowledge-mega__toggle
) {
  color: rgba(255, 255, 255, 0.82);
}

#js-header.header--inverse :is(.nav__link.active, .nav__link:focus-visible) {
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: auto;
  margin-right: 40px;
  z-index: 999999;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--gray-600);
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
}

.nav__link.active {
  color: var(--brand-color-1);
}

.nav__link-icon,
.nav__link .js-svg-inject {
  display: block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.product-mega-nav-trigger,
.knowledge-nav-trigger {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.product-mega__toggle,
.knowledge-mega__toggle {
  display: none;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-search,
.header-account,
.header-design-module {
  position: relative;
}

.header-design-module {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.nav__icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 34px;
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--gray-600);
  text-decoration: none;
}

.nav__icon-btn .js-svg-inject,
.nav__icon-btn svg {
  display: block;
  width: 24px;
  height: 24px;
}

.design-trigger {
  width: 38px;
  height: 38px;
  border-radius: 50%;
}

.beta-ping-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--brand-color-2);
}

.nav__cart-badge {
  position: absolute;
  top: -6px;
  left: 22px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 2px solid var(--white);
  border-radius: 50px;
  background: var(--red-700);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.header__burger {
  display: none;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: transparent;
  color: var(--brand-color-1);
}

.header__burger .js-svg-inject,
.header__burger svg {
  display: block;
  width: 26px;
  height: 26px;
}

/* These large, interactive regions must not enter normal flow before style.css. */
.mega-menu-wrapper,
.knowledge-mega {
  position: absolute;
  left: -9999px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.account-popup,
.site-search-popup {
  position: absolute;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.design-dropdown {
  display: none;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.mobile-menu-overlay.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-header {
  display: none;
}

/* Breadcrumb geometry is visible directly above the LCP hero. */
.breadcrumb-nav {
  padding: 2rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumb li {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 1.6rem;
  font-weight: var(--font-weight-regular);
  line-height: 1.45;
  white-space: nowrap;
}

.breadcrumb li a {
  color: inherit;
  text-decoration: none;
}

.breadcrumb li.separator {
  color: var(--color-text-placeholder);
  font-size: 1.4rem;
}

.breadcrumb li.active,
.breadcrumb li.active > span {
  color: var(--color-primary-strong);
  font-weight: var(--font-weight-semibold);
}

@media (min-width: 769px) and (max-width: 1199px) {
  .header {
    padding: 10px 0;
  }

  .header__logo img {
    height: 42px !important;
  }

  .nav {
    margin-right: 18px;
  }

  .nav__list {
    gap: 18px;
  }

  .nav__link {
    gap: 6px;
    font-size: 1.35rem;
  }

  .header__actions {
    gap: 8px;
  }
}

@media (max-width: 991.98px) {
  .header-design-module {
    display: none;
  }

  .nav {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    margin: 0;
    overflow: hidden;
    transform: translateX(-100%);
    background: var(--white);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.08);
  }

  .nav.is-active {
    transform: translateX(0);
  }

  .mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-bottom: 1px solid var(--blue-100);
  }

  .nav__body {
    flex: 1;
    width: 100%;
    padding: 20px 15px;
    overflow-y: auto;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }

  .nav__list li {
    display: block;
    width: 100%;
  }

  .nav__link {
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
    padding: 14px 20px;
    border-radius: var(--border-radius-lg);
    font-size: 1.6rem;
    font-weight: 500;
  }

  .header__burger {
    display: block;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 8px 0;
  }

  .header .container {
    gap: 8px;
    padding: 0 15px;
  }

  .header__actions {
    gap: 6px;
  }

  .header__logo img {
    height: 38px !important;
  }

  .breadcrumb-nav {
    padding: 1.6rem 0;
  }

  .breadcrumb li {
    font-size: 1.32rem;
  }
}

@media (min-width: 769px) and (max-width: 991.98px) {
  .header {
    padding: 8px 0;
  }

  .header .container {
    gap: 8px;
    padding: 0 16px;
  }

  .header__actions {
    gap: 6px;
  }

  .header__logo img {
    height: 40px !important;
  }
}

@media (max-width: 420px) {
  .header .container {
    padding: 0 12px;
  }

  .header__actions {
    gap: 4px;
  }

  .header__logo img {
    height: 36px !important;
  }

  .header__burger {
    padding: 5px;
  }
}
