/* 全局基础样式 */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #ffffff !important;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  scroll-behavior: smooth;
}

/* 毛玻璃卡片 - 超柔动画 */
.glass {
  backdrop-filter: blur(35px) saturate(200%);
  -webkit-backdrop-filter: blur(35px) saturate(200%);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border-radius: 22px;
  color: #1d1d1f;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
.glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
}

/* 导航栏样式 */
.navbar {
  transition: all 0.3s ease;
  backdrop-filter: blur(35px) saturate(200%);
  -webkit-backdrop-filter: blur(35px) saturate(200%);
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  border-radius: 22px;
}
.navbar:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
}
.navbar .nav-link {
  text-decoration: none;
  color: #424245 !important;
  font-weight: 500;
  padding: 0.7rem 1.3rem !important;
  border-radius: 16px;
  transition: all 0.25s cubic-bezier(0.25,1,0.5,1);
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #1296db !important;
  background: rgba(0, 113, 227, 0.08);
  transform: translateY(-1px);
}
.dropdown-menu {
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
  backdrop-filter: blur(35px) saturate(200%);
  background: rgba(255, 255, 255, 0.8);
  animation: fadeIn 0.3s ease;
}
.dropdown-item {
  transition: all 0.2s ease;
  color: #424245;
  border-radius: 8px;
  margin: 0 8px;
  width: auto;
}
.dropdown-item:hover {
  background-color: rgba(0, 113, 227, 0.08);
  color: #1296db;
  padding-left: 1.5rem !important;
}

/* 轮播图样式 */
.carousel {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.carousel-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d1d6;
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25,1,0.5,1);
  opacity: 1;
}
.carousel-indicators .active {
  background: #1296db;
  transform: scale(1.25);
}

/* 公告走马灯样式 */
.notice-bar {
  background-color: #fff !important;
}
.marquee-container {
  white-space: nowrap;
}
.marquee-content {
  animation: marquee 25s linear infinite;
  padding-left: 100%;
}
.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}
@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 商品列表标题 */
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}
.section-title::after {
  display: none;
}

/* 更多按钮 */
.top-more-btn {
  font-size: 1rem;
  font-weight: 600;
  color: #1296db;
  text-decoration: none;
  padding: 0.5rem 1.1rem;
  border-radius: 14px;
  background: rgba(0, 113, 227, 0.09);
  border: 1px solid rgba(0, 113, 227, 0.15);
  transition: all 0.24s cubic-bezier(0.25,1,0.5,1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.top-more-btn:hover {
  background: #1296db;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,113,227,0.15);
}
.top-more-btn span {
  font-size: 0.9rem;
}

/* 商品卡片样式 */
.product-card {
  transition: all 0.32s cubic-bezier(0.25,1,0.5,1);
  background: rgba(255,255,255, 0.7);
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: none;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 28px rgba(0,0,0,0.1) !important;
}
.product-img-wrapper {
  aspect-ratio: 4 / 3;
}
.product-img-wrapper img {
  object-fit: cover;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.25,1,0.5,1);
}
.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

/* 手机端商品卡片左右布局 */
@media (max-width: 768px) {
  .product-card {
    flex-direction: row !important;
    align-items: stretch;
    height: auto !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
  }
  .product-img-wrapper {
    width: 130px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
  }
  .product-img-wrapper img {
    width: 100%;
    height: 100%;
  }
  .product-card .card-body {
    padding: 0.75rem !important;
    width: calc(100% - 130px);
  }
  .product-card .btn-cart-corner {
    margin: 0.75rem !important;
  }
  .product-card .card-text {
    -webkit-line-clamp: 1; /* 手机端只显示一行描述 */
    margin-bottom: 0.5rem !important;
  }
}

.product-info { padding: 1.2rem; }
.product-title {
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: #1d1d1f;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ff3b30;
  margin-bottom: 0.3rem;
}
.product-stock {
  font-size: 0.85rem;
  color: #86868b;
  margin-bottom: 0.8rem;
}

/* 加入购物车按钮 */
.add-cart-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  background: #1296db;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.24s cubic-bezier(0.25,1,0.5,1);
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}
.add-cart-btn:hover {
  background: #0077ed;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,113,227,0.2);
}
.add-cart-btn:active {
  transform: translateY(0);
}

/* 购物车按钮新样式 (列表小按钮) */
.btn-cart-corner {
  width: 36px;
  height: 36px;
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: #1296db;
  border: none;
  z-index: 10;
  border-radius: 50%;
}
.btn-cart-corner:hover {
  background-color: #0077ed;
  transform: scale(1.05);
}

