/* ==========================================================================
   PRODUCT PAGE LAYOUT FIX (PRESERVES DESKTOP FLEX & MOBILE STACKING)
   ========================================================================== */
div[id^="product-"].product.type-product,
div.product.woocommerce {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  width: 100% !important;
  
}

div[id^="product-"].product.type-product .product-gallery,
div.product.woocommerce .product-gallery {
  max-width: 500px !important;
  min-width: 320px !important;
  width: 100% !important;
  height: 540px !important;
  float: none !important;
  margin: 0 !important;
 
  
}



div[id^="product-"].product.type-product .summary.entry-summary,
div.product.woocommerce .summary.entry-summary {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 260px !important;
  float: none !important;
  margin: 0 !important;
}

/* ==========================================================================
   1. INLINE PRODUCT GALLERY & ARROWS
   ========================================================================== */
.product-gallery {
  display: flex !important;
  gap: 16px !important;
  position: relative !important;
}

.product-gallery__thumbs {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  width: 58px !important;
  flex-shrink: 0 !important;
}

.product-gallery__thumb {
  width: 58px !important;
  height: 64px !important;
  border-radius: 8px !important;
  border: 2px solid #e0e0e0 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  background: #ffffff !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: border-color 0.2s ease !important;
}

.product-gallery__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.product-gallery__thumb.is-active {
  border-color: var(--color-primary) !important;
}

.product-gallery__main {
  position: relative !important;
  width: 100% !important;
  max-width: 500px !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  background: #ffffff !important;
  border: 1px solid #eeeeee !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

.product-gallery__slides {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
}

.product-gallery__slide {
  position: absolute !important;
  inset: 0 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
}

.product-gallery__slide.is-active {
  display: flex !important;
}

.product-gallery__zoom-wrap {
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  cursor: zoom-in !important;
  position: relative !important;
}

.product-gallery__zoom-wrap img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  transition: transform 0.15s ease-out !important;
  pointer-events: none !important;
}

.product-gallery__video,
.product-gallery__video-embed {
  width: 100% !important;
  height: 100% !important;
  border: none !important;
}

/* Inline Navigation Arrows - Always Visible */
.product-gallery__arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: 1px solid #dddddd !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 15 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18) !important;
  opacity: 0.9 !important;
  transition: opacity 0.2s, transform 0.2s !important;
  padding: 0 !important;
}

.product-gallery__arrow:hover {
  opacity: 1 !important;
  transform: translateY(-50%) scale(1.08) !important;
}

.product-gallery__arrow--prev { left: 10px !important; }
.product-gallery__arrow--next { right: 10px !important; }

/* ==========================================================================
   2. FULLSCREEN TEMU-STYLE MODAL
   ========================================================================== */
.product-gallery-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
}

.product-gallery-modal.is-open {
  display: flex !important;
}

.product-gallery-modal__overlay {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.88) !important;
}

.product-gallery-modal__close {
  position: absolute !important;
  top: 20px !important;
  right: 24px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer !important;
  z-index: 1000005 !important;
  padding: 8px !important;
}

.product-gallery-modal__container {
  position: relative !important;
  z-index: 1000000 !important;
  display: flex !important;
  align-items: center !important;
  gap: 24px !important;
  width: 92% !important;
  max-width: 1200px !important;
  height: 82vh !important;
}

/* Modal Left Thumbnails */
.product-gallery-modal__thumbs {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  width: 80px !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  flex-shrink: 0 !important;
}

