/* ===== 1. 全局样式 ===== */
.shangpin-page {
  min-height: 100vh;
  padding-top: 3px;
  background: linear-gradient(180deg, #f5faff 0%, #f0f8ff 100%);
}

/* ===== 2. 公告栏样式 ===== */
.gonggao-box {
  margin: 20rpx 30rpx;
  height: 80rpx;
  border-radius: 40rpx;
  background: linear-gradient(135deg,
    rgba(220, 255, 220, 0.85) 0%,
    rgba(255, 255, 200, 0.85) 100%);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  padding: 0 25rpx;
  box-shadow: 0 4rpx 15rpx rgba(0, 100, 0, 0.08);
  border: 1rpx solid rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.gonggao-icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 20rpx;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.gonggao-icon image {
  width: 100%;
  height: 100%;
}

.gonggao-content {
  flex: 1;
  overflow: hidden;
  margin-top: 4px; /* 视觉上微微下调，不要删*/
  height: 80rpx;
  display: flex;
}

.gonggao-text {
  font-size: 26rpx;
  color: #333;
  white-space: nowrap;
  padding-right: 50rpx;
  line-height: 1;
}

.gonggao-anim {
  animation: marquee 10s linear infinite;
  animation-delay: 0.5s;
}

/* ===== 3. 轮播图样式 ===== */
.lunbo-container {
  margin: 0 30rpx 30rpx;
  height: 350rpx;
  border-radius: 25rpx;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10rpx 30rpx rgba(0, 0, 0, 0.1);
}

.lunbo-swiper {
  width: 100%;
  height: 100%;
}

.lunbo-image {
  width: 100%;
  height: 100%;
}

.lunbo-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  justify-content: center;
  align-items: center;
}

.lunbo-placeholder image {
  width: 100%;
  height: 100%;
  opacity: 0.8;
}

/* 刷新按钮 */
.refresh-btn {
  position: absolute;
  top: 20rpx;
  right: 20rpx;
  width: 80rpx;
  height: 80rpx;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.refresh-icon {
  width: 60rpx;
  height: 60rpx;
  transition: transform 0.3s;
  filter: drop-shadow(0 4rpx 8rpx rgba(0, 0, 0, 0.2));
}

.refreshing {
  animation: rotate360 1s linear infinite;
}

.refresh-dot {
  position: absolute;
  width: 12rpx;
  height: 12rpx;
  background: #ffcc00;
  border-radius: 50%;
  top: 15rpx;
  right: 15rpx;
  animation: pulse 2s infinite;
}

/* ===== 4. 商品展示区域 ===== */
.shangpin-container {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 40rpx 40rpx 0 0;
  margin-top: -20rpx;
  padding: 40rpx 30rpx 100rpx;
  min-height: 800rpx;
  box-shadow: 0 -10rpx 30rpx rgba(0, 0, 0, 0.05);
}

/* 商品类型选择 */
.leixing-scroll {
  width: 100%;
  white-space: nowrap;
  margin-bottom: 50rpx;
}

.leixing-list {
  display: inline-flex;
  padding-left: 0;
  padding-right: 30rpx;
  padding-top: 10rpx;
  padding-bottom: 10rpx;
}

.leixing-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-right: 30rpx;
  transition: all 0.3s;
  position: relative;
  flex-shrink: 0;
  width: 130rpx;
}

.leixing-item:last-child {
  margin-right: 0;
}

.leixing-image-box {
  width: 110rpx;
  height: 110rpx;
  border-radius: 25rpx;
  overflow: hidden;
  position: relative;
  margin-bottom: 12rpx;
  transition: all 0.3s;
  box-shadow: 0 8rpx 20rpx rgba(0, 0, 0, 0.1);
}

.leixing-image {
  width: 100%;
  height: 100%;
}

.leixing-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 25rpx;
  border: 4rpx solid transparent;
  transition: all 0.3s;
}

.leixing-active .leixing-glow {
  border-color: #ffcc00;
  box-shadow: 0 0 20rpx rgba(255, 204, 0, 0.5);
}

.leixing-active .leixing-image-box {
  transform: translateY(-8rpx);
}

