/* =====================================================================
   522p.com 广告位样式  ad-slot.css  （v2 重排）
   布局原则：
   1. 广告只进「内容主栏」（840）和「侧栏」（300），不设全宽通栏位
      —— 1160 空间居中横幅显空、显孤岛，这是 v1 不协调的根源
   2. 主栏 728×90 的容器拉满栏宽，广告在容器内居中，
      视觉上是"栏内色块"，不是"悬空的条"
   3. 每种尺寸高度写死 —— 广告没加载/被拦截时留白板，CLS = 0
   4. 广告代码全部走 iframe 隔离 —— atOptions 全局变量不互相覆盖
   5. 移动端（≤768px）暂不上任何广告，整站广告位直接隐藏
   放在 style.css 之后引入
   ===================================================================== */

/* ---------- 通用容器 ---------- */
.ad-slot{
  position:relative;
  display:flex;align-items:center;justify-content:center;
  margin:16px auto;
  background:#f8f9fb;
  border-radius:6px;
  overflow:hidden;
  flex:none;
}
/* 广告未填充时显示位置标签，成功渲染后被 iframe 盖住 */
.ad-slot::before{
  content:attr(data-label);
  position:absolute;z-index:0;
  font-size:12px;color:#c9cfda;letter-spacing:.06em;
}
.ad-slot .ad-frame{position:relative;z-index:1;display:block;border:0;max-width:none;background:transparent}

/* ---------- 标准尺寸 ---------- */
.ad-728x90{width:728px;height:90px;max-width:100%}
.ad-300x250{width:300px;height:250px}
.ad-160x300{width:160px;height:300px}
.ad-160x600{width:160px;height:600px}

/* ---------- 内容主栏（840 宽）----------
   容器拉满栏宽、广告居中：728 在 840 栏里占 87%，
   看起来是栏内一个完整色块，而不是居中悬浮条 */
.main-list .ad-728x90,
.left-main  .ad-728x90{width:100%}
.main-list .ad-slot{margin:14px auto 18px}
.left-main  .ad-slot{margin:18px auto 10px}

/* ---------- 侧栏（300 宽，side-box 内宽 268）---------- */
/* .side-box 自带 16px padding，300 宽会溢出 32px，必须清零 */
.side-box.ad-box{padding:0;background:none;box-shadow:none}
.side-box.ad-box .ad-slot{margin:0 0 16px}
.right-side > .ad-slot,
.side-bar  > .ad-slot{margin:0 0 16px}
/* 竖幅 160 在 268 内宽里居中放置 */
.side-bar .ad-160x600,
.side-bar .ad-160x300{margin-left:auto;margin-right:auto}

/* ---------- 原生广告（自适应宽度，非 iframe） ---------- */
.ad-native{display:block;width:100%;min-height:320px;margin:18px auto;background:#fff}
.ad-native::before{content:none}
.ad-native > div{width:100%}

/* ---------- 平板：侧栏收到 260px，300×250 等比缩放 ---------- */
@media (max-width:1100px) and (min-width:769px){
  .right-side .ad-300x250,
  .side-bar .ad-300x250{height:215px}
  .right-side .ad-300x250 .ad-frame,
  .side-bar .ad-300x250 .ad-frame{transform:scale(.862);transform-origin:top center}
}

/* ---------- 移动端（≤768px）：暂不上广告，全部隐藏 ----------
   桌面横幅在手机上会被裁切；移动端专用尺寸以后要用，
   只需删掉这条规则并在 ads.js 里加对应位即可 */
@media (max-width:768px){
  .ad-slot,.ad-native{display:none !important}
}
