/* CIFSTONE 图片防护：水印已烧入源文件，前端叠加层关闭，避免双重水印 */
.cat-product-img::after,
.product-card-img::after,
.related-card-img::after,
.specialty-card-img::after,
.product-image-main::after,
.product-thumb::after,
.featured-statue-img::after,
.statue-main-img::after,
.statue-thumb::after {
  display: none !important;
  content: none !important;
}

/* 详情页缩略图栏条件展示：0 或 1 张图片时隐藏，2 张及以上保持原样。 */
.product-thumbs:not(:has(.product-thumb ~ .product-thumb)),
.statue-thumbs:not(:has(.statue-thumb ~ .statue-thumb)) {
  display: none !important;
}

.gallery-thumbs-hidden {
  display: none !important;
}

img {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

img::selection { background: transparent; }

/* 产品主图放大查看（用户主动点击，不自动弹出） */
.product-image-main img,
.statue-main-img img { cursor: zoom-in; }
.image-zoom-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 4;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201,169,98,.55);
  border-radius: 50%;
  background: rgba(16,16,16,.82);
  color: #c9a962;
  font-size: 20px;
  line-height: 1;
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}
.image-zoom-btn:hover,
.image-zoom-btn:focus-visible { background: #c9a962; color: #151515; outline: none; }
.image-zoom-modal {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 52px 18px 72px;
  background: rgba(6,6,6,.94);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.image-zoom-modal.is-open { display: flex; }
.image-zoom-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
}
.image-zoom-modal img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform-origin: center center;
  cursor: grab;
  will-change: transform;
  box-shadow: 0 12px 60px rgba(0,0,0,.55);
}
.image-zoom-modal img:active { cursor: grabbing; }
.image-zoom-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 14px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 50%;
  background: rgba(20,20,20,.8);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.image-zoom-tools {
  position: absolute;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(18,18,18,.88);
}
.image-zoom-tools button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px;
  color: #f5f5f5;
  background: rgba(255,255,255,.06);
  font-size: 18px;
}
.image-zoom-tools button:hover { border-color: #c9a962; color: #c9a962; }
.image-zoom-level { min-width: 52px; text-align: center; color: #c9a962; font: 500 12px/1 Inter,sans-serif; }
.image-zoom-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: max(60px, calc(56px + env(safe-area-inset-bottom)));
  text-align: center;
  color: #aaa;
  font: 400 12px/1.4 Inter,sans-serif;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px) {
  .image-zoom-modal { padding: 44px 6px 68px; }
  .image-zoom-btn { width: 36px; height: 36px; right: 8px; bottom: 8px; font-size: 17px; }
  .image-zoom-close { top: 10px; right: 10px; width: 36px; height: 36px; }
  .image-zoom-tools { gap: 6px; }
  .image-zoom-tools button { width: 34px; height: 34px; }
  .image-zoom-level { min-width: 46px; font-size: 11px; }
}

/* ===== 全站常驻浮层：Messenger + WhatsApp 双入口，回顶按钮上移 ===== */
body.cc-banner-open .back-to-top,
body.cc-banner-open .messenger-float,
body.cc-banner-open .whatsapp-float { display: none !important; }

@media (min-width: 769px) {
  .messenger-float {
    display: flex !important;
    right: 20px !important;
    bottom: calc(88px + env(safe-area-inset-bottom)) !important;
  }
  .whatsapp-float {
    right: 20px !important;
    bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
  .back-to-top {
    right: 20px !important;
    bottom: calc(152px + env(safe-area-inset-bottom)) !important;
    width: 48px !important;
    height: 48px !important;
  }
}

@media (max-width: 768px) {
  .messenger-float {
    display: flex !important;
    right: 10px !important;
    bottom: calc(64px + env(safe-area-inset-bottom)) !important;
  }
  .messenger-float-btn { width: 44px !important; height: 44px !important; }
  .messenger-float-btn svg { width: 22px !important; height: 22px !important; }
  .messenger-float-tip { display: none !important; }
  .whatsapp-float {
    right: 10px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  }
  .whatsapp-float-btn { width: 44px !important; height: 44px !important; }
  .whatsapp-float-btn svg { width: 22px !important; height: 22px !important; }
  .whatsapp-float-tip { display: none !important; }
  .back-to-top {
    right: 10px !important;
    bottom: calc(116px + env(safe-area-inset-bottom)) !important;
    width: 40px !important;
    height: 40px !important;
  }
  .back-to-top svg { width: 18px !important; height: 18px !important; }
}
/* 放大按钮放右上角，避免与右下角 WhatsApp/回顶按钮重叠 */
.image-zoom-btn { top: 12px !important; bottom: auto !important; right: 12px !important; }
@media (max-width: 640px) {
  .image-zoom-btn { top: 8px !important; right: 8px !important; }
}

/* 页脚进入视口时收起浮动入口，避免遮挡 Cookie 设置与法律链接 */
body.footer-in-view .back-to-top,
body.footer-in-view .messenger-float,
body.footer-in-view .whatsapp-float { display: none !important; }

/* 产品图统一左上角锚点：列表/详情/相关推荐在 cover 裁切时保留左上水印 */
.cat-product-img img,
.product-card-img img,
.related-card-img img,
.specialty-card-img img,
.product-image-main img,
.statue-main-img img,
.image-zoom-modal img {
  object-position: left top;
}
