﻿/* ===== Footer ===== */
.site-footer {
  background: var(--bg-footer);
  color: rgba(255,255,255,0.7);
  padding: 50px 0 30px;
  margin-top: 60px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.site-footer .footer-brand h3 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.site-footer .footer-brand p {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(255,255,255,0.5);
  max-width: 320px;
}
.site-footer .footer-col h4 {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 16px;
}
.site-footer .footer-col ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.site-footer .footer-col ul li { margin: 0; }
.site-footer .footer-col ul li a {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  transition: var(--transition);
  padding: 4px 8px;
  border-radius: 4px;
}
.site-footer .footer-col ul li a:hover {
  color: var(--primary);
  background: rgba(255,255,255,0.05);
}
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer .footer-bottom a { color: rgba(255,255,255,0.35); }
.site-footer .footer-bottom a:hover { color: var(--primary); }

/* ===== 右侧悬浮客服 ===== */
.float-sidebar {
  position: fixed;
  right: 16px;
  bottom: 100px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .3s ease, transform .3s ease;
}

.float-sidebar .float-item {
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 9px;
  gap: 1px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}
.float-sidebar .float-item:first-child { border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.float-sidebar .float-item:last-child { border-radius: 0 0 var(--radius-sm) var(--radius-sm); }
.float-sidebar .float-item i { font-size: 16px; line-height: 1; }
.float-sidebar .float-item:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 客服弹窗 - 在右侧所以 popup 在左边 */
.float-sidebar .kefu-wrap { position: relative; }
.float-sidebar .kefu-popup {
  display: block;
  position: absolute;
  right: 56px;
  top: 50%;
  transform: translateY(-50%) scale(.92);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  min-width: 200px;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  transform-origin: right center;
}
.float-sidebar .kefu-wrap:hover .kefu-popup,
.float-sidebar .kefu-popup:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}
.float-sidebar .kefu-popup::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid var(--bg-card);
}
.float-sidebar .kefu-popup .kefu-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.float-sidebar .kefu-popup .kefu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}
.float-sidebar .kefu-popup .kefu-item:last-child { border-bottom: none; }
.float-sidebar .kefu-popup .kefu-item:hover { color: var(--primary); }
.float-sidebar .kefu-popup .kefu-item img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.float-sidebar .kefu-popup .kefu-item .kefu-name { font-size: 13px; color: var(--text-primary); }

/* 返回顶部 - 独立显示条件 */
.float-sidebar .float-top { margin-top: 4px; border-radius: var(--radius-sm) !important; }
/* 当页面在顶部时完全不显示浮层 */
body.at-top .float-top, body.at-top .float-sidebar .float-top { display: none !important; }

/* ===== 响应式 Footer ===== */
@media (max-width: 768px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .site-footer .footer-brand { grid-column: 1 / -1; }
  .site-footer .footer-col ul li a { font-size: 12px; padding: 3px 6px; }
  .float-sidebar { right: 10px; bottom: 60px; }
  .float-sidebar .float-item { width: 42px; height: 42px; font-size: 9px; }
  .float-sidebar .float-item i { font-size: 15px; }
  .float-sidebar .kefu-popup { right: 50px; min-width: 170px; }
}

@media (max-width: 480px) {
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .site-footer .footer-bottom { flex-direction: column; text-align: center; }
}

