/**
 * 全局样式文件
 * 包含网站基础样式、布局组件、交互效果等
 * 版本：v1.0.0
 */

/* ==================== 基础样式重置 ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background: #e8f5e9;
  overflow-x: hidden;
  width: 100%;
}

/* 全站PC端最大宽度限制 */
@media (min-width: 791px) {
  body {
    max-width: 790px;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  }

  /* 页首宽度限制 */
  .top-area,
  .header-top {
    max-width: 790px;
    left: auto;
    right: auto;
    margin: 0 auto;
  }

  /* 底部操作栏宽度限制 */
  .detail-footer {
    max-width: 790px;
    left: auto;
    right: auto;
    margin: 0 auto;
  }

  /* 底部导航栏宽度限制 */
  .bottom-nav {
    max-width: 790px;
    left: auto;
    right: auto;
    margin: 0 auto;
  }
}

a {
  text-decoration: none;
  color: inherit;
}

/* ==================== 顶部区域样式 ==================== */
.top-area {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: #fff;
}

.header-top {
  width: 100%;
  background: linear-gradient(303deg, #2f912f 0%, #228B22 100%);
  padding: 15px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 返回按钮 */
.header-top .back-btn {
  position: absolute;
  left: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.header-top .back-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 产品信息头部 */
.product-info-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  /* padding: 0 60px; */
}

.product-brand {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: normal;
}

.product-name {
  font-size: 18px;
  color: #fff;
  font-weight: bold;
}

.product-weight {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: normal;
}

/* 头部装饰背景 */
.header-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M20 60 Q25 40 30 60 Q35 40 40 60' stroke='%23228B22' stroke-width='3' fill='none'/%3E%3Cpath d='M50 70 Q55 50 60 70 Q65 50 70 70' stroke='%23228B22' stroke-width='3' fill='none'/%3E%3Cpath d='M10 50 Q15 30 20 50 Q25 30 30 50' stroke='%23228B22' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
}

.site-title {
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== 主导航样式 ==================== */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  padding: 15px 0;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.main-nav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 33%;
  cursor: pointer;
  padding: 10px 15px;
}

.main-nav .nav-item img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 8px;
  border: 3px solid #e8f5e9;
  background: #e8f5e9;
  transition: all .3s ease;
}

.main-nav .nav-item span {
  font-size: 16px;
  color: #333;
  font-weight: bold;
  text-align: center;
  transition: all .3s ease;
}

.main-nav .nav-item.active {
  transform: scale(1.05);
  transition: all .3s ease;
}

.main-nav .nav-item.active img {
  position: relative;
  border: none;
  animation: spin 4s linear infinite;
}

.main-nav .nav-item.active span {
  color: #5cb85c;
  font-weight: bold;
  transform: scale(1.08);
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.main-nav .nav-item.active span::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .4), transparent);
  animation: shine 1.5s ease-in-out infinite;
}

/* ==================== 动画关键帧 ==================== */
@keyframes spin {
  from {
    transform: scale(1.08) rotate(0deg);
  }

  to {
    transform: scale(1.08) rotate(360deg);
  }
}

@keyframes rainbow-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes shine {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 150%;
  }
}

/* ==================== 主体布局样式 ==================== */
.main-area {
  display: flex;
  padding-top: 130px;
  padding-bottom: 60px;
  width: 100%;
  min-height: calc(100vh - 190px);
}

/* ==================== 侧边栏样式 ==================== */
.sidebar {
  flex: 3;
  min-width: 140px;
  max-width: 200px;
  background: #fff;
  padding: 12px 0;
}

.sidebar-title {
  font-size: clamp(12px, 3.5vw, 18px);
  font-weight: bold;
  color: #fff;
  padding: 10px 15px;
  background: #066c0e;
  margin-bottom: 5px;
  white-space: nowrap;
  text-align: center;
}

.sidebar-title.active {
  color: #fff;
  font-weight: bold;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .2);
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  position: relative;
  padding: 12px 15px;
  color: #666;
  font-size: 15px;
  cursor: pointer;
  transition: background-color .2s;
  text-align: center;
}

.sidebar-menu li:hover {
  background: #f5f5f5;
}

