/* =====================================================================
   website-template — anti-theft.css
   铁律 ④：Image Anti-Theft Protection — CSS 层
   与 anti-theft.js 配合，构建 4 层防御：
     1) user-select: none    — 阻止文本被选中复制
     2) -webkit-user-drag    — 阻止图片拖拽到桌面
     3) pointer-events       — 关键图片用透明 Overlay 拦截右键另存
     4) filter / blur fallback — JS 失效时仍能降低图片可用性
   ===================================================================== */

*, *::before, *::after {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* 允许用户在表单中输入 */
input, textarea, select, [contenteditable="true"] {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* 所有 <img> 默认不可拖拽 */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

/* 关键高精图：背景图容器（已在 main.css 演示 .media-protected）
   再加一层柔和的视觉干扰，JS 失效时仍能降低截图清晰度 */
.media-protected {
  position: relative;
  isolation: isolate;
}
.media-protected::before {
  content: '';
  position: absolute; inset: 0;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: contrast(1.05) saturate(1.05);
  z-index: -1;
}
.media-protected::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, transparent 55%, rgba(255, 122, 0, 0.10) 100%),
    repeating-linear-gradient(45deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 2px,
      transparent 2px,
      transparent 6px);
  pointer-events: auto;
  cursor: default;
}

/* 装饰性占位：保护层覆盖在产品图之上 */
.product-media { position: relative; }
.product-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 10, 11, 0.55));
  pointer-events: auto;
  border-radius: inherit;
}

/* 打印保护：禁止通过浏览器打印带走内容 */
@media print {
  body { display: none !important; }
}