/* Fluid sizing across phone, tablet, and resizable desktop windows. */
html, body { max-width: 100%; }
body { overflow-x: clip; }
img, video, iframe { max-width: 100%; }
.bs-info-grid > *, .training-grid > *, .licence-info-grid > *,
.ptcfor-container > *, .gallery-container > *, .product-details > * { min-width: 0; }
.bs-info-card, .mobile-promo-card, .featured-card, .category-card {
  overflow-wrap: break-word;
}

/* The shop's former 104vw bleed enlarged and clipped its banner on resize. */
.bs-shop-theme .image-banner.banner-carousel {
  box-sizing: border-box;
  left: auto !important;
  transform: none !important;
  width: min(1400px, 100%) !important;
  max-width: 100% !important;
  margin-inline: auto !important;
  overflow: hidden;
}
.bs-shop-theme .image-banner.banner-carousel .banner-carousel-track,
.bs-shop-theme .image-banner.banner-carousel .banner-slide {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
}
.bs-shop-theme .image-banner.banner-carousel .banner-slide {
  margin-left: 0 !important;
  height: auto !important;
  object-fit: contain !important;
}

/* Keep authored image framing from the Media editor; its inline settings win. */
.bs-shop-theme .store-hero.banner-carousel,
.bs-shop-theme .store-hero.banner-carousel .banner-carousel-track {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
}
.bs-shop-theme .store-hero.banner-carousel .banner-slide {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
}

@media (max-width: 768px) {
  /* At 390px this remains 288px; narrower phones shrink proportionally. */
  .bs-shop-theme .category-slider-wrapper .category-grid {
    --category-tile-width: clamp(190px, 74vw, 288px);
    grid-auto-columns: var(--category-tile-width) !important;
    grid-template-rows: repeat(2, calc(var(--category-tile-width) / 2.4)) !important;
  }
  .bs-shop-theme .category-slider-wrapper .category-card {
    width: var(--category-tile-width) !important;
    min-width: var(--category-tile-width) !important;
    height: calc(var(--category-tile-width) / 2.4) !important;
    min-height: 0 !important;
  }
  .bs-shop-theme .image-banner.banner-carousel { margin-block: 24px !important; }
  .bs-shop-theme .mobile-promo-card { height: clamp(205px, 58vw, 242px); }
  .bs-shop-theme .mobile-promo-copy { left: clamp(10px, 4vw, 18px); }
  .bs-shop-theme .mobile-promo-copy h3 { font-size: clamp(17px, 6vw, 24px); }
  .bs-home-theme .home-between-banner { width: min(100% - 30px, 463px); }
}

/* The prior layout switched straight from mobile to 1024px desktop. */
@media (min-width: 769px) and (max-width: 1023px) {
  .bs-shop-theme .store-section,
  .bs-shop-theme .featured-products-section,
  .bs-shop-theme .mobile-shop-extras {
    box-sizing: border-box;
    width: min(100% - 48px, 920px);
    margin-inline: auto !important;
  }
  .bs-shop-theme .category-slider-wrapper,
  .bs-shop-theme .featured-slider-wrapper { overflow: visible; }
  .bs-shop-theme .category-slider-wrapper .category-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-columns: auto !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    height: auto !important;
    gap: 14px !important;
    overflow: visible !important;
  }
  .bs-shop-theme .category-slider-wrapper .category-card {
    box-sizing: border-box;
    width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    aspect-ratio: 2.4 / 1 !important;
  }
  .bs-shop-theme .featured-slider-wrapper .featured-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-columns: auto !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    gap: 16px !important;
    overflow: visible !important;
  }
  .bs-shop-theme .featured-card-link,
  .bs-shop-theme .featured-card { box-sizing: border-box; width: 100% !important; min-width: 0 !important; }
  .bs-shop-theme .category-slider-wrapper .bs-scroll-indicator,
  .bs-shop-theme .featured-slider-wrapper .bs-scroll-indicator { display: none !important; }
  .bs-shop-theme .mobile-shop-extras { display: block; }
  .bs-shop-theme .mobile-promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
  .bs-shop-theme .mobile-promo-card { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; border-radius: 8px; }
  .bs-shop-theme .mobile-promo-card > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .52; }
  .bs-shop-theme .mobile-promo-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(0,0,0,.83),transparent); pointer-events: none; }
  .bs-shop-theme .mobile-promo-copy { position: relative; z-index: 1; padding: 24px; }
  .bs-shop-theme .mobile-promo-copy p { font-size: 14px; color: #ddd; }
  .bs-shop-theme .mobile-promo-copy span { display: inline-block; border: 1px solid #c95d0b; padding: 9px 14px; color: #ffad67; }
  .bs-shop-theme .mobile-section-title { display: flex; align-items: center; gap: 12px; }
  .bs-shop-theme .mobile-brand-row { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
  .bs-shop-theme .mobile-brand-row .brand-tile { display: flex; align-items: center; justify-content: center; flex-direction: column; min-width: 0; min-height: 100px; text-align: center; }
  .bs-shop-theme .mobile-trust-panel { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; padding: 18px; }
  .bs-shop-theme .mobile-trust-panel > div { display: flex; align-items: start; gap: 10px; }
  .bs-shop-theme .mobile-trust-panel p { margin: 0; }
  .bs-shop-theme .mobile-trust-panel strong, .bs-shop-theme .mobile-trust-panel span { display: block; }
  .bs-shop-theme .image-banner.banner-carousel { width: calc(100% - 48px) !important; }
  .bs-shop-theme .mobile-promo-copy h3 { font-size: clamp(23px, 3vw, 30px); }
  .bs-home-theme .home-between-banner { width: min(463px, 48vw); }
}

@media (min-width: 769px) {
  .bs-shop-theme .image-banner.banner-carousel { width: min(1400px, calc(100% - 56px)) !important; }
  .bs-shop-theme .mobile-promo-card { height: clamp(225px, 24vw, 300px); }
  .bs-shop-theme .mobile-promo-copy h3 { font-size: clamp(23px, 2.6vw, 32px); }
}

@media (min-width: 1024px) {
  .bs-shop-theme .store-section,
  .bs-shop-theme .featured-products-section,
  .bs-shop-theme .mobile-shop-extras { max-width: calc(100% - 64px); }
}
