/* Instagram-inspired product-card multi-photo controls.
   Desktop: small circular, translucent chevrons over the image.
   Touch: swipe the photo; arrows stay hidden. Dots remain visible.
   Detail galleries are intentionally left alone. */

#products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count="1"] .shoe-gallery-prev,
#products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count="1"] .shoe-gallery-next,
#products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count="1"] .shoe-gallery-dots,
#products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count="1"] .shoe-gallery-count{
  display:none!important;
}

@media (hover:hover) and (pointer:fine){
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev,
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next{
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:rgba(18,24,32,.55)!important;
    color:#fff!important;
    font:400 24px/1 Arial,sans-serif!important;
    box-shadow:0 2px 8px rgba(0,0,0,.14)!important;
    opacity:.78;
    transition:opacity .16s ease,background .16s ease,transform .16s ease;
    cursor:pointer;
  }
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev{left:8px!important;}
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next{right:8px!important;}
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]):hover .shoe-gallery-prev:not([aria-hidden="true"]),
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]):hover .shoe-gallery-next:not([aria-hidden="true"]){
    opacity:.92;
    background:rgba(18,24,32,.68)!important;
  }
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev[aria-hidden="true"],
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next[aria-hidden="true"]{
    display:none!important;
  }
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-dots{
    opacity:.88;
  }
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-count{
    opacity:0;
    transition:opacity .16s ease;
  }
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]):hover .shoe-gallery-count{
    opacity:.82;
  }
}

@media (hover:none), (pointer:coarse), (max-width:760px){
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev,
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  #products .shoe-gallery:not(.shoe-gallery-detail)[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-dots{
    display:flex!important;
    opacity:.76;
    pointer-events:auto;
  }
}

@media (prefers-reduced-motion:reduce){
  #products .shoe-gallery:not(.shoe-gallery-detail) .shoe-gallery-prev,
  #products .shoe-gallery:not(.shoe-gallery-detail) .shoe-gallery-next,
  #products .shoe-gallery:not(.shoe-gallery-detail) .shoe-gallery-dots,
  #products .shoe-gallery:not(.shoe-gallery-detail) .shoe-gallery-count{transition:none!important}
}

/* Instagram-style controls for the View Product photo gallery too. */
@media (hover:hover) and (pointer:fine){
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev,
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next{
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    height:30px!important;
    min-height:30px!important;
    padding:0!important;
    border:0!important;
    border-radius:50%!important;
    background:rgba(18,24,32,.55)!important;
    color:#fff!important;
    font:400 24px/1 Arial,sans-serif!important;
    box-shadow:0 2px 8px rgba(0,0,0,.14)!important;
    opacity:.78;
    transition:opacity .16s ease,background .16s ease,transform .16s ease;
    cursor:pointer;
  }
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev{left:8px!important;}
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next{right:8px!important;}
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]):hover .shoe-gallery-prev:not([aria-hidden="true"]),
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]):hover .shoe-gallery-next:not([aria-hidden="true"]){
    opacity:.92;
    background:rgba(18,24,32,.68)!important;
  }
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev[aria-hidden="true"],
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next[aria-hidden="true"]{
    display:none!important;
  }
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-dots{
    opacity:.88;
  }
}

@media (hover:none), (pointer:coarse), (max-width:760px){
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-prev,
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-next{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  #productModal .shoe-gallery.shoe-gallery-detail[data-photo-count]:not([data-photo-count="1"]) .shoe-gallery-dots{
    display:flex!important;
    opacity:.76;
    pointer-events:auto;
  }
}

@media (prefers-reduced-motion:reduce){
  #productModal .shoe-gallery.shoe-gallery-detail .shoe-gallery-prev,
  #productModal .shoe-gallery.shoe-gallery-detail .shoe-gallery-next,
  #productModal .shoe-gallery.shoe-gallery-detail .shoe-gallery-dots{transition:none!important}
}
