/* 移植自 Go 原站 (mdgw.com) 的广告位样式: gridAdvBox / textAdv / advBanner / gridAdvPop
   图片路径已由 /static/images/ 调整为 PHP 主题 /themes/mdgw/static/images/ */

/* ---------- gridAdvBox (热门/最新/必备 网格, 含进入按钮) ---------- */
.gridAdvBox { margin: 0 16px 18px; }
.gridAdvBox .gridAdvTitle {
  padding: 0 16px; box-sizing: border-box; height: 49px;
  display: flex; align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.05);
  font-size: 18px; font-weight: 600; line-height: 24px;
}
.gridAdvList {
  padding: 20px 6px; box-sizing: border-box;
  display: flex; flex-wrap: wrap; row-gap: 12px;
  background: #212121;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.gridAdvList .advItem {
  width: 20%; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.gridAdvList .advCover { width: 56px; height: 56px; margin-bottom: 4px; border-radius: 6px; object-fit: contain; }
.gridAdvList .advName {
  font-size: 14px; line-height: 20px; color: #FAFAFA; margin-bottom: 4px;
  text-align: center; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gridAdvList .advBtn {
  height: 25px; display: flex; align-items: center; justify-content: center;
  color: #1ABC9C; font-size: 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); text-align: center; padding: 0 8px;
}
.gridAdvBox .gridAdvList .advBtn .rightArrow { width: 5px; height: 8px; margin-left: 4px; margin-bottom: 2px; }
@media screen and (min-width: 768px) {
  .gridAdvList .advItem { width: 10%; }
}

/* ---------- textAdv (标题广告 文字链, 4 列描边) ---------- */
.textAdvList {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; grid-gap: 12px;
  padding: 0 16px; box-sizing: border-box;
}
.textAdvList .advItem {
  border-radius: 3px; border: 1px solid #757575;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; padding: 9px 0; color: #BDBDBD;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
@media screen and (min-width: 768px) { .textAdvList .advItem { font-size: 16px; } }

/* ---------- advBanner (顶部/底部 横幅) ---------- */
.bannerList {
  padding: 0 16px; box-sizing: border-box;
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px;
}
.bannerList .bannerItem { height: 43px; border-radius: 5px; overflow: hidden; }
.bannerList .bannerItem .bannerAdv { width: 100%; height: 100%; }
@media screen and (min-width: 768px) {
  .bannerList { padding: 0; }
  .bannerList .bannerItem { height: 90px; }
}

/* ---------- gridAdvPop (9宫格弹窗) ---------- */
.gridAdvoOerlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); z-index: 20000;
}
.gridAdvoOerlay.active { display: block; }
.gridAdvContent {
  display: none; position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%); z-index: 20001; width: 300px;
}
.gridAdvContent .nineClose {
  width: 36px; height: 36px; margin: 30px auto 0; display: block;
  background: url('/themes/mdgw/static/images/closeIcon.png'); background-size: 100% 100%;
}
.gridAdvContent.active { display: block; }
.nineGridHead {
  width: 100%; height: 90px;
  background: url('/themes/mdgw/static/images/nineGridHead.png'); background-size: 100% 100%;
}
.nineGridList {
  width: 100%; max-height: 410px; display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr; gap: 10px; padding: 12px 19px;
  box-sizing: border-box; background: #fff; border-radius: 0 0 12px 12px; overflow-y: auto;
}
.nineGridItem { width: 58px; }
.nineGridCover { width: 58px; height: 58px; margin-bottom: 8px; object-fit: contain; }
.nineGridName {
  font-size: 12px; line-height: 18px; color: #000; text-align: center;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media screen and (min-width: 768px) {
  .gridAdvContent { width: 500px; }
  .nineGridHead { height: 150px; }
  .nineGridList { max-height: 580px; grid-row-gap: 12px; grid-column-gap: 18px; padding: 24px 43px; }
  .nineGridItem { width: 90px; }
  .nineGridCover { width: 90px; height: 90px; }
  .nineGridName { font-size: 18px; line-height: 24px; }
}