/* 购物车悬浮按钮（位于修改按钮上方） */
.floating-cart {
  position: fixed !important;
  bottom: 230px;
  right: 30px;
  width: 50px;
  height: 50px;
  color: #ffffff;
  border-radius: 50%;
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
.floating-cart:hover {
  transform: translateY(-4px) scale(1.05);
}
.floating-btn-title {
  display: none;
}

/* 悬浮分享按钮 */
.floating-share {
  position: fixed !important;
  bottom: 30px; /* 在购物车按钮上方 */
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  color: #1296db;
  border-radius: 50%;
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
.floating-share:hover {
  background-color: #ffffff;
  color: #0077ed;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* 悬浮在线客服按钮 */
.floating-service {
  position: fixed !important;
  bottom: 165px; /* 在分享按钮上方 */
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  color: #0d6efd;
  border-radius: 50%;
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
.floating-service:hover {
  background-color: #ffffff;
  color: #0a58ca;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* 第三方聊天按钮定位到在线客服按钮位置 */
#chat-widget-button {
  position: fixed !important;
  bottom: 100px !important;
  right: 30px !important;
  width: 50px !important;
  height: 50px !important;
  z-index: 1050 !important;
}

/* 悬浮分类按钮（原悬浮我的订单按钮位置，位于最底部） */
.floating-order {
  position: fixed !important;
  bottom: 295px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  color: #1296db;
  border-radius: 50%;
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
.floating-order:hover {
  background-color: #ffffff;
  color: #157347;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* 悬浮修改按钮（位于在线客服上方） */
.floating-edit {
  position: fixed !important;
  bottom: 165px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: rgba(255,255,255,0.8);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0,0,0,0.08);
  color: #1296db;
  border-radius: 50%;
  z-index: 1050;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
.floating-edit:hover {
  background-color: #ffffff;
  color: #5b2da7;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

/* 分享弹窗操作按钮样式 */
.share-action-btn {
  cursor: pointer;
  transition: all 0.2s ease;
}
.share-action-btn:hover {
  transform: translateY(-2px);
}
.share-action-btn:hover .share-icon-wrapper {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.share-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition: all 0.2s ease;
}

/* 文本截断样式 */
.text-line-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-line-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 底部样式 */
.footer-link {
  transition: color 0.3s ease;
}
.footer-link:hover {
  color: #fff !important;
  text-decoration: underline !important;
}

/* 链接悬停颜色 */
.hover-primary {
  transition: color 0.2s ease;
}
.hover-primary:hover {
  color: #0d6efd !important;
}

/* 动画 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 首页手风琴收缩展开 */
.collapse-header {
  transition: opacity 0.2s;
}
.collapse-arrow {
  color: #1296db;
  transition: transform 0.35s cubic-bezier(0.25,1,0.5,1);
  font-size: 1.1rem;
}
.collapse-arrow.active {
  transform: rotate(180deg);
}
.collapse-content {
  display: none;
  margin-top: 1.5rem;
}
.collapse-content.show {
  display: block;
  animation: slideDown 0.5s cubic-bezier(0.25,1,0.5,1);
}
@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 手机端悬浮按钮固定到底部（仿小程序底部工具栏） */
@media (max-width: 768px) {
  body {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  body::after {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(74px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.12);
    z-index: 1040;
    pointer-events: none;
  }

  .floating-cart,
  .floating-share,
  .floating-service,
  .floating-edit,
  .floating-order,
  #chat-widget-button {
    top: auto !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    right: auto !important;
    transform: translateX(-50%);
    margin: 0 !important;
  }

  .floating-cart,
  .floating-order,
  .floating-edit,
  .floating-share {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    border: none !important;
    background: transparent;
    box-shadow: none !important;
    display: inline-flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .floating-cart {
    left: 30% !important;
    color: #1296db;
  }

  .floating-order {
    left: 12% !important;
    color: #1296db;
  }

  .floating-edit {
    left: 50% !important;
    color: #1296db;
  }

  .floating-share {
    left: 88% !important;
    color: #1296db;
  }

  .floating-cart .bi,
  .floating-order .bi,
  .floating-edit .bi,
  .floating-share .bi {
    width: 20px;
    height: 20px;
  }

  .floating-cart .floating-btn-title,
  .floating-order .floating-btn-title,
  .floating-edit .floating-btn-title,
  .floating-share .floating-btn-title {
    display: block;
    font-size: 11px;
    line-height: 1;
    font-weight: 500;
  }

  .floating-cart .floating-btn-title {
    color: #1296db;
  }

  .floating-order {
    color: #1296db;
  }

  .floating-service,
  #chat-widget-button {
    left: 70% !important;
  }

  .floating-share {
    color: #1296db;
  }

  .floating-cart:hover,
  .floating-share:hover,
  .floating-service:hover,
  .floating-edit:hover,
  .floating-order:hover {
    transform: translateX(-50%) !important;
  }

  .floating-cart:hover,
  .floating-order:hover,
  .floating-edit:hover,
  .floating-share:hover {
    background: transparent !important;
    box-shadow: none !important;
  }

  .floating-service:hover {
    background-color: rgba(255,255,255,0.8) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  }

  .floating-cart:hover {
    color: #1296db !important;
  }

  .floating-share:hover {
    color: #1296db !important;
  }

  .floating-service:hover {
    color: #0d6efd !important;
  }

  .floating-edit:hover {
    color: #1296db !important;
  }

  .floating-order:hover {
    color: #1296db !important;
  }
}

.aspect-ratio-unset {
  aspect-ratio: unset !important;
}