.sidebar-menu li a {
  display: block;
  width: 100%;
  height: 100%;
  color: #555;
  font-weight: bold;
  font-size: 16px;
  text-align: center;
}

.sidebar-menu li.active {
  background: rgba(92, 184, 92, 0.85);
  color: #fff;
  font-size: 15px;
  font-weight: bold;
}

.sidebar-menu li.active::after {
  content: '';
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 0;
  transform: translateX(-50%);
  width: 50%;
  height: 3px;
  background: #e53935;
}

/* 副标题样式 */
.sidebar-menu li .subname {
  display: block;
  font-size: 10px;
  font-weight: normal;
  color: #999;
  margin-top: 4px;
  padding: 0;
  background: transparent;
  text-align: center;
}

.sidebar-menu li.active .subname {
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
}

/* ==================== 内容区域样式 ==================== */
.content-area {
  flex: 7;
  min-height: calc(100vh - 175px);
  background: #fff;
  border-left: 1px solid #e5e5e5;
}

/* ==================== 子导航样式 ==================== */
.subnav-list {
  padding: 15px;
  background: linear-gradient(180deg, #2f912f 0%, #228B22 100%);
  border-bottom: 1px solid #1b5e20;
}

.subnav-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  margin-bottom: 12px;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
}

.subnav-title i {
  font-size: 20px;
}