.leixing-text {
  font-size: 24rpx;
  color: #666;
  white-space: nowrap;
  transition: all 0.3s;
  text-align: center;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leixing-active .leixing-text {
  color: #333;
  font-weight: bold;
  transform: scale(1.05);
}

/* 专区标题 */
.zhuanqu-title {
  display: flex;
  align-items: center;
  margin: 40rpx 0 15rpx;
  padding-left: 0;
  position: relative;
}

.zhuanqu-icon {
  width: 40rpx;
  height: 40rpx;
  margin-right: 20rpx;
  position: relative;
}

.zhuanqu-icon-image {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2rpx 4rpx rgba(255, 204, 0, 0.3));
}

.zhuanqu-sparkle {
  animation: sparkle 2s infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 2rpx 4rpx rgba(255, 204, 0, 0.3));
  }
  50% {
    transform: scale(1.1) rotate(10deg);
    filter: drop-shadow(0 4rpx 8rpx rgba(255, 204, 0, 0.6));
  }
}

.zhuanqu-text {
  font-size: 32rpx;
  font-weight: bold;
  color: #333;
  position: relative;
}

.zhuanqu-text::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8rpx;
  width: 60rpx;
  height: 4rpx;
  background: linear-gradient(90deg, #ffcc00, transparent);
  border-radius: 2rpx;
}

/* 商品网格 */
.shangpin-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25rpx;
  margin-bottom: 40rpx;
}

.shangpin-card {
  background: #ffffff;
  border-radius: 20rpx;
  overflow: hidden;
  box-shadow: 0 8rpx 25rpx rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
  position: relative;
}

.shangpin-card:active {
  transform: scale(0.98);
  box-shadow: 0 4rpx 15rpx rgba(0, 0, 0, 0.1);
}

.shangpin-image-box {
  width: 100%;
  height: 220rpx;
  position: relative;
  overflow: hidden;
}

.shangpin-image {
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
}

/* 商品标题区域 */
.shangpin-title {
  height: 75rpx;
  padding: 6rpx 12rpx 2rpx 12rpx;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.title-text {
  font-size: 26rpx;
  color: #000;
  line-height: 34rpx;
  font-weight: 450;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 价格和购买按钮 */
.shangpin-footer {
  height: 50rpx;
  padding: 0 12rpx 8rpx 12rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price-box {
  display: flex;
  align-items: baseline;
}

.buy-btn {
  width: 48rpx;
  height: 48rpx;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #ff6666);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4rpx 12rpx rgba(255, 68, 68, 0.3);
  transition: all 0.3s;
}

.buy-btn:active {
  transform: scale(0.9);
}

.buy-icon {
  width: 26rpx;
  height: 26rpx;
  filter: brightness(0) invert(1);
}

/* ===== 5. 空状态 ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100rpx 0;
}

.empty-image {
  width: 200rpx;
  height: 200rpx;
  margin-bottom: 40rpx;
  opacity: 0.7;
}

.empty-text {
  font-size: 30rpx;
  color: #999;
  margin-bottom: 40rpx;
}

.empty-btn {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 28rpx;
  padding: 20rpx 60rpx;
  border-radius: 50rpx;
  box-shadow: 0 8rpx 25rpx rgba(102, 126, 234, 0.3);
}

/* ===== 6. 弹窗样式 ===== */
.gonggao-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gonggao-modal .modal-mask {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 0;
  transition: opacity 0.25s ease;
}

.gonggao-modal .modal-mask--in {
  opacity: 1;
}

.gonggao-modal .modal-mask--out {
  opacity: 0;
}

.gonggao-modal .modal-content {
  position: relative;
  z-index: 1;
  width: 620rpx;
  max-height: 70vh;
  background: #fff;
  border-radius: 20rpx;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.gonggao-modal .modal-content--in {
  transform: scale(1);
  opacity: 1;
}

.gonggao-modal .modal-content--out {
  transform: scale(0.9);
  opacity: 0;
}

.gonggao-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28rpx 32rpx 20rpx;
  border-bottom: 1rpx solid #f0f0f0;
}

.gonggao-modal .modal-title {
  font-size: 30rpx;
  font-weight: 700;
  color: #1a1a1a;
}

.gonggao-modal .modal-close {
  width: 48rpx;
  height: 48rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36rpx;
  color: #999;
  border-radius: 50%;
  background: #f5f5f5;
  line-height: 1;
}

.gonggao-modal .modal-body {
  flex: 1;
  padding: 28rpx 32rpx 36rpx;
  max-height: 55vh;
}

.gonggao-modal .modal-text {
  font-size: 28rpx;
  color: #444;
  line-height: 1.8;
  word-break: break-all;
}

