/* ==========================================================================
   MetFi Product Page - sticky gallery, 3D toggle, related grid, reviews wrapper
   ========================================================================== */

/* === STICKY GALLERY (desktop only) === */
@media (min-width: 1025px) {
  .metfi-pp-gallery {
    position: sticky;
    top: 14px;
    align-self: flex-start;
  }
}

/* === IMAGE STYLE — minimal: only rounded corners, never override sizing === */
.metfi-pp-gallery .swiper-slide-inner img,
.metfi-pp-gallery .swiper-slide img,
.metfi-pp-gallery .elementor-thumbnails-swiper img {
  border-radius: 10px;
}

/* === TOGGLE Photos / Vue 3D === */
.metfi-pp-toggle {
  display: flex;
  gap: 8px;
  margin: 0 0 12px;
  align-items: center;
  width: 100%;
}

.metfi-pp-toggle button {
  padding: 7px 14px;
  font-size: 12px;
  border: 1px solid #e6e6e6;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  color: #1a1a1a;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.metfi-pp-toggle button.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

.metfi-pp-toggle button[data-pane="3d"] { display: none; }
.metfi-pp-toggle.has-3d button[data-pane="3d"] { display: inline-flex; }

/* === Pane switching (class-based on .metfi-pp-gallery) === */
/* photos pane = the .metfi-pp-photos-target (= product-images widget) */
.metfi-pp-gallery.metfi-pp-pane-3d .metfi-pp-photos-target { display: none !important; }
/* 3D pane = the .metfi-pp-threed-target (= product-3d-viewer widget) */
.metfi-pp-gallery .metfi-pp-threed-target { display: none; }
.metfi-pp-gallery.metfi-pp-pane-3d .metfi-pp-threed-target { display: block; }

.metfi-pp-gallery .metfi-pp-threed-target model-viewer {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: #fafafa;
}

/* === Thumbnail "3D" en bout de rangée === */
.metfi-pp-thumb-3d {
  aspect-ratio: 1 / 1;
  border: 1px solid #e0e7ff;
  background: linear-gradient(135deg, #f0f4ff, #e0e7ff);
  border-radius: 10px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #3a5ad6;
}

.metfi-pp-gallery.has-3d .metfi-pp-thumb-3d {
  display: flex;
}

.metfi-pp-thumb-3d.active {
  border-color: #000;
  border-width: 2px;
}

/* === Related grid (reuse metfi-pg styles from homepage widget) === */
.metfi-pp-related {
  margin-top: 32px;
}

.metfi-pp-section-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #222;
  margin: 0 0 14px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.metfi-pp-related .metfi-pg .product-miniature {
  border-radius: 10px;
  overflow: hidden;
}

.metfi-pp-related .metfi-pg .thumbnail-top {
  background: #fafafa;
  border-radius: 10px 10px 0 0;
}

.metfi-pp-related .metfi-pg .thumbnail-top img,
.metfi-pp-related .metfi-pg .product-thumbnail img {
  object-fit: contain;
}

/* Hide flags + quick view + variant chips + wishlist (consistent with home) */
.metfi-pp-related .metfi-pg .quick-view,
.metfi-pp-related .metfi-pg .product-flags,
.metfi-pp-related .metfi-pg .highlighted-informations,
.metfi-pp-related .metfi-pg .variant-links,
.metfi-pp-related .metfi-pg .wishlist-button,
.metfi-pp-related .metfi-pg .wishlist-button-add,
.metfi-pp-related .metfi-pg .wishlist-button-product {
  display: none !important;
}

/* === Reviews wrapper === */
.metfi-pp-reviews {
  background: #fafafa;
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 32px;
}

.metfi-pp-reviews #product-comments-list-header {
  border-bottom: 1px solid #e6e6e6;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

/* === Description block in-page (no tabs) === */
.metfi-pp-desc {
  margin-top: 32px;
  font-size: 14px;
  line-height: 1.65;
  color: #333;
}

.metfi-pp-desc img {
  max-width: 100%;
  border-radius: 10px;
  margin: 18px 0;
}

/* === Hide wishlist button on the entire product page === */
body#product .wishlist-button,
body#product .wishlist-button-add,
body#product .wishlist-button-product {
  display: none !important;
}