.subnav-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.subnav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.subnav-item:hover {
  background: #fff;
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.subnav-item i {
  color: #5cb85c;
  font-size: 18px;
}

/* ==================== 产品列表样式 ==================== */
.product-count {
  padding: 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: right;
  font-size: 10px;
  font-weight: bold;
}

.count-num {
  color: #fff;
  font-weight: bold;
  background: #5cb85c;
  padding: 2px 8px;
  border-radius: 4px;
}

.product-list {
  display: flex;
  flex-direction: column;
}

.product-card {
  display: flex;
  flex-direction: column;
  padding: 10px 15px 10px 15px;
  border-bottom: none;
  background: #ffffff;
  border-radius: 16px;
  margin-bottom: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: all .2s;
  text-decoration: none;
  color: inherit;
}

.product-main {
  display: flex;
  align-items: stretch;
}

.product-card:hover {
  background: #fafafa;
}

.product-image-wrapper {
  width: 110px;
  flex-shrink: 0;
  margin-right: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.product-rating {
  width: 100%;

  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  font-size: 10px;
}

.product-image {
  width: 100%;
  height: 83px;
  background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
  border-radius: 6px;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  flex: 1;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.product-title {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.product-desc {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.product-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  line-height: 1;
  width: 100%;
}

.product-price {
  color: #e53935;
  font-size: 28px;
  font-weight: bold;
  text-align: right;
  line-height: 1;
}

.rating-stars {
  display: inline-block;
  font-size: 10px;
  color: #ff9500;
  letter-spacing: 2px;
}

/* ==================== 产品标签样式 ==================== */
.product-tag {
  display: inline-block;
  background: #1e90ff;
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 5px;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.product-tags .tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 500;
}

.product-tags .tag-red {
  background: #ff4d4f;
  color: #fff;
}

.product-tags .tag-orange {
  background: #fa8c16;
  color: #fff;
}

.product-sales {
  font-size: 12px;
  color: #fa8c16;
  margin-bottom: 6px;
}

.price-tag {
  font-size: 11px;
  color: #fff;
  background: linear-gradient(135deg, #ff4d4f 0%, #fa8c16 100%);
  padding: 2px 8px;
  border-radius: 3px;
  margin-left: 8px;
}

/* ==================== 购物车按钮样式 ==================== */
.add-cart-btn {
  width: 36px;
  height: 36px;
  background: #5cb85c;
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 10px;
  flex-shrink: 0;
}

.add-cart-btn:hover {
  background: #4cae4c;
}

/* ==================== 底部占位区域样式 ==================== */
/* 防止固定底部导航栏遮挡页面内容 */
.bottom-placeholder {
  height: 80px;
  width: 100%;
  clear: both;
}

/* ==================== 底部导航栏样式 ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  background: #fff;
  padding: 8px 0;
  border-top: 1px solid #e5e5e5;
  z-index: 100;
}

.bottom-nav .nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #666;
  position: relative;
}

.bottom-nav .nav-item i {
  font-size: 22px;
  margin-bottom: 3px;
}

.bottom-nav .nav-item span {
  font-size: 11px;
}

.bottom-nav .nav-item.active {
  color: #5cb85c;
}

.bottom-nav .cart-badge {
  position: absolute;
  top: -5px;
  right: 25%;
  background: #f0ad4e;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ==================== 产品详情页样式 ==================== */
.detail-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 50%;
  color: #333;
  font-size: 18px;
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.share-btn {
  padding: 8px 15px;
  background: none;
  border: none;
  color: #5cb85c;
  font-size: 14px;
  cursor: pointer;
}

/* ==================== 产品图片画廊样式 ==================== */
.product-gallery-detail {
  position: relative;
  width: 100%;
  background: #f0f9f0;
  padding-top: 60px;
}

.gallery-wrapper {
  display: flex;
  width: 100%;
  height: 300px;
}

.gallery-thumbs {
  width: 80px;
  display: flex;
  flex-direction: column;
  padding: 10px 5px;
  gap: 8px;
  overflow-y: auto;
}

.thumb-item {
  width: 70px;
  height: 70px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.thumb-item.active {
  border-color: #5cb85c;
  box-shadow: 0 0 8px rgba(92, 184, 92, 0.5);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-main {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.main-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* 图片切换按钮 */
.prev-btn,
.next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  font-size: 18px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

.gallery-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 12px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 12px;
  border-radius: 12px;
}

/* ==================== 参数卡片样式 ==================== */
.params-card {
  margin: 12px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.params-quick {
  display: flex;
  padding: 15px;
  background-color: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.quick-item {
  flex: 1;
  text-align: center;
}

.quick-value {
  display: block;
  font-size: 18px;
  font-weight: bold;
  color: #333;
}

.quick-label {
  font-size: 12px;
  color: #999;
}

.red-price {
  color: #ff2222;
  font-weight: bold;
  font-size: 20px;
}

.price-symbol {
  font-size: 14px;
}

.price-num {
  font-size: 22px;
}

.params-list {
  padding: 10px 0;
}

.param-row {
  display: flex;
  padding: 12px 15px;
  border-bottom: 1px solid #f8f8f8;
  align-items: flex-start;
}

.param-row:last-child {
  border-bottom: none;
}

.param-name {
  width: 100px;
  font-size: 14px;
  color: #999;
}

.param-value {
  flex: 1;
  font-size: 14px;
  color: #333;
  line-height: 1.6;
}

.param-value:empty {
  display: none;
}

/* ==================== 标签页切换样式 ==================== */
.detail-tabs {
  background: #fff;
  margin: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
}

.tab-btn {
  flex: 1;
  padding: 15px 0;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  font-size: 15px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  border-radius: 8px;
  margin: 0 4px;
  font-weight: bold;
}

.tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #5cb85c 0%, #228B22 100%);
  border-color: #5cb85c;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(92, 184, 92, 0.4);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: #fff;
  border-radius: 2px;
}

.tabs-content {
  padding: 0;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==================== 详情内容样式 ==================== */
.detail-content {
  padding: 15px;
}

.effect-image {
  padding: 10px;
  margin: 0;
  box-sizing: border-box;
}

.effect-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 0 auto;
}

.real-photos {
  display: flex;
  flex-wrap: wrap;
  padding: 10px;
  gap: 8px;
  margin: 0;
  box-sizing: border-box;
}

.real-photos .photo-item,
.photo-item {
  width: calc(50% - 4px);
  border-radius: 8px;
  overflow: hidden;
}

.real-photos .photo-item img,
.photo-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.video-container {
  padding: 10px;
}

.video-container video {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* ==================== 商品详情区域样式 ==================== */
.detail-section {
  background: #fff;
  padding: 15px;
  margin-top: 12px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.detail-content {
  font-size: 14px;
  color: #666;
  line-height: 1.8;
}

.detail-content img {
  width: 100%;
  height: auto;
  margin: 10px 0;
}

.prev-next {
  font-size: 13px;
  color: #666;
  line-height: 2;
}

.prev-next span {
  display: block;
}

/* ==================== 底部操作栏样式 ==================== */
.detail-footer {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding: 10px 15px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
  z-index: 100;
}

.footer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: opacity .2s;
}

.footer-btn:hover {
  opacity: .8;
}

.collect-btn {
  width: 45px;
  height: 45px;
  background: #fff;
  border: 1px solid #ddd;
  font-size: 20px;
  color: #666;
  margin-right: 10px;
}

.cart-btn {
  flex: 1;
  height: 45px;
  background: #ff9800;
  color: #fff;
  font-size: 15px;
  margin-right: 10px;
}

.cart-btn i {
  margin-right: 5px;
}

.buy-btn {
  flex: 2;
  height: 45px;
  background: #5cb85c;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

/* ==================== 弹窗样式 ==================== */
/* 分享弹窗 */
.share-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .5);
  z-index: 9999;
  justify-content: center;
  align-items: flex-end;
}

.share-modal-content {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 16px 16px 0 0;
  animation: slideUp .3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.share-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

.share-modal-close {
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.share-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.share-options {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 20px;
}

.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.share-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 8px;
}

.share-item:nth-child(1) .share-icon {
  background: #5cb85c;
  color: #fff;
}

.share-item:nth-child(2) .share-icon {
  background: #07c160;
  color: #fff;
}

.share-item:nth-child(3) .share-icon {
  background: #12b7f5;
  color: #fff;
}

.qrcode-section {
  text-align: center;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.qrcode-section p {
  margin-top: 10px;
  color: #666;
  font-size: 13px;
}

#qrcode img {
  display: inline-block !important;
}

#qrcode canvas {
  display: none !important;
}

.save-qrcode-btn {
  margin-top: 10px;
  padding: 8px 20px;
  background-color: #5cb85c;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.save-qrcode-btn:hover {
  background-color: #4cae4c;
}

/* 图片预览弹窗 */
.image-preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .95);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.image-preview-modal.show {
  display: flex;
}

.preview-modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preview-close {
  position: absolute;
  top: -50px;
  right: 0;
  font-size: 32px;
  color: #fff;
  cursor: pointer;
}

.preview-prev,
.preview-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 10px;
  cursor: pointer;
  border-radius: 50%;
}

.preview-prev {
  left: 10px;
}

.preview-next {
  right: 10px;
}

.preview-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.save-image-btn {
  padding: 12px 32px;
  background: #5cb85c;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  white-space: nowrap;
}

.save-image-btn:hover {
  background: #4cae4c;
}

/* 海报弹窗 */
.poster-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.poster-modal.show {
  display: flex;
}

.poster-modal-content {
  background: #fff;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  border-radius: 16px;
  animation: fadeIn .3s ease;
  overflow-y: auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.poster-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

.poster-modal-close {
  font-size: 24px;
  cursor: pointer;
  color: #999;
}

.poster-modal-body {
  padding: 20px;
  min-height: 400px;
}



/* ==================== 响应式样式 ==================== */
@media (min-width: 791px) {
  .product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card {
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .sidebar {
    min-width: 120px;
    max-width: 160px;
  }

  .sidebar-title {
    font-size: 13px;
    padding: 8px 12px;
  }

  .sidebar-menu li {
    padding: 8px 12px;
    font-size: 12px;
  }

  .product-image {
    width: 90px;
    height: 68px;
  }

  .product-title {
    font-size: 15px;
  }

  .product-desc {
    font-size: 11px;
  }

  .add-cart-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  .sidebar {
    min-width: 100px;
    max-width: 130px;
  }

  .sidebar-title {
    font-size: 18px;
    padding: 6px 10px;
  }

  .sidebar-menu li {
    padding: 10px 10px;
    font-size: 12px;
  }

  .product-image {
    width: 120px;
    height: 90px;
  }

  .product-title {
    font-size: 17px;
  }

  .product-desc {
    font-size: 10px;
  }

  .product-price {
    font-size: 21px;
  }

  .add-cart-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}