/* ============================================================
   WORLD SILK CMS 前台补充样式（CMS 化新增元素）
   ============================================================ */

/* 头部搜索框内嵌输入框 */
.search-box { align-items: center; }
.search-box .search-input {
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 13.5px; color: var(--text-dark);
  width: 210px; padding: 4px 2px;
}
.search-box .search-input::placeholder { color: var(--placeholder-text); }

/* 频道卡片（列表模板） */
.info-thumb {
  height: 150px; border-radius: 8px; overflow: hidden; background: var(--primary-bg); margin-bottom: 12px;
}
.info-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.info-card:hover .info-thumb img { transform: scale(1.05); }
.info-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); letter-spacing: .5px; }

/* 产品与品牌网格 */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.brand-card {
  background: var(--white); border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; text-decoration: none; transition: box-shadow .2s, transform .2s;
}
.brand-card:hover { box-shadow: 0 10px 30px rgba(19, 48, 98, .12); transform: translateY(-3px); }
.brand-thumb { height: 190px; overflow: hidden; background: var(--primary-bg); }
.brand-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.brand-card:hover .brand-thumb img { transform: scale(1.05); }
.brand-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.brand-desc { font-size: 12.5px; color: var(--text-body); line-height: 1.7; margin: 0; }

/* 单页正文 */
.single-wrap {
  max-width: 980px; margin: 0 auto; width: 100%;
  font-size: 15px; color: var(--text-body); line-height: 1.9;
}
.single-wrap h2, .single-wrap h3 { color: var(--text-dark); margin: 28px 0 12px; }
.single-wrap p { margin: 0 0 14px; }
.single-wrap img { max-width: 100%; border-radius: 8px; }

/* 页脚广告 */
.footer-ad-link { display: block; padding: 0 var(--page-padding); }

/* 移动端适配 */
@media (max-width: 1024px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .brand-grid { grid-template-columns: 1fr; }
  .search-box .search-input { width: 140px; }
}

/* ============================================================
   轮播组件 .ws-slider（后台「轮播图管理」驱动，真正自动播放）
   ============================================================ */
.ws-slider { position: relative; width: 100%; overflow: hidden; outline: none; }
.ws-slider .ws-track { position: relative; width: 100%; }
/* 淡入淡出：非当前帧脱离文档流叠放，当前帧撑起高度 */
.ws-slider[data-effect="fade"] .ws-slide {
  position: absolute; inset: 0; opacity: 0; visibility: hidden;
  transition: opacity .6s ease; z-index: 1;
}
.ws-slider[data-effect="fade"] .ws-slide.is-active {
  position: relative; opacity: 1; visibility: visible; z-index: 2;
}
/* 滑动：整条轨道横向平移 */
.ws-slider[data-effect="slide"] .ws-track {
  display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.ws-slider[data-effect="slide"] .ws-slide { flex: 0 0 100%; width: 100%; }
.ws-slider .ws-slide > a { display: block; }
.ws-slider .ws-slide img { display: block; width: 100%; }

/* 左右箭头 */
.ws-slider .ws-arrow {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 5;
  width: 38px; height: 38px; border: none; border-radius: 50%; cursor: pointer;
  background: rgba(255,255,255,.86); color: var(--primary, #133062);
  font-size: 22px; line-height: 1; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.18); opacity: 0; transition: opacity .25s;
}
.ws-slider:hover .ws-arrow { opacity: 1; }
.ws-slider .ws-prev { left: 14px; }
.ws-slider .ws-next { right: 14px; }

/* 指示圆点 */
.ws-slider .ws-dots {
  position: absolute; left: 0; right: 0; bottom: 14px; z-index: 5;
  display: flex; gap: 8px; justify-content: center;
}
.ws-slider .ws-dot {
  width: 26px; height: 4px; padding: 0; border: none; border-radius: 2px; cursor: pointer;
  background: rgba(255,255,255,.55); transition: background .25s, width .25s;
}
.ws-slider .ws-dot.is-active { background: var(--gold, #B9975B); width: 34px; }

/* 无障碍：尊重系统「减少动态效果」设置 */
@media (prefers-reduced-motion: reduce) {
  .ws-slider .ws-slide, .ws-slider[data-effect="slide"] .ws-track { transition: none; }
}
@media (max-width: 640px) {
  .ws-slider .ws-arrow { width: 32px; height: 32px; font-size: 18px; opacity: 1; }
}
