/* ===== 云工厂前台模板样式 ===== */
/* 与小程序首页风格统一，适配响应式布局 */

/* ===== 基础重置 ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #f5f5f5;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== 页面基础 ===== */
.page-wrap {
  background: #f5f5f5;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== 头部背景区域 ===== */
.header-section {
  position: relative;
  height: 3rem;
  min-height: 3rem;
  max-height: 3rem;
  overflow: hidden;
  background: #f7f8fa;  /* 子页面默认纯色背景 */
}

/* 首页特殊处理 - 大背景 */
.home-page .header-section {
  height: 45vh;
  min-height: 300px;
  max-height: 500px;
  background: transparent;
}

.home-page .header-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-page .menu-section {
  margin-top: -50px;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

/* ===== 功能菜单区 ===== */
.menu-section {
  padding: 0 16px;
  margin-top: -2rem;
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* 欢迎卡片 */
.welcome-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.welcome-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.welcome-text {
  font-size: 16px;
  font-weight: 500;
  color: #666666;
  letter-spacing: 0.5px;
}

.welcome-arrow {
  width: 10px;
  height: 10px;
  border-top: 2px solid #999999;
  border-right: 2px solid #999999;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-left: auto;
}

/* 菜单行 */
.menu-row {
  margin-bottom: 16px;
}

.menu-row--two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.menu-row--three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* 菜单卡片 */
.menu-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

.menu-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.menu-card:active {
  transform: scale(0.98);
}

.menu-icon-lg {
  width: 112px;
  height: 112px;
  margin-bottom: 12px;
  object-fit: cover;
  border-radius: 8px;
}

.menu-icon-sm {
  width: 67px;
  height: 67px;
  margin-bottom: 8px;
  object-fit: cover;
  border-radius: 6px;
}

.menu-card-info {
  text-align: center;
}

.menu-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  display: block;
  margin-bottom: 4px;
}

.menu-card-desc {
  font-size: 13px;
  color: #999999;
  display: block;
}

.menu-card--sm {
  padding: 16px 12px;
}

.menu-card-title-sm {
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  text-align: center;
}

/* ===== 底部版权 ===== */
.footer {
  padding: 24px 0 16px;
  text-align: center;
}

.footer-text {
  font-size: 13px;
  color: #b9b9b9;
}

/* ===== 子页面通用样式 ===== */

/* 页面标题 */
.page-header {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.page-title {
  font-size: 22px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.back-home {
  font-size: 14px;
  color: #FF9800;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.2s;
}

.back-home:hover {
  background: #fff5e6;
}

/* 空状态 */
.empty-state {
  background: #ffffff;
  border-radius: 12px;
  padding: 60px 20px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.empty-text {
  font-size: 16px;
  color: #999999;
}

/* ===== 公告列表 ===== */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.announcement-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: all 0.2s;
  display: block;
  border-left: 4px solid transparent;
}

.announcement-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.announcement-card.urgent {
  border-left-color: #FF9800;
}

.announcement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.announcement-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
}

.urgent-badge {
  background: #FF9800;
  color: #ffffff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 12px;
}

.announcement-summary {
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin: 0 0 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.announcement-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.meta-item {
  font-size: 13px;
  color: #999999;
}

/* ===== 投票列表 ===== */
.vote-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vote-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.vote-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.vote-card.ended {
  opacity: 0.7;
}

.vote-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.vote-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  flex: 1;
}

.status-badge {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
  flex-shrink: 0;
  margin-left: 12px;
}

.status-badge.ongoing {
  background: #4CAF50;
  color: #ffffff;
}

.status-badge.ended {
  background: #999999;
  color: #ffffff;
}

.vote-desc {
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.vote-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.vote-btn {
  display: inline-block;
  background: #FF9800;
  color: #ffffff;
  text-decoration: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  text-align: center;
}

.vote-btn:hover {
  background: #F57C00;
  transform: translateY(-1px);
}

.vote-btn.view-result {
  background: #666666;
}

.vote-btn.view-result:hover {
  background: #555555;
}

/* ===== 文件列表 ===== */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 16px;
}

.file-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.file-icon-wrap {
  flex-shrink: 0;
}

.file-icon {
  width: 56px;
  height: 56px;
  background: #fff5e6;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 4px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-desc {
  font-size: 13px;
  color: #666666;
  margin: 0 0 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.file-action {
  flex-shrink: 0;
}

.download-icon {
  font-size: 24px;
  color: #FF9800;
}

/* ===== 详情页面 ===== */
.detail-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.detail-meta {
  margin-bottom: 16px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.meta-label {
  color: #666666;
  font-weight: 500;
}

.meta-value {
  color: #1a1a1a;
  font-weight: 500;
}

.urgent-text {
  color: #FF9800;
  font-weight: 600;
}

.divider {
  height: 1px;
  background: #f0f0f0;
  margin: 16px 0;
}

.detail-summary {
  background: #fff5e6;
  border-left: 4px solid #FF9800;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.detail-summary p {
  margin: 0;
  font-size: 14px;
  color: #666666;
  line-height: 1.6;
}

.detail-content {
  margin-bottom: 16px;
}

.detail-content p {
  font-size: 15px;
  color: #333333;
  line-height: 1.8;
  margin-bottom: 12px;
}

.detail-images {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-file {
  margin-top: 16px;
}

.detail-file .file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #fff5e6;
  border: 2px solid #ffe0b2;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s;
}

.detail-file .file-card:hover {
  background: #ffe0b2;
  transform: translateY(-2px);
}

.detail-file .file-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.detail-file .file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-file .file-text {
  font-size: 15px;
  color: #FF9800;
  font-weight: 500;
}

.detail-file .file-hint {
  font-size: 13px;
  color: #ff9800;
  opacity: 0.8;
}

.detail-file .file-arrow {
  font-size: 24px;
  color: #FF9800;
  font-weight: bold;
  flex-shrink: 0;
}

/* 历史版本 */
.history-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.history-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 16px 0;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-item {
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 3px solid #e0e0e0;
}

.history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.history-version {
  font-size: 14px;
  font-weight: 600;
  color: #FF9800;
}

.history-time {
  font-size: 13px;
  color: #999999;
}

.history-summary {
  font-size: 13px;
  color: #666666;
  line-height: 1.6;
}

/* ===== 响应式适配 ===== */

/* 平板设备 (768px - 1024px) */
@media screen and (max-width: 1024px) {
  .menu-section {
    padding: 0 20px;
  }
  
  .menu-icon-lg {
    width: 100px;
    height: 100px;
  }
  
  .menu-icon-sm {
    width: 60px;
    height: 60px;
  }
  
  .menu-card-title {
    font-size: 17px;
  }
  
  .menu-card-title-sm {
    font-size: 14px;
  }
}

/* 手机设备 (小于768px) */
@media screen and (max-width: 768px) {
  .header-section {
    height: 3rem;
    min-height: 3rem;
    max-height: 3rem;
  }
  
  .home-page .header-section {
    height: 40vh;
    min-height: 250px;
    max-height: 400px;
  }
  
  .menu-section {
    padding: 0 12px;
    margin-top: -1.5rem;
  }
  
  .home-page .menu-section {
    margin-top: -40px;
  }
  
  .welcome-card {
    padding: 16px;
    margin-bottom: 12px;
  }
  
  .welcome-text {
    font-size: 15px;
  }
  
  .menu-row--two {
    gap: 12px;
  }
  
  .menu-row--three {
    gap: 10px;
  }
  
  .menu-card {
    padding: 16px 12px;
  }
  
  .menu-icon-lg {
    width: 90px;
    height: 90px;
    margin-bottom: 10px;
  }
  
  .menu-icon-sm {
    width: 55px;
    height: 55px;
    margin-bottom: 6px;
  }
  
  .menu-card-title {
    font-size: 16px;
  }
  
  .menu-card-desc {
    font-size: 12px;
  }
  
  .menu-card-title-sm {
    font-size: 14px;
  }
}

/* 小屏手机 (小于480px) */
@media screen and (max-width: 480px) {
  .header-section {
    height: 3rem;
    min-height: 3rem;
    max-height: 3rem;
  }
  
  .home-page .header-section {
    height: 35vh;
    min-height: 200px;
    max-height: 350px;
  }
  
  .menu-section {
    padding: 0 10px;
    margin-top: -1.5rem;
  }
  
  .home-page .menu-section {
    margin-top: -35px;
  }
  
  .welcome-card {
    padding: 14px;
    margin-bottom: 10px;
  }
  
  .welcome-text {
    font-size: 14px;
  }
  
  .menu-row {
    margin-bottom: 12px;
  }
  
  .menu-row--two {
    gap: 10px;
  }
  
  .menu-row--three {
    gap: 8px;
  }
  
  .menu-card {
    padding: 14px 10px;
  }
  
  .menu-icon-lg {
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
  }
  
  .menu-icon-sm {
    width: 50px;
    height: 50px;
    margin-bottom: 6px;
  }
  
  .menu-card-title {
    font-size: 15px;
  }
  
  .menu-card-desc {
    font-size: 11px;
  }
  
  .menu-card-title-sm {
    font-size: 13px;
  }
  
  .footer-text {
    font-size: 12px;
  }
}

/* 超大屏设备 (大于1200px) */
@media screen and (min-width: 1200px) {
  .menu-section {
    max-width: 1140px;
  }
  
  .menu-icon-lg {
    width: 120px;
    height: 120px;
  }
  
  .menu-icon-sm {
    width: 72px;
    height: 72px;
  }
  
  .menu-card-title {
    font-size: 19px;
  }
  
  .menu-card-title-sm {
    font-size: 16px;
  }
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-card {
  animation: fadeIn 0.4s ease-out;
}

.menu-row--two .menu-card:nth-child(1) {
  animation-delay: 0.1s;
}

.menu-row--two .menu-card:nth-child(2) {
  animation-delay: 0.2s;
}

.menu-row--three .menu-card:nth-child(1) {
  animation-delay: 0.3s;
}

.menu-row--three .menu-card:nth-child(2) {
  animation-delay: 0.4s;
}

.menu-row--three .menu-card:nth-child(3) {
  animation-delay: 0.5s;
}

/* ===== 小程序二维码弹窗 ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: #ffffff;
  border-radius: 16px;
  padding: 0;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  font-size: 24px;
  color: #666666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: #333333;
  transform: rotate(90deg);
}

.modal-header {
  background: #FF9800;
  padding: 24px 20px;
  text-align: center;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.modal-body {
  padding: 32px 24px;
  text-align: center;
}

.modal-desc {
  font-size: 16px;
  color: #333333;
  margin-bottom: 20px;
  font-weight: 500;
}

.modal-qrcode {
  width: 240px;
  height: 240px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.modal-hint {
  font-size: 14px;
  color: #999999;
  margin: 0;
  line-height: 1.6;
}

/* 手机适配 */
@media screen and (max-width: 480px) {
  .modal-content {
    width: 95%;
    max-width: 360px;
  }
  
  .modal-qrcode {
    width: 200px;
    height: 200px;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-body {
    padding: 24px 20px;
  }
}

/* ===== 投票详情页 ===== */
.vote-status-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.vote-status-badge.ongoing {
  background: #4CAF50;
  color: #ffffff;
}

.vote-status-badge.ended {
  background: #999999;
  color: #ffffff;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.candidate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: all 0.2s;
}

.candidate-item:hover {
  background: #e9ecef;
}

.candidate-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.candidate-name {
  font-size: 15px;
  font-weight: 500;
  color: #333333;
}

.candidate-votes {
  font-size: 13px;
  color: #999999;
}

.vote-btn-sm {
  padding: 8px 20px;
  background: #FF9800;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.vote-btn-sm:hover {
  background: #f57c00;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* ===== 首页 Section ===== */
.home-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.home-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.home-section-more {
  font-size: 14px;
  color: #FF9800;
  text-decoration: none;
  flex-shrink: 0;
}

.home-section-more:hover {
  color: #F57C00;
}

.home-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-item {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  transition: all 0.2s;
}

.home-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.home-item:first-child {
  padding-top: 0;
}

.home-item:hover {
  background: #fafafa;
  padding-left: 8px;
  border-radius: 6px;
}

.home-item-title {
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-item-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: #999999;
}

/* ===== 首页商品网格 ===== */
.home-goods-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.home-goods-card {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  transition: all 0.2s;
}

.home-goods-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.home-goods-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.home-goods-placeholder {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.home-goods-info {
  padding: 10px;
}

.home-goods-title {
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-goods-price {
  font-size: 15px;
  font-weight: 600;
  color: #FF9800;
}

/* ===== 商品列表页 ===== */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.goods-card {
  display: block;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  text-decoration: none;
  transition: all 0.2s;
}

.goods-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.goods-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.goods-placeholder {
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.goods-info {
  padding: 14px;
}

.goods-title {
  font-size: 16px;
  font-weight: 500;
  color: #333333;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.goods-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.goods-price {
  font-size: 18px;
  font-weight: 600;
  color: #FF9800;
}

/* ===== 标签 ===== */
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  margin-right: 6px;
  vertical-align: middle;
}

.tag-orange {
  background: #fff5e6;
  color: #FF9800;
}

.tag-green {
  background: #e8f5e9;
  color: #4CAF50;
}

.tag-gray {
  background: #f0f0f0;
  color: #999999;
}

.tag-blue {
  background: #e3f2fd;
  color: #2196F3;
}

/* ===== 商品规格 ===== */
.specs-section {
  margin-top: 16px;
}

.specs-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.spec-name {
  font-size: 14px;
  font-weight: 500;
  color: #333333;
  flex: 1;
  min-width: 0;
}

.spec-price {
  font-size: 15px;
  font-weight: 600;
  color: #FF9800;
  flex-shrink: 0;
  margin-left: 12px;
}

.spec-stock {
  font-size: 13px;
  color: #999999;
  flex-shrink: 0;
  margin-left: 12px;
}

/* ===== 价格文本 ===== */
.price-text {
  color: #FF9800;
  font-weight: 600;
  font-size: 16px;
}

/* ===== 小程序二维码区域 ===== */
.qrcode-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px 20px;
  margin-top: 16px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.qrcode-title {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.qrcode-desc {
  font-size: 14px;
  color: #666666;
  margin-bottom: 20px;
}

.qrcode-img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}

.qrcode-hint {
  font-size: 13px;
  color: #999999;
  margin: 0;
}

/* ===== 响应式 - 商品网格 ===== */
@media screen and (max-width: 768px) {
  .home-goods-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .goods-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .qrcode-img {
    width: 180px;
    height: 180px;
  }
}

@media screen and (max-width: 480px) {
  .home-goods-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .home-goods-info {
    padding: 8px;
  }

  .home-goods-title {
    font-size: 13px;
  }

  .home-goods-price {
    font-size: 14px;
  }

  .goods-grid {
    grid-template-columns: 1fr;
  }

  .qrcode-section {
    padding: 24px 16px;
  }

  .qrcode-img {
    width: 160px;
    height: 160px;
  }

  .spec-item {
    padding: 10px 12px;
    flex-wrap: wrap;
  }

  .spec-stock {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }
}

/* ===== 尾部广告模块 ===== */
.footer-ad-section {
  margin-top: 24px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.footer-ad-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
}

.footer-ad-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-ad-item {
  border-radius: 8px;
  overflow: hidden;
  background: #f8f8f8;
}

.footer-ad-item.full {
  width: 100%;
}

.footer-ad-item.half {
  width: calc(50% - 6px);
}

.footer-ad-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: opacity 0.2s;
}

.footer-ad-item img:hover {
  opacity: 0.9;
}

.footer-ad-link {
  display: block;
  text-decoration: none;
}

.footer-ad-link:hover img {
  opacity: 0.85;
}

@media (max-width: 480px) {
  .footer-ad-section {
    margin-top: 16px;
    padding: 16px;
  }

  .footer-ad-item.half {
    width: calc(50% - 6px);
  }

  .footer-ad-grid {
    gap: 8px;
  }
}
