/* 消费者端优化视觉层 (Glassmorphism, Animations, Gradients) */

/* 引入更具现代感的英文字体 (Inter) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

.consumer-shell {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 1. 头部和顶栏的毛玻璃拟态效果 */
.consumer-header {
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(235, 239, 237, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
}

/* 2. 更加平滑细腻的渐变网格背景 */
.consumer-hero-banner {
  background: 
    radial-gradient(circle at 10% 20%, rgba(200, 245, 175, 0.4), transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(150, 220, 190, 0.4), transparent 50%),
    linear-gradient(135deg, #e8f5df 0%, #ddefc4 100%) !important;
  box-shadow: 0 12px 32px rgba(30, 93, 55, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.5) !important;
}

/* 3. 商品卡片的微动效与阴影扩散 */
.consumer-product {
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
  border: 1px solid transparent;
}
.consumer-product:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 14px 28px rgba(11, 143, 85, 0.08), 0 4px 10px rgba(11, 143, 85, 0.04) !important;
  border-color: rgba(11, 143, 85, 0.1) !important;
  z-index: 10;
  position: relative;
  border-radius: 8px;
}

/* 图片缩放强化 */
.consumer-product:hover .consumer-product-image img {
  transform: scale(1.08) !important;
}

/* 4. 购物车角标 Bounce 动画 */
@keyframes cartBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.consumer-cart b.updating {
  animation: cartBounce 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* 5. 按钮悬浮效果提升 */
.consumer-detail-actions button, 
.consumer-submit-order button {
  transition: all 0.2s ease-in-out !important;
}
.consumer-detail-actions button:hover, 
.consumer-submit-order button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 143, 85, 0.25);
  filter: brightness(1.05);
}

/* 空状态美化补充 */
.consumer-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #eff1ef;
}
.consumer-empty-state i {
  font-size: 48px;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* 6. 导航栏布局与交互优化 */
.consumer-nav {
  background: #fff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
  border-bottom: 1px solid #eef1ef !important;
  position: relative;
  z-index: 90;
}
.consumer-nav .consumer-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 36px !important; /* 增加间距留白 */
  height: 56px !important;
}
.consumer-nav .category-title {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #fff !important;
  border-radius: 8px 8px 0 0 !important;
  padding: 0 28px !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
  transition: all 0.3s ease !important;
  border: none !important;
}
.consumer-nav .category-title:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35) !important;
  filter: brightness(1.05) !important;
}
.consumer-nav button:not(.category-title) {
  background: transparent !important;
  border: none !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #4b5563 !important;
  padding: 0 4px !important;
  height: 100% !important;
  position: relative !important;
  cursor: pointer !important;
  transition: color 0.2s !important;
}
.consumer-nav button:not(.category-title):hover {
  color: #059669 !important;
}
.consumer-nav button.active:not(.category-title) {
  color: #059669 !important;
  font-weight: 600 !important;
}
/* 底部滑动 Indicator 效果 */
.consumer-nav button:not(.category-title)::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 50% !important;
  width: 0 !important;
  height: 3px !important;
  background: #059669 !important;
  border-radius: 3px 3px 0 0 !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  transform: translateX(-50%) !important;
}
.consumer-nav button:not(.category-title):hover::after,
.consumer-nav button.active:not(.category-title)::after {
  width: 100% !important;
}

/* 7. 退出登录美化弹窗 */
.logout-modal-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: logoutFadeIn 0.25s ease-out;
}

@keyframes logoutFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.logout-modal-card {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: logoutModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes logoutModalPop {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.logout-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.logout-modal-close:hover {
  background: #f1f5f9;
  color: #475569;
}

.logout-modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #ffe4e6;
  color: #e11d48;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 0 0 8px #fff1f2;
}

.logout-modal-body h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.3px;
}

.logout-modal-body p {
  margin: 10px 0 28px;
  font-size: 14px;
  line-height: 1.5;
  color: #64748b;
}

.logout-modal-footer {
  display: flex;
  gap: 12px;
  width: 100%;
}

.logout-btn-cancel,
.logout-btn-confirm {
  flex: 1;
  height: 44px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.logout-btn-cancel {
  background: #f1f5f9;
  color: #475569;
}

.logout-btn-cancel:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.logout-btn-confirm {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.logout-btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  filter: brightness(1.05);
}

.logout-btn-confirm:active {
  transform: translateY(0);
}
