/* ============================================================
   观化茶院 · 产品卡点击弹窗样式（抖音商城竖版海报）
   与品牌页同源配色：墨绿 #0F6E56 / 米白 #F1EFE8 / 墨色 #2C2C2A
   ============================================================ */

/* 打开弹窗时锁定页面滚动（JS 会补偿滚动条宽度，页面不跳动） */
html.pl-locked, html.pl-locked body { overflow: hidden !important; }

/* hidden 属性优先级最高（否则 display:flex 会覆盖 hidden） */
.pl-mask[hidden] { display: none !important; }

/* ---------- 遮罩层 ---------- */
.pl-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 4vw;
  background: rgba(16, 18, 16, .88);
  -webkit-backdrop-filter: blur(0.625rem);
  backdrop-filter: blur(0.625rem);
  opacity: 0;
  transition: opacity .24s ease;
}
.pl-mask.on { opacity: 1; }

/* ---------- 卡片容器 ---------- */
.pl-card {
  position: relative;
  width: auto;
  max-width: 92vw;
  max-height: 94vh;
  margin: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  text-align: center;
  transform: scale(.965) translateY(0.625rem);
  transition: transform .3s cubic-bezier(.2, .7, .3, 1);
}
.pl-mask.on .pl-card { transform: scale(1) translateY(0); }

.pl-media { line-height: 0; }

/* 图片：轻圆角 + 柔投影；加载完成后淡入（防半截图闪现） */
.pl-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 82vh;
  margin: 0 auto;
  border-radius: 0.875rem;
  box-shadow: 0 1.625rem 5rem rgba(0, 0, 0, .55), 0 0.375rem 1.5rem rgba(0, 0, 0, .35);
  opacity: 0;
  transition: opacity .35s ease;
}
.pl-img.ld { opacity: 1; }

/* ---------- 关闭按钮（固定视口右上，不随卡片） ---------- */
.pl-close {
  position: absolute;
  top: 1.25rem;
  right: 1.375rem;
  z-index: 2;
  width: 2.625rem;
  height: 2.625rem;
  border: 1px solid rgba(241, 239, 232, .28);
  border-radius: 50%;
  background: rgba(18, 20, 18, .55);
  color: #F1EFE8;
  font-size: 1.375rem;
  line-height: 1;
  cursor: pointer;
  -webkit-backdrop-filter: blur(0.5rem);
  backdrop-filter: blur(0.5rem);
  transition: background .2s ease, transform .25s ease;
}
.pl-close:hover { background: rgba(18, 20, 18, .9); transform: rotate(90deg); }
.pl-close:focus-visible { outline: 2px solid #5DCAA5; outline-offset: 2px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .pl-mask { padding: 2vh 3vw; }
  .pl-img { max-width: 94vw; max-height: 76vh; }
  .pl-close { top: 0.875rem; right: 0.875rem; width: 2.375rem; height: 2.375rem; font-size: 1.25rem; }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  .pl-mask, .pl-card, .pl-img { transition: none; transform: none; }
  .pl-img { opacity: 1; }
}
