/* Miller Gadgets v1.202 — mobile product image first */

/* The product image/gallery must lead the buying flow on phones and tablets.
   Desktop keeps the two-rail product layout from v1.200. */
@media (max-width: 980px) {
  body.page-product .product-detail-grid.product-detail-grid-v39 {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
  }

  body.page-product .product-left-rail-v200,
  body.page-product .product-right-rail-v200 {
    display: contents !important;
  }

  body.page-product .product-media-card {
    order: 1 !important;
    grid-column: 1 !important;
    margin-top: 0 !important;
  }

  body.page-product .product-config-card {
    order: 2 !important;
    grid-column: 1 !important;
  }

  body.page-product .purchase-summary-card {
    order: 3 !important;
    grid-column: 1 !important;
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  body.page-product .product-family-specs-card {
    order: 4 !important;
    grid-column: 1 !important;
  }
}

@media (max-width: 560px) {
  body.page-product .product-media-card {
    scroll-margin-top: 78px;
  }

  body.page-product .product-media-card img#productImage {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}
