/* Tablet shop sizing, including pointer-equipped minis and Responsive mode.
   Short phone landscape viewports and full-width desktop mouse layouts retain
   their previous styles. Larger tablet widths still require touch input. */
@media (min-width:700px) and (max-width:1199.98px) and (min-height:600px), (min-width:1200px) and (max-width:1536px) and (min-height:600px) and (hover:none) and (pointer:coarse) {
  body #content-container {
    width:100%!important;max-width:100%!important;padding-inline:20px!important;
  }
  body #content-container .filter-sidebar {display:none!important;}
  body #content-container .shop-mobile-filters {display:block!important;width:100%!important;flex:0 0 100%!important;}
  body #content-container .shop-results-column {width:100%!important;max-width:100%!important;flex:0 0 100%!important;}
  body #productGrid .product-card {padding:20px!important;}
  body #productGrid .product-flex {gap:24px!important;}
  body #productGrid .product-flex > .media-container {
    flex:0 0 clamp(210px,32%,320px)!important;
    width:clamp(210px,32%,320px)!important;max-width:40%!important;
    height:auto!important;min-height:0!important;align-self:flex-start!important;
  }
  body #productGrid .product-flex > .media-container > a {
    position:relative!important;inset:auto!important;width:100%!important;
    height:auto!important;margin:0 0 52px!important;overflow:hidden!important;
  }
  body #productGrid .media-container > a > img.product-image {
    width:100%!important;height:260px!important;min-height:0!important;max-height:none!important;
    object-fit:contain!important;object-position:center!important;
  }
  body #productGrid .media-container > a::after {display:none!important;}
  body #productGrid .media-container .shop-card-share {
    top:auto!important;bottom:0!important;left:0!important;width:100%!important;
    height:40px!important;min-height:40px!important;
  }
  body #productGrid .shop-initial-card .media-container {overflow:visible!important;}
  body #productGrid .shop-initial-card .media-container > a {margin-bottom:0!important;}
}

/* Tablet homepage photo repair only: keep the original card layout, but prevent
   inherited percentage height limits and the decorative fade from covering it. */
@media (min-width:700px) and (max-width:1199.98px) and (min-height:600px), (min-width:1200px) and (max-width:1536px) and (min-height:600px) and (hover:none) and (pointer:coarse) {
  body .home-products-column .card-link > .card.home-product-card > img.card-img-top {
    grid-row:1;height:190px!important;min-height:0!important;max-height:none!important;
    width:100%!important;max-width:100%!important;object-fit:contain!important;
    object-position:center!important;align-self:start;position:relative!important;
    inset:auto!important;transform:none!important;margin:0!important;
  }
  body .home-products-column .card-link > .card.home-product-card::after {display:none!important;}
}
/* Keep the expanded custom-product chooser inside touch-tablet gutters. */
@media (min-width:700px) and (max-width:1199.98px) and (min-height:600px), (min-width:1200px) and (max-width:1536px) and (min-height:600px) and (hover:none) and (pointer:coarse) {
  body .shop-custom-designs {
    width:calc(100% - 40px)!important;max-width:1402px!important;min-width:0;
    margin-inline:auto!important;box-sizing:border-box;flex-direction:column;align-items:stretch;
  }
  body .shop-custom-designs > div {min-width:0;max-width:100%;}
  body .shop-custom-designs .shop-custom-toggle {min-width:0;max-width:100%;white-space:normal;}
  body .shop-custom-designs .shop-custom-toggle .bi {flex:0 0 20px;}
  body .shop-custom-designs .shop-custom-links {
    width:100%!important;max-width:100%!important;min-width:0;flex-shrink:1;
  }
  body .shop-custom-designs .shop-custom-links > a {
    display:grid;grid-template-columns:64px minmax(0,1fr) 20px;align-items:center;gap:16px;
    width:100%;max-width:100%;min-width:0;box-sizing:border-box;
  }
  body .shop-custom-designs .shop-custom-links > a > span {min-width:0;overflow-wrap:anywhere;}
  body .shop-custom-designs .shop-custom-links > a > .shop-custom-product-photo {width:64px;height:64px;max-width:100%;}
}
/* Responsive preview and pointer-equipped minis use the same custom chooser. */
@media (min-width:700px) and (max-width:1199.98px) and (min-height:600px), (min-width:1200px) and (max-width:1536px) and (min-height:600px) and (hover:none) and (pointer:coarse) {
  body .shop-custom-designs .shop-custom-desktop-title {display:none!important;}
  body .shop-custom-designs .shop-custom-toggle {display:flex!important;align-items:center;justify-content:space-between;}
  body .shop-custom-designs .shop-custom-links {display:none;}
  body .shop-custom-designs.is-expanded .shop-custom-links {display:flex;flex-direction:column;}
}
