/* MHV V19: shared final stylesheet for storefront. Phone & tablet share HTML.
   Keep legacy desktop fallback separate; no change to canonical URLs. */
:root {
  --mhv-device-max: 1180px;
  --mhv-device-gap: 12px;
}
.mhv-app,.mhv-phone,.mhv-member-app,.mhv-contact-app {
  width: 100%;
  max-width: 1180px;
  max-width: var(--mhv-device-max);
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}
.mhv-app .mhv-bottom-nav,.mhv-phone .mhv-bottom,.mhv-member-app .mhv-member-bottom,.mhv-contact-app .mhv-contact-bottom {
  width: 100%;
  max-width: 1180px;
  max-width: var(--mhv-device-max);
  margin-left: auto;
  margin-right: auto;
}
.mhv-app .mhv-main,.mhv-contact-app .mhv-contact-main { min-width: 0; }
.mhv-app .mhv-search input { min-width: 0; }
.mhv-app .mhv-category-grid,.mhv-app .mhv-product-grid {
  grid-template-columns: repeat(2,minmax(0,1fr));
}
.mhv-app .mhv-category-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.mhv-app .mhv-product-grid > * { min-width: 0; }
.mhv-app .mhv-product-img img,.mhv-app .mhv-detail-img img,
.mhv-contact-app img,.mhv-member-app img,.mhv-phone img { max-width: 100%; }
.mhv-app .mhv-pdp-description,.mhv-app .mhv-seo-related,.mhv-contact-app .mhv-consultation {
  overflow-wrap: break-word;
  min-width: 0;
}
.mhv-app .mhv-pdp-description img,.mhv-app .mhv-pdp-description iframe,
.mhv-app .mhv-pdp-description table { max-width: 100%; }
.mhv-app .mhv-pdp-description img { height: auto; }
.mhv-phone input,.mhv-phone select,.mhv-phone textarea,
.mhv-member-app input,.mhv-member-app select,.mhv-member-app textarea { max-width: 100%; }

/* One tablet adaptation, no per-device resolutions. */
@media (min-width: 600px) {
  .mhv-app .mhv-main { padding-left: 20px; padding-right: 20px; }
  .mhv-app .mhv-product-grid,
  .mhv-app .mhv-product-grid.mhv-category-grid-mobile-v16 {
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-template-columns: repeat(auto-fill,minmax(172px,1fr));
    gap: 14px;
  }
  .mhv-app .mhv-category-grid {
    grid-template-columns: repeat(auto-fit,minmax(100px,1fr));
  }
  .mhv-app .mhvbl-product-grid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-template-columns: repeat(auto-fill,minmax(172px,1fr));
  }
  .mhv-app .mhvbl-feature-grid {
    grid-template-columns: repeat(auto-fit,minmax(190px,1fr));
  }
  /* Tablet uses the same collapsible filter as the phone, not a PC sidebar. */
  .mhv-app .mhvbl-catalog { grid-template-columns: minmax(0,1fr); }
  .mhv-app .mhvbl-category-chips { display:flex; overflow-x:auto; flex-wrap:nowrap; }
  .mhv-app .mhvbl-category-chips a { flex:0 0 auto; white-space:nowrap; }
  .mhv-app .mhv-pdp-mobile .mhv-detail-img { max-width: 480px; margin-left: auto; margin-right: auto; }
  /* Forms stay readable instead of stretching controls across the tablet. */
  .mhv-phone,.mhv-member-app { max-width: 760px; }
  .mhv-phone .mhv-bottom,.mhv-member-app .mhv-member-bottom { max-width: 760px; }
}

/* Visible keyboard focus even when a legacy reset disables outlines. */
.mhv-app a:focus-visible,.mhv-app button:focus-visible,
.mhv-phone a:focus-visible,.mhv-phone button:focus-visible,
.mhv-member-app a:focus-visible,.mhv-contact-app a:focus-visible {
  outline: 2px solid #187569;
  outline-offset: 2px;
}