.product-gallery-modal__thumb {
  width: 72px !important;
  height: 72px !important;
  border-radius: 6px !important;
  border: 2px solid rgba(255, 255, 255, 0.3) !important;
  background: #000000 !important;
  cursor: pointer !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.product-gallery-modal__thumb.is-active {
  border-color: #ff4500 !important;
}

.product-gallery-modal__thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Modal Center Stage */
.product-gallery-modal__stage {
  flex: 1 !important;
  height: 100% !important;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.product-gallery-modal__slides {
  width: 100% !important;
  height: 100% !important;
  position: relative !important;
}

.product-gallery-modal__slide {
  position: absolute !important;
  inset: 0 !important;
  display: none !important;
  align-items: center !important;
  justify-content: center !important;
}

.product-gallery-modal__slide.is-active {
  display: flex !important;
}

.product-gallery-modal__slide img {
  max-width: 100% !important;
  max-height: calc(100% - 70px) !important;
  object-fit: contain !important;
}

/* Interactive Video & Frames in Modal */
.product-gallery-modal__slide video,
.product-gallery-modal__slide iframe {
  max-width: 100% !important;
  max-height: calc(100% - 70px) !important;
  pointer-events: auto !important;
  z-index: 10 !important;
}

/* Modal Navigation Arrows */
.product-gallery-modal__arrow {
  position: absolute !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  border: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 1000002 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
  padding: 0 !important;
}

.product-gallery-modal__arrow--prev { left: 12px !important; }
.product-gallery-modal__arrow--next { right: 12px !important; }

/* Strictly Centered Place Order Button */
.product-gallery-modal__footer {
  position: absolute !important;
  bottom: 12px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 1000003 !important;
  width: auto !important;
  text-align: center !important;
}

.product-gallery-modal__cart-btn {
  background: #ff4500 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  padding: 12px 56px !important;
  border-radius: 24px !important;
  border: none !important;
  cursor: pointer !important;
  box-shadow: 0 4px 16px rgba(255, 69, 0, 0.4) !important;
  transition: transform 0.2s, background 0.2s !important;
  white-space: nowrap !important;
}

.product-gallery-modal__cart-btn:hover {
  background: #e03d00 !important;
  transform: scale(1.03) !important;
}

/* ==========================================================================
   3. MOBILE RESPONSIVENESS
   ========================================================================== */
@media (max-width: 768px) {
  div[id^="product-"].product.type-product,
  div.product.woocommerce {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
  }

  div[id^="product-"].product.type-product .product-gallery,
  div.product.woocommerce .product-gallery {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
  }

  /* --- Inline gallery: big image on top, thumbnail strip below --- */
  .product-gallery {
    flex-direction: column-reverse !important;
    gap: 12px !important;
  }

  .product-gallery__main {
    width: 100% !important;
    max-width: 100% !important;
  }

  .product-gallery__thumbs {
    flex-direction: row !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .product-gallery__thumb {
    width: 60px !important;
    height: 60px !important;
  }

  .product-gallery__arrow {
    width: 32px !important;
    height: 32px !important;
  }
  .product-gallery__arrow--prev { left: 8px !important; }
  .product-gallery__arrow--next { right: 8px !important; }

  /* --- Fullscreen zoom modal --- */
  .product-gallery-modal__container {
    flex-direction: column-reverse !important;
    width: 96% !important;
    gap: 12px !important;
    height: 82vh !important;  /* fallback for browsers without dvh support */
    height: 82dvh !important; /* accounts for mobile browser address-bar resizing */
  }

  .product-gallery-modal__stage {
    width: 100% !important;
  }

  .product-gallery-modal__slide img,
  .product-gallery-modal__slide video,
  .product-gallery-modal__slide iframe {
    max-width: 100% !important;
    max-height: calc(100% - 60px) !important;
  }

  .product-gallery-modal__thumbs {
    flex-direction: row !important;
    width: 100% !important;
    height: 60px !important;
    max-height: 60px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .product-gallery-modal__thumb {
    width: 52px !important;
    height: 52px !important;
    flex-shrink: 0 !important;
  }

  .product-gallery-modal__arrow {
    width: 36px !important;
    height: 36px !important;
  }
  .product-gallery-modal__arrow--prev { left: 6px !important; }
  .product-gallery-modal__arrow--next { right: 6px !important; }

  .product-gallery-modal__cart-btn {
    padding: 10px 36px !important;
    font-size: 14px !important;
  }
}





/* ==========================================================================
   3. Tablet RESPONSIVENESS
   ========================================================================== */
@media (min-width: 769px) and (max-width: 1024px) {
  div[id^="product-"].product.type-product,
  div.product.woocommerce {
    display: flex !important;
    flex-direction: column !important;
    
  }

  div[id^="product-"].product.type-product .product-gallery,
  div.product.woocommerce .product-gallery {
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* --- Inline gallery: big image on top, thumbnail strip below --- */
  .product-gallery {
    gap: 12px !important;
  }

  .product-gallery__main {
    width: 80% !important;
    max-width: 80% !important;
  }

  .product-gallery__thumbs {
    flex-direction: column !important;
    width: 11% !important;
    height: 120% !important;
  }

  .product-gallery__thumb {
    width: 100% !important;
    height: 100px !important;
  }

  .product-gallery__arrow {
    width: 32px !important;
    height: 32px !important;
  }
  .product-gallery__arrow--prev { left: 8px !important; }
  .product-gallery__arrow--next { right: 8px !important; }

  /* --- Fullscreen zoom modal --- */
  .product-gallery-modal__container {
    flex-direction: column-reverse !important;
    width: 96% !important;
    gap: 12px !important;
    height: 82vh !important;  /* fallback for browsers without dvh support */
    height: 82dvh !important; /* accounts for mobile browser address-bar resizing */
  }

  .product-gallery-modal__stage {
    width: 100% !important;
  }

  .product-gallery-modal__slide img,
  .product-gallery-modal__slide video,
  .product-gallery-modal__slide iframe {
    max-width: 100% !important;
    max-height: calc(100% - 60px) !important;
  }

  .product-gallery-modal__thumbs {
    flex-direction: row !important;
    width: 100% !important;
    height: 60px !important;
    max-height: 60px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .product-gallery-modal__thumb {
    width: 52px !important;
    height: 52px !important;
    flex-shrink: 0 !important;
  }

  .product-gallery-modal__arrow {
    width: 36px !important;
    height: 36px !important;
  }
  .product-gallery-modal__arrow--prev { left: 6px !important; }
  .product-gallery-modal__arrow--next { right: 6px !important; }

  .product-gallery-modal__cart-btn {
    padding: 10px 36px !important;
    font-size: 14px !important;
  }
}




@media (max-width: 914px) {
  .summary.entry-summary {
    display: flex;
   
  
    width: 100%;
    max-width: 100%;
    
    
  }

  .summary.entry-summary > * {
    min-width: 0;
    max-width: 100%;
    
  }

  
}













.single-product div.product .summary.entry-summary {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}