/* Shared mobile polish for the public storefront. Loaded after page-level styles. */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

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

@media (max-width: 991.98px) {
  .container,
  .container-fluid {
    --bs-gutter-x: 1.5rem;
  }

  .header-mobile {
    border-bottom: 1px solid rgba(11, 27, 43, 0.08);
    box-shadow: 0 6px 22px rgba(11, 27, 43, 0.08);
  }

  .header-mobile > .container {
    min-height: 3.75rem;
  }

  .header-mobile .logo {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3rem;
  }

  .header-mobile .mobile-logo__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 3.125rem;
    max-height: 2.75rem;
    object-fit: contain;
    aspect-ratio: 372 / 330;
  }

  .mobile-nav-activator,
  .header-mobile > .container > .header-tools__item {
    display: inline-flex !important;
    width: 2.75rem;
    height: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }

  .mobile-nav-activator {
    position: relative;
    border-radius: 0.5rem;
  }

  .mobile-nav-activator .btn-close-lg {
    inset: 0;
    width: 1.125rem !important;
    height: 1.125rem;
    margin: auto;
    background-size: 1.125rem auto;
  }

  .mobile-nav-activator:focus-visible {
    outline: 2px solid var(--masset-blue, #0a79be);
    outline-offset: 1px;
  }

  .header-mobile__navigation {
    overscroll-behavior: contain;
    background: #fff !important;
  }

  .mobile-menu-opened .header-mobile__navigation {
    height: calc(100dvh - 3.75rem);
    max-height: calc(100dvh - 3.75rem);
  }

  .header-mobile__navigation .navigation__link {
    min-height: 2.875rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(11, 27, 43, 0.07);
    font-weight: 500;
  }

  .header-mobile__navigation .search-field__input {
    min-height: 3rem;
    padding: 0.75rem 2.75rem 0.75rem 1rem;
    font-size: 1rem;
  }

  .main h1 {
    font-size: clamp(1.75rem, 8vw, 2.4rem);
    line-height: 1.12;
  }

  .main h2,
  .section-title {
    line-height: 1.18;
  }

  .main .btn:not(.btn-icon):not(.btn-link) {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .footer-mobile {
    left: 0;
    padding: 0.45rem 0 calc(0.35rem + env(safe-area-inset-bottom)) !important;
    border-top: 1px solid rgba(11, 27, 43, 0.1);
    box-shadow: 0 -8px 24px rgba(11, 27, 43, 0.1);
  }

  .footer-mobile__link {
    min-height: 3.25rem;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.72rem;
  }

  .footer-mobile__link svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .shop-filter-quick-grid,
  .shop-filter-advanced-grid {
    gap: 0.65rem !important;
  }

  .shop-filter-tile,
  .shop-filter-disclosure {
    min-height: 3.25rem !important;
  }

  .shop-pages {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    align-items: center;
  }

  .shop-pages > .pagination {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-content: center;
    gap: 0.15rem;
  }

  .shop-pages > .btn-link:last-child {
    justify-self: end;
  }
}

@media (max-width: 575.98px) {
  .container,
  .container-fluid {
    --bs-gutter-x: 1.25rem;
  }

  .products-grid.row {
    --bs-gutter-x: 0.65rem;
  }

  .products-grid .product-card {
    height: calc(100% - 0.75rem);
    margin-bottom: 0.75rem !important;
    padding: 0.65rem !important;
    border: 1px solid rgba(11, 27, 43, 0.08);
    box-shadow: 0 5px 16px rgba(11, 27, 43, 0.07) !important;
  }

  .products-grid .pc__img-wrapper {
    margin-bottom: 0.65rem;
  }

  .products-grid .pc__img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: contain;
  }

  .products-grid .pc__category {
    margin-bottom: 0.25rem;
    font-size: 0.68rem;
    line-height: 1.25;
  }

  .products-grid .pc__title {
    min-height: 2.5em;
    margin-bottom: 0.45rem;
    font-size: 0.86rem;
    line-height: 1.25;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .products-grid .product-card__price {
    flex-wrap: wrap;
    gap: 0.15rem 0.35rem;
  }

  .products-grid .money.price,
  .products-grid .money.price.fs-5 {
    font-size: 0.9rem !important;
    line-height: 1.25;
  }

  .products-grid .product-unit-text {
    display: block;
    font-size: 0.68rem;
  }

  .products-grid .btn_add_to_cart,
  .products-grid .btn-outline-primary {
    width: 100%;
    min-height: 2.6rem !important;
    margin-top: 0.55rem;
    padding: 0.5rem 0.6rem;
    font-size: 0.8rem;
    line-height: 1.15;
  }

  .products-grid .pc-label {
    padding: 0.3rem 0.45rem;
    font-size: 0.62rem;
  }

  .products-grid .pc-tech-badges {
    max-height: 3.4rem;
    overflow: hidden;
    gap: 0.2rem;
    padding: 0.35rem;
  }

  .products-grid .pc-tech-badge {
    padding: 0.2rem 0.35rem;
    font-size: 0.55rem;
  }

  .slideshow.type3,
  .slideshow {
    min-height: 25rem;
    height: min(31rem, 72dvh);
  }

  .slideshow-text.container {
    width: calc(100% - 1.25rem);
  }

  .slideshow-text .fs-50 {
    font-size: clamp(1.75rem, 9vw, 2.7rem) !important;
  }

  .masset-hero,
  .masset-section--surface {
    border-radius: 16px !important;
  }
}

@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
  }
}

@media (max-width: 374.98px) {
  .products-grid.row {
    --bs-gutter-x: 0.45rem;
  }

  .products-grid .product-card {
    padding: 0.5rem !important;
  }

  .products-grid .btn_add_to_cart span {
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Let the introductory slide grow when its copy wraps on phones/tablets. */
@media (max-width: 991.98px) {
  .masset-slider.masset-slider--intro,
  .masset-slider--intro > .swiper-wrapper,
  .masset-slider--intro .swiper-slide {
    height: auto;
  }

  .masset-slider--intro .slideshow-text.container {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .masset-slider--intro .slideshow-bg {
    position: absolute;
    inset: 0;
  }

  .masset-slider--intro .swiper-slide > .h-100 {
    height: auto !important;
  }
}
