/* Final mobile storefront stability layer. Presentation only. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 98;
  background: rgba(20, 12, 8, .54);
  backdrop-filter: blur(2px);
}

.mobile-nav-backdrop[hidden] {
  display: none;
}

body.mobile-nav-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .site-header {
    position: sticky !important;
    top: 0;
    z-index: 100 !important;
  }

  .site-header .header-main,
  body:has(#home.active) .site-header .header-main,
  body:has(#catalog.active) .site-header .header-main,
  body:has(#product.active) .site-header .header-main {
    position: relative;
    grid-template-columns: 44px 42px minmax(38px, 1fr) auto;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .mobile-menu-toggle {
    position: relative;
    z-index: 104;
    display: inline-grid !important;
    place-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    touch-action: manipulation;
  }

  .mobile-menu-toggle span {
    width: 20px;
    margin: 3px auto;
    transition: transform .18s ease, opacity .18s ease;
  }

  .mobile-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .brand-button {
    min-width: 42px;
    min-height: 44px;
  }

  .brand-button img {
    width: 38px;
    height: 38px;
  }

  .header-search {
    min-width: 38px;
    max-width: 100%;
  }

  .header-actions {
    min-width: 0;
    gap: 2px;
  }

  .header-action,
  body:has(#home.active) .header-action,
  body:has(#catalog.active) .header-action,
  body:has(#product.active) .header-action {
    min-width: 44px !important;
    width: 44px !important;
    min-height: 44px;
    height: 44px !important;
    padding: 5px;
    touch-action: manipulation;
  }

  #dealerLoginOpen:not([hidden]) {
    display: grid !important;
  }

  .primary-nav,
  body:has(#home.active) .primary-nav,
  body:has(#catalog.active) .primary-nav,
  body:has(#product.active) .primary-nav,
  body:not(:has(#home.active)) .primary-nav {
    display: none !important;
  }

  .primary-nav.is-open,
  body:has(#home.active) .primary-nav.is-open,
  body:has(#catalog.active) .primary-nav.is-open,
  body:has(#product.active) .primary-nav.is-open,
  body:not(:has(#home.active)) .primary-nav.is-open {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    z-index: 103;
    display: block !important;
    width: 100%;
    max-height: calc(100dvh - 58px);
    padding: 8px 12px 14px;
    overflow-y: auto;
    border-top: 1px solid rgba(239, 189, 103, .28);
    background: #1f1712;
    box-shadow: 0 16px 30px rgba(18, 10, 6, .34);
  }

  .primary-nav.is-open .nav-inner,
  body:has(#home.active) .primary-nav.is-open .nav-inner,
  body:has(#catalog.active) .primary-nav.is-open .nav-inner,
  body:has(#product.active) .primary-nav.is-open .nav-inner {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 2px;
    padding: 0;
  }

  .primary-nav.is-open .nav-inner button {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border-radius: 7px;
    color: #fff7ec;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
    touch-action: manipulation;
  }

  .primary-nav.is-open .nav-inner button:hover,
  .primary-nav.is-open .nav-inner button:focus-visible,
  .primary-nav.is-open .nav-inner button.is-active {
    color: #f2c36f;
    background: rgba(255, 255, 255, .07);
  }

  .campaign-slider,
  .campaign-slide,
  .screen01-hero-presentation,
  .product-card,
  .card,
  .category-tile,
  dialog {
    max-width: 100%;
  }

  img,
  svg,
  video,
  iframe {
    max-width: 100%;
  }

  .dialog-close,
  .campaign-arrow,
  .quantity-input button,
  .filter-drawer-toggle {
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
  }
}

@media (max-width: 600px) {
  .brand-copy,
  body:has(#home.active) .brand-copy,
  body:has(#catalog.active) .brand-copy,
  body:has(#product.active) .brand-copy {
    display: none !important;
  }

  .site-header .header-main,
  body:has(#home.active) .site-header .header-main,
  body:has(#catalog.active) .site-header .header-main,
  body:has(#product.active) .site-header .header-main {
    grid-template-columns: 44px 38px minmax(44px, 1fr) auto;
    padding-inline: 12px;
  }

  .header-search,
  body:has(#home.active) .header-search,
  body:has(#catalog.active) .header-search,
  body:has(#product.active) .header-search {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .header-search input {
    display: none;
  }

  .header-search button,
  body:has(#home.active) .header-search button,
  body:has(#catalog.active) .header-search button,
  body:has(#product.active) .header-search button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
  }

  .product-rail,
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card,
  .product-card,
  .card-body,
  .cart-line,
  .checkout-form,
  .form-card,
  .dealer-login-dialog,
  .dealer-login-dialog form {
    min-width: 0;
  }

  .card h2,
  .product-card h2,
  .cart-line h2 {
    overflow-wrap: anywhere;
  }

  .category-showcase {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-tile {
    min-width: 0;
  }

  .category-tile strong {
    overflow-wrap: anywhere;
  }

  dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    margin: auto;
  }

  .dealer-login-dialog {
    overflow-y: auto;
  }
}

@media (max-width: 370px) {
  .site-header .header-main,
  body:has(#home.active) .site-header .header-main,
  body:has(#catalog.active) .site-header .header-main,
  body:has(#product.active) .site-header .header-main {
    grid-template-columns: 44px 36px 44px minmax(0, auto);
    gap: 4px;
    padding-inline: 8px;
  }

  .brand-button img {
    width: 34px;
    height: 34px;
  }

  .header-search,
  body:has(#home.active) .header-search,
  body:has(#catalog.active) .header-search,
  body:has(#product.active) .header-search,
  .header-search button,
  body:has(#home.active) .header-search button,
  body:has(#catalog.active) .header-search button,
  body:has(#product.active) .header-search button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .product-rail,
  .cards {
    gap: 9px;
  }
}
