/* ================================================================
   PODPAWS PDP GALLERY — main image + horizontal thumbnail strip
   Fix: previous CSS targeted .woocommerce-product-gallery__thumbs,
   which WooCommerce never creates when flexslider is disabled.
   We style the actual .woocommerce-product-gallery__image elements.
   ================================================================ */

/* Gallery column: sticky 500px */
body.single-product .pp-pdp-gallery,
.pp-pdp .pp-pdp-gallery{
  flex:0 0 500px !important;
  max-width:500px !important;
  width:500px !important;
  float:none !important;
  margin:0 !important;
  position:sticky !important;
  top:80px !important;
  align-self:flex-start !important;
  z-index:2 !important;
  box-sizing:border-box !important;
}

/* WC Gallery container */
.pp-pdp-gallery .woocommerce-product-gallery,
body.single-product .pp-pdp-gallery > .woocommerce-product-gallery{
  width:100% !important;
  max-width:100% !important;
  float:none !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:16px !important;
  overflow:hidden !important;
  border:1px solid var(--line) !important;
  background:#f9f9f9 !important;
  box-sizing:border-box !important;
  display:flex !important;
  flex-direction:column !important;
  opacity:1 !important;
  visibility:visible !important;
}

/* Wrapper: flex row wrap so first image is full-width and rest are thumbs */
.pp-pdp-gallery .woocommerce-product-gallery__wrapper{
  width:100% !important;
  max-width:100% !important;
  display:flex !important;
  flex-direction:row !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  padding:10px 12px 12px !important;
  background:#f9f9f9 !important;
  box-sizing:border-box !important;
}

/* MAIN IMAGE — first figure, full width */
.pp-pdp-gallery .woocommerce-product-gallery__image:first-child{
  flex:1 0 100% !important;
  width:100% !important;
  max-width:100% !important;
  margin:0 !important;
  padding:14px !important;
  background:#fff !important;
  box-sizing:border-box !important;
  border-bottom:1px solid var(--line) !important;
  border-radius:0 !important;
  display:block !important;
}
.pp-pdp-gallery .woocommerce-product-gallery__image:first-child a{
  display:block !important;
  width:100% !important;
  height:100% !important;
  pointer-events:none !important;
}
.pp-pdp-gallery .woocommerce-product-gallery__image:first-child img{
  pointer-events:auto !important;
  width:100% !important;
  height:auto !important;
  max-height:500px !important;
  object-fit:contain !important;
  display:block !important;
  border-radius:10px !important;
}

/* THUMBNAILS — every figure after the first */
.pp-pdp-gallery .woocommerce-product-gallery__image:not(:first-child){
  flex:0 0 auto !important;
  width:68px !important;
  height:68px !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:8px !important;
  border:2px solid transparent !important;
  overflow:hidden !important;
  cursor:pointer !important;
  opacity:.55 !important;
  transition:opacity .15s,border-color .15s !important;
  background:#fff !important;
  box-sizing:border-box !important;
  display:block !important;
}
.pp-pdp-gallery .woocommerce-product-gallery__image:not(:first-child):hover,
.pp-pdp-gallery .woocommerce-product-gallery__image:not(:first-child).active-thumb{
  opacity:1 !important;
  border-color:var(--clay) !important;
}
.pp-pdp-gallery .woocommerce-product-gallery__image:not(:first-child) a{
  display:block !important;
  width:100% !important;
  height:100% !important;
}
.pp-pdp-gallery .woocommerce-product-gallery__image:not(:first-child) img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
  border-radius:6px !important;
}

/* Disable zoom / lightbox overlays */
.pp-pdp-gallery .zoomImg,
.pp-pdp-gallery .zoomLens{
  display:none !important;
}
.pp-pdp-gallery .woocommerce-product-gallery__image img{
  cursor:default !important;
}

/* Tablet */
@media (max-width:1024px){
  body.single-product .pp-pdp-gallery,
  .pp-pdp .pp-pdp-gallery{
    flex:0 0 420px !important;
    max-width:420px !important;
    width:420px !important;
    top:70px !important;
  }
}

/* Mobile: gallery becomes full-width, no sticky, thumbs smaller */
@media (max-width:768px){
  body.single-product .pp-pdp-gallery,
  .pp-pdp .pp-pdp-gallery{
    position:relative !important;
    top:auto !important;
    flex:1 1 100% !important;
    max-width:100% !important;
    width:100% !important;
    margin-bottom:24px !important;
  }
  .pp-pdp-gallery .woocommerce-product-gallery__image:first-child img{
    max-height:380px !important;
  }
  .pp-pdp-gallery .woocommerce-product-gallery__image:not(:first-child){
    width:60px !important;
    height:60px !important;
  }
}
