/* Shared Cloud White header and mobile storefront shell. */
body.wg-storefront-mobile.wg-responsive-shell {
  @media (min-width: 1024px) {
    & #Header { --wg-header-photo-position: calc(50% + min(9vw, 108px)) calc(53% + 12px); }

    & #Header::before {
      background-size: cover, 88% auto;
      mask-image: linear-gradient(90deg, transparent 28%, #000a 49%, #000 65%, #000 94%, #000c);
    }

    &.wg-store-product #SideVehicleSelector {
      display: none;
    }
  }

  @media (max-width: 1023px) {
    & {
      --shell-header-photo: url("../images/wg-header-speedometer.webp");
      --shell-header-photo-x: 56%;
      --shell-header-photo-y: 47%;
      --shell-header-photo-size: cover;
      font-family: "Whitegauges DM Sans", "DM Sans", system-ui, sans-serif;
    }

    & #Header {
      grid-template-columns: minmax(0, 1fr) auto;
      min-height: 0;
      height: auto;
      padding: 10px 12px;
      border-bottom: 3px solid var(--shell-orange);
      background: var(--shell-ink);
    }

    & #Header::before,
    & #Header::after {
      display: none;
    }

    & #Header > :is(#Logo, #SearchForm) {
      float: none;
      grid-column: 1 / -1;
      width: auto;
      min-width: 0;
      height: auto;
      margin: 0;
      padding: 0;
    }

    & #Logo > a {
      width: 100%;
      transform: none;
    }

    & #Logo img#LogoImage {
      display: block;
      width: 85%;
      height: auto;
      margin: 0;
      filter:
        drop-shadow(1.5px 0 0 var(--shell-ink))
        drop-shadow(-1.5px 0 0 var(--shell-ink))
        drop-shadow(0 1.5px 0 var(--shell-ink))
        drop-shadow(0 -1.5px 0 var(--shell-ink))
        drop-shadow(0 0 5px var(--shell-ink));
    }

    & #Header > #SearchForm {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 4px 8px;
    }

    & #SearchForm > form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      width: 100%;
      min-width: 0;
      gap: 7px;
    }

    & #SearchForm input#search_query {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      height: 44px;
      padding: 8px 11px;
      font-size: 16px;
    }

    & #SearchForm .wg-header-search-button {
      min-height: 44px;
      padding: 0 14px;
      border: 0;
      border-radius: 6px;
      background: var(--shell-blue);
      color: #fff;
      font: 700 14px/1 system-ui, sans-serif;
    }

    & #Menu > ul,
    & #Menu > ul > li > ul:not(.wg-shell-collapsed) {
      display: block;
    }

    & #Menu > ul > li > a {
      min-height: 44px;
      white-space: normal;
    }

    & #Wrapper {
      display: block;
      width: 100%;
      min-width: 0;
    }

    & #Wrapper > :is(#LayoutColumn1, #LayoutColumn2, #LayoutColumn3) {
      position: static;
      box-sizing: border-box;
      float: none;
      width: auto;
      min-width: 0;
      max-width: 100%;
      height: auto;
      margin: 0;
    }

    & #LayoutColumn1 :is(#SideVehicleSelector, #SideCategoryList) {
      margin: 10px 0 0;
      padding: 0;
      border: 0;
      background: none;
      box-shadow: none;
    }

    & #LayoutColumn1 #SideVehicleSelector > h2 {
      display: block;
      margin: 0 0 8px;
      padding: 0;
      border: 0;
      background: none;
      color: var(--shell-ink);
      font-size: 15px;
    }

    & #LayoutColumn1 #SideVehicleSelector > h2::before { content: none; }

    & #LayoutColumn1 :is(#SideVehicleSelector, #SideCategoryList) > .BlockContent {
      margin: 0;
      padding: 0;
    }

    & #LayoutColumn1 #VehicleSelectForm select { max-width: none; }

    & #Wrapper > #LayoutColumn2 {
      min-height: 0 !important;
      padding: 12px 14px;
    }

    & #Wrapper > #LayoutColumn3 {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr));
      align-items: start;
      gap: 8px;
      padding: 0 14px 12px;
      border: 0;
      background: none;
    }

    &:has(#HomeSliderAndAbout) #Wrapper > #LayoutColumn3 { display: none; }

    & #LayoutColumn3 > .Block {
      width: auto;
      min-width: 0;
      margin: 0;
    }

    & #LayoutColumn3 .ProductList > li {
      box-sizing: border-box;
      width: 100%;
    }

    &.wg-store-product #LayoutColumn3 > #SideCartContents,
    &.wg-store-product:has(#Header .wg-mobile-wishlist) #LayoutColumn3 > #SideProductAddToWishList { display: none; }

    &.wg-store-product #SideProductRecentlyViewed {
      grid-column: 1 / -1;

      & .ProductList > li {
        display: flex;
        align-items: center;
        height: auto;
        padding: 10px;
        text-align: start;
      }

      & .ProductImage {
        display: grid;
        place-items: center;
        flex: 0 0 clamp(64px, 20vw, 96px);
        width: auto;
        height: auto;
        margin: 0 12px 0 0;
      }

      & .ProductImage img { max-width: 100%; height: auto; }

      & .ProductDetails {
        flex: 1;
        min-width: 0;
        min-height: 0;
        width: auto;
        margin: 0;
        padding: 0;
        overflow-wrap: anywhere;
      }
    }

    &.wg-store-product #Header .wg-mobile-wishlist {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      min-width: 44px;
      min-height: 44px;
      padding: 0 5px;
      border: 0;
      background: none;
      color: #e2ecf3;
      font: inherit;
      font-size: 14px;
      font-weight: 700;
      white-space: nowrap;
      cursor: pointer;
    }


    & #LayoutColumn2 :is(#HomeFeaturedProducts, #HomeNewProducts) .ProductList {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(min(45%, 144px), 1fr));
      gap: 8px;
    }

    & #LayoutColumn2 :is(#HomeFeaturedProducts, #HomeNewProducts) .ProductList > li {
      display: flex;
      flex-direction: column;
      float: none;
      width: auto;
      min-width: 0;
      min-height: 0;
      height: auto !important;
      margin: 0;
    }

    & #LayoutColumn2 :is(#HomeFeaturedProducts, #HomeNewProducts) :is(.ProductImage, .ProductDetails) {
      box-sizing: border-box;
      float: none;
      width: 100%;
      min-width: 0;
    }

    & #LayoutColumn2 :is(#HomeFeaturedProducts, #HomeNewProducts) .ProductDetails {
      flex: 1 0 auto;
      min-height: 0;
      height: auto !important;
      overflow-wrap: anywhere;
    }

  }

  @media (max-width: 480px) {
    &.wg-store-product #Header .wg-shell-header-actions {
      grid-column: 1 / -1;
      justify-content: center;
    }

    &.wg-store-product #Header .wg-shell-store-toggle {
      grid-column: 1 / -1;
      grid-row: 3;
    }

    & #HomeSliderAndAbout .wg-fitment-lead {
      grid-template-columns: minmax(0, 1fr);
      gap: 0;
      padding-bottom: 10px;
    }

    & #HomeSliderAndAbout .wg-fitment-copy {
      border-right: 0;
    }

    & #HomeSliderAndAbout .wg-fitment-lead > img {
      box-sizing: border-box;
      width: calc(100% - 30px);
      height: 148px;
      object-fit: cover;
      object-position: 50% 51%;
    }
  }
}
