/* Card page, phone only (max-width 767px): the pictures full content width, swiped one by one with dots under them,
   as on Moonpig; the row of small pictures (Photo, Front, Inside, Back) is hidden. Same pictures, same order.
   Linked from inc/product_details.php for the web only (not a shop kiosk); the dots come from js/card_photos.js.
   Laptop and tablet never match these rules, so they look exactly as before (Vlad 11-27). */
.pp-dots { display: none; }
@media (max-width: 767px) {
  .product_details_wrap .product_image_wrap.pp-swipe {
    height: auto; display: flex; position: relative; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    /* a phone on its side or a small tablet: the square never taller than the screen, nor wider than 560px */
    max-width: min(100%, 560px); max-width: min(100%, 560px, 100svh - 120px); margin: 0 auto;
  }
  .product_details_wrap .product_image_wrap.pp-swipe::-webkit-scrollbar { display: none; }
  /* every picture is a square slide the width of the page's content; the inline display:none of the old tiles is overruled */
  .product_details_wrap .product_image_wrap.pp-swipe > .product_image {
    display: block !important; flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1 / 1;
    scroll-snap-align: center; scroll-snap-stop: always;
  }
  .product_details_wrap .product_image_wrap.pp-swipe > .product_image.scene { order: -1; }   /* Photo first, as its tile was */
  .product_details_wrap .product_image_wrap.pp-swipe .img_wrap.selected { height: 100%; }
  .product_details_wrap .product_image_wrap.pp-swipe img.product_img { width: 100%; height: 100%; max-width: 100%; object-fit: contain; }
  .product_details_wrap .product_image_wrap.pp-swipe img.card-scene-img { width: 100%; }
  .product_details_wrap .pp-tiles { display: none; }
  /* dots: 8px to see, 44px to tap */
  .pp-dots { display: flex; justify-content: center; margin: 0 0 8px; }
  .pp-dots button { width: 44px; height: 44px; padding: 0; margin: 0; border: 0; background: transparent; cursor: pointer;
    display: flex; align-items: center; justify-content: center; -webkit-tap-highlight-color: transparent; }
  .pp-dots button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #c9c9d1; transition: background .2s, transform .2s; }
  .pp-dots button[aria-current="true"]::before { background: #642d91; transform: scale(1.2); }
  .pp-dots button:focus-visible { outline: 3px solid #2b0b4a; outline-offset: -6px; border-radius: 50%; }
}
@media (prefers-reduced-motion: reduce) { .pp-dots button::before { transition: none; } }
