/* 首页样式 */
.main-container {
  min-height: calc(100vh - 150px);
  padding: 40px 20px;
  background-color: #f8f9fa;
}

/* 搜索区域 */
.search-container {
  max-width: 1000px;
  margin: 0 auto 40px;
  text-align: center;
  position: relative;
  z-index: 100;
}

/* 搜索标题样式（隐藏原标题，保留样式供参考） */
.search-title {
  display: none;
  font-size: 28px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.search-subtitle {
  font-size: 13px;
  color: #999;
  margin-bottom: 30px;
}

.search-box-wrapper {
  position: relative;
  padding: 0 20px;
  transition: all 0.3s ease;
}
.cart-row{
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 0;
}
.cart-box{
  background: #FFF;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  width: auto;
  min-width: 350px;
  max-width: 90%;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px, rgba(0, 0, 0, 0.06) 0px 1px 3px;
  border: 1px solid rgba(229, 231, 235, 0.8);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cart-box:hover {
  box-shadow: rgba(0, 0, 0, 0.15) 0px 8px 24px, rgba(0, 0, 0, 0.08) 0px 2px 4px;
  transform: translateY(-2px);
}

.cart-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), #2a9d5f);
  opacity: 0.7;
}

.cart-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-total {
  display: flex;
  align-items: center;
  position: relative;
}

.cart-price {
  color: #ff5252;
  font-weight: 700;
  font-size: 22px;
  margin-left: 6px;
}

.cart-count {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

/* 搜索框固定样式 - 已禁用
.search-box-sticky {
  position: fixed;
  top: 70px;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  z-index: 999;
  transform: translateY(-100%);
  animation: slideDown 0.3s forwards;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideDown {
  to {
    transform: translateY(0);
  }
}

.search-box-sticky .search-input {
  max-width: 800px;
  margin: 0 auto;
}

.search-box-sticky + .search-types {
  margin-top: 70px;
}
*/

.search-box {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 15px 60px 15px 20px;
  border-radius: 30px;
  border: 2px solid var(--border-color);
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  outline: none;
}

.search-button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.search-button:hover {
  background-color: var(--primary-color-dark);
}

.search-button svg {
  width: 20px;
  height: 20px;
}

/* 搜索类型选择 */
.search-types {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.search-type {
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: var(--white);
  border: 1px solid var(--border-color);
}

.search-type.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.search-type:hover:not(.active) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 商品列表 */
.products-container {
  max-width: 1200px;
  margin: 0 auto;
}

.products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.products-title {
  font-size: 22px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  margin: 0;
}

.products-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background-color: var(--primary-color);
  margin-right: 10px;
  border-radius: 2px;
}

.back-button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background-color: transparent;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.back-button:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.back-button svg {
  stroke: currentColor;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  position: relative;
  min-height: 300px; /* 确保有足够的高度显示无结果提示 */
}

/* 商品卡片 */
.product-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s forwards;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-image-container {
  width: 100%;
  height: 290px;
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  margin: 0 auto;
}

.product-image {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.3s ease;
  border-radius: 6px;
}

.product-info {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-name {
  font-size: 16px;
  color: var(--text-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.new-tag {
  background-color: #ff6b6b;
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}

.product-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.product-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: #e9ecef;
  color: var(--text-color-light);
}

.product-tag.primary {
  background-color: rgba(21, 117, 64, 0.1);
  color: var(--primary-color);
}

.product-prices {
  margin-bottom: 15px;
}

.current-price {
  font-size: 18px;
  font-weight: bold;
  color: #ff6b6b;
}

.original-price {
  font-size: 14px;
  color: var(--text-color-lighter);
  text-decoration: line-through;
  margin-left: 5px;
}

.member-price {
  font-size: 14px;
  color: var(--primary-color);
  margin-top: 5px;
}

.add-to-cart {
  width: 100%;
  padding: 10px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: auto;
}

.add-to-cart:hover {
  background-color: var(--primary-color-dark);
}

.add-to-cart svg {
  width: 16px;
  height: 16px;
}

/* 商品加载动画 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 无商品提示 */
.no-products {
  text-align: center;
  padding: 50px 0;
  color: var(--text-color-light);
}

/* 无搜索结果样式 */
.no-results {
  text-align: center;
  color: var(--text-color-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  padding: 40px 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.no-results-icon {
  margin-bottom: 20px;
  color: var(--primary-color);
}

.no-results h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--text-color);
}

.no-results p {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--text-color-light);
}

/* 移除不需要的样式 */
.no-results-image {
  display: none;
}

/* 加载更多按钮 */
.load-more {
  display: none; /* Hide the load more button */
}

/* Scroll Loading Indicator */
.scroll-loading-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
  color: var(--text-color);
  gap: 10px;
  border-top: 1px solid #e0e0e0;
  background-color: #f9f9f9;
  width: 100%;
  position: relative;
}

.scroll-loading-indicator.visible {
  display: flex;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .search-container {
    padding: 0 10px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  
  .product-image {
    height: 150px;
  }
  
  .product-info {
    padding: 10px;
  }
  
  .product-name {
    font-size: 14px;
  }
}

/* 产品分类入口样式 */
.category-shortcuts {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 15px;
  position: relative;
}

.category-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.category-title h2 {
  font-size: 22px;
  color: var(--text-color);
  margin: 0;
  display: flex;
  align-items: center;
}

.category-title h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background-color: var(--primary-color);
  margin-right: 10px;
  border-radius: 2px;
}

.view-all {
  display: flex;
  align-items: center;
  color: var(--primary-color);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.view-all:hover {
  color: var(--primary-color-dark);
}

.arrow-right {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  position: relative;
}

.arrow-right::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--primary-color);
  border-right: 2px solid var(--primary-color);
  transform: rotate(45deg);
  position: absolute;
  top: 4px;
  left: 0;
}

/* 分类滑动容器 */
.category-slider-container {
  position: relative;
  display: flex;
  align-items: center;
}

.category-slider {
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.category-slider::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.category-grid {
  display: flex;
  gap: 12px;
  padding: 10px 5px;
  min-width: max-content;
  align-items: stretch;
}

/* 滑动按钮 */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--white);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.slider-nav:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.slider-nav.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.slider-prev {
  left: -18px;
}

.slider-next {
  right: -18px;
}

.slider-nav svg {
  width: 18px;
  height: 18px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 12px 8px;
  border-radius: 8px;
  background-color: var(--white);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  min-width: 110px;
  max-width: 110px;
  width: 110px;
  opacity: 0; /* 初始状态不可见 */
  animation: fadeInUp 0.5s forwards;
  animation-play-state: paused;
  height: 100px;
}

/* 页面加载完成后播放动画 */
.category-grid.loaded .category-item {
  animation-play-state: running;
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.category-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  background-color: rgba(21, 117, 64, 0.1);
  border-radius: 50%;
  padding: 12px;
  color: var(--primary-color);
}

.category-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 1.5;
}

.category-name {
  font-size: 12px;
  color: var(--text-color);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  margin-top: 8px;
  line-height: 1;
}

/* 级联动画延迟 */
.category-grid .category-item:nth-child(1) { animation-delay: 0.1s; }
.category-grid .category-item:nth-child(2) { animation-delay: 0.2s; }
.category-grid .category-item:nth-child(3) { animation-delay: 0.3s; }
.category-grid .category-item:nth-child(4) { animation-delay: 0.4s; }
.category-grid .category-item:nth-child(5) { animation-delay: 0.5s; }
.category-grid .category-item:nth-child(6) { animation-delay: 0.6s; }
.category-grid .category-item:nth-child(7) { animation-delay: 0.7s; }
.category-grid .category-item:nth-child(8) { animation-delay: 0.8s; }
.category-grid .category-item:nth-child(9) { animation-delay: 0.9s; }
.category-grid .category-item:nth-child(10) { animation-delay: 1.0s; }
.category-grid .category-item:nth-child(11) { animation-delay: 1.1s; }
.category-grid .category-item:nth-child(12) { animation-delay: 1.2s; }

/* 响应式调整 */
@media (max-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  
  .category-icon {
    width: 50px;
    height: 50px;
  }
}

/* Excel-like Product Table Styles */
.product-table-container {
  max-width: 1500px;
  margin: 0 auto;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
  min-height: 300px; /* 添加最小高度确保无结果提示完整显示 */
}

.product-table-wrapper {
  position: relative;
  overflow-x: auto;
  max-height: 1300px;
  overflow-y: auto;
  min-height: 500px;
}

.product-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}

.product-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #e9f2ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.product-table th {
  padding: 12px 15px;
  text-align: center;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #c0d7f7;
  white-space: nowrap;
  border-right: 1px solid #d1e1f8;
}

.product-table th:last-child {
  border-right: none;
}

.product-table td {
  padding: 10px 15px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
  border-right: 1px solid #efefef;
  text-align: center;
}

.product-table td:last-child {
  border-right: none;
}

.product-table tbody tr:nth-child(even) {
  background-color: #f8faff;
}

.product-table tbody tr:hover {
  background-color: #edf5ff;
}

.product-table .product-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

.product-table .product-id {
  color: var(--text-color-light);
  font-size: 0.9em;
}

.product-table .stock-status {
  font-weight: 500;
}

.product-table .stock-status.in-stock {
  color: #28a745;
}

.product-table .stock-status.low-stock {
  color: #ffc107;
}

.product-table .stock-status.out-of-stock {
  color: #dc3545;
}

.product-table .action-buttons {
  display: flex;
  gap: 8px;
}

.product-table .btn {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.product-table .btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.product-table .btn-primary:hover {
  background-color: var(--primary-color-dark);
}

.product-table .btn-secondary {
  background-color: #6c757d;
  color: white;
}

.product-table .btn-secondary:hover {
  background-color: #5a6268;
}

/* Responsive adjustments for the table */
@media (max-width: 992px) {
  .product-table th,
  .product-table td {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .product-table .product-thumbnail {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 768px) {
  .product-table-wrapper {
    max-height: 500px;
  }
}

/* No Results in Table */
.product-table .no-results {
  text-align: center;
  padding: 40px 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 500px;
  background-color: var(--white);
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  z-index: 10;
}

.product-table .no-results .no-results-icon {
  margin: 0 auto 20px;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
}

.product-table .no-results h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-color);
}

.product-table .no-results p {
  font-size: 14px;
  color: var(--text-color-light);
  margin-bottom: 0;
}

/* Remove Excel Example Images styles */
.excel-example-container,
.excel-images,
.excel-image,
.excel-nav,
.excel-nav-dot {
  display: none;
}

/* Remove warehouse selector styles */
.warehouse-selector {
  display: none;
}

/* Product Image Preview */
.product-image-container {
  position: relative;
  width: 60px;
  height: 60px;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
}

.product-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.image-preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-size: 20px;
}

.product-image-container:hover .image-preview-overlay {
  opacity: 1;
}

.product-image-container:hover .product-thumbnail {
  transform: scale(1.1);
}

/* Image Preview Modal */
.image-preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.image-preview-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.preview-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 2px solid white;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.close-preview {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

/* Warehouse and Action Buttons */
.warehouse-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.warehouse-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-color);
}

.warehouse-select {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 4px;
}

.action-buttons {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.product-table .btn {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
  white-space: nowrap;
  flex: 1;
  height: 32px;
}

.product-table .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.product-table .btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.product-table .btn-primary:hover:not(:disabled) {
  background-color: var(--primary-color-dark);
}

.product-table .btn-secondary {
  background-color: #6c757d;
  color: white;
}

.product-table .btn-secondary:hover {
  background-color: #5a6268;
}

/* 推荐搜索样式 */
.recommended-searches {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.recommended-label {
  color: var(--text-color-light);
  font-size: 14px;
  margin-right: 4px;
}

.recommended-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.recommended-tag {
  padding: 6px 14px;
  background-color: #f0f8f4;
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(21, 117, 64, 0.2);
  white-space: nowrap;
  display: inline-block;
}

.recommended-tag:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(21, 117, 64, 0.2);
}

/* 响应式调整 */
@media (max-width: 576px) {
  .recommended-searches {
    flex-direction: column;
    align-items: flex-start;
    padding: 0 15px;
  }
  
  .recommended-tags {
    width: 100%;
    justify-content: flex-start;
  }
}

.empty-cart-message {
  padding: 30px 0;
  text-align: center;
  color: var(--text-color-light);
  font-size: 14px;
}

.quantity-actions {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  width: 105px;
  margin-right: 15px;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  background: #f5f5f5;
  border: none;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.quantity-btn:hover {
  background: #e0e0e0;
}

.quantity-input {
  width: 45px;
  height: 28px;
  border: none;
  text-align: center;
  font-size: 14px;
  -moz-appearance: textfield;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  background-color: white;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-delete {
  background: none;
  border: none;
  color: #ff6b6b;
  font-size: 12px;
  cursor: pointer;
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-top: 0;
}

.cart-item-delete:hover {
  text-decoration: underline;
  background-color: rgba(255, 107, 107, 0.1);
}

.cart-count-summary {
  font-size: 14px;
  color: #555;
  margin-right: 5px;
}

/* 购物车滑出面板样式 */
.cart-panel {
  position: fixed;
  bottom: -100%;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.33, 1, 0.68, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 20px;
  transform: translateY(100%);
}

.cart-panel.active {
  transform: translateY(0);
  bottom: 20px;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid #eee;
}

.cart-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.cart-close:hover {
  background-color: #f0f0f0;
}

.cart-close svg {
  width: 18px;
  height: 18px;
  stroke: #666;
}

.cart-panel-body {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cart-summary-section {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.cart-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-count {
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

.cart-detail-toggle {
  display: flex;
  align-items: center;
  background: rgba(21, 117, 64, 0.08);
  border: 1px solid rgba(21, 117, 64, 0.2);
  color: var(--primary-color);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.cart-detail-toggle:hover {
  background-color: rgba(21, 117, 64, 0.15);
}

.cart-detail-toggle svg {
  width: 16px;
  height: 16px;
  margin-left: 4px;
  transition: transform 0.2s;
}

.cart-detail-toggle.active svg {
  transform: rotate(180deg);
}

.cart-total {
  display: flex;
  align-items: center;
  margin-right: 20px;
  position: relative;
}

.cart-price {
  color: #ff5252;
  font-weight: 700;
  font-size: 22px;
  margin-left: 6px;
}

/* 购物车商品列表容器 */
.cart-items-container {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  width: 90%;
  max-width: 700px; /* Increased width to match reference */
  height: auto;
  max-height: 80vh;
  background-color: white;
  z-index: 1001;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cart-items-container.visible {
  display: flex;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cart-items-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background-color: #f9f9f9;
  border-radius: 12px 12px 0 0;
  position: relative;
}

.cart-items-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.cart-items-close {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
  margin-left: auto;
}

.cart-items-close:hover {
  background-color: #e0e0e0;
}

.cart-items-close svg {
  width: 18px;
  height: 18px;
  stroke: #666;
}

.cart-select-all {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.cart-select-all label {
  margin-right: auto;
  font-size: 14px;
  color: var(--text-color);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.cart-select-all .cart-item-checkbox {
  margin-right: 5px;
}

.cart-selection-actions {
  margin-left: auto;
}

#checkoutSelectedBtn {
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  min-width: 220px;
  background-color: #157540;
  border-radius: 4px;
  font-weight: normal;
  box-shadow: none;
}

#checkoutSelectedBtn:hover {
  background-color: #0e5c32;
  transform: none;
  box-shadow: none;
}

/* 购物车项目列表样式 */
.cart-items-list {
  padding: 0 20px;
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

.cart-item {
  display: flex;
  padding: 20px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  align-items: flex-start;
}

.cart-item:last-child {
  border-bottom: none;
  margin-bottom: 10px;
}

.cart-item-checkbox {
  margin-right: 12px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5px;
}

.cart-select-all .cart-item-checkbox {
  padding-top: 0;
}

.cart-item-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.cart-item-image {
  width: 200px;
  height: 80px;
  overflow: hidden;
  margin-right: 15px;
  flex-shrink: 0;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cart-product-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.cart-item-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 8px;
  white-space: normal;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  max-height: 39px;
}

.cart-product-id {
  display: none; /* Hide the product ID as it's not shown in the reference image */
}

.cart-item-spec {
  font-size: 13px;
  color: var(--text-color);
  margin-bottom: 8px;
  font-weight: 500;
}

.cart-item-stock {
  font-size: 13px;
  color: var(--text-color);
  display: flex;
  align-items: center;
  font-weight: 500;
}

.cart-item-stock:before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #4CAF50;
  margin-right: 5px;
}

/* Style the out of stock indicator differently */
.cart-item-stock.out-of-stock:before {
  background-color: #ff5252;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  min-width: 120px;
}

.cart-panel-footer {
  display: flex;
  align-items: center;
  gap: 15px;
}

.cart-checkout-btn {
  padding: 8px 18px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(21, 117, 64, 0.2);
}

.cart-checkout-btn:hover {
  background-color: var(--primary-color-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(21, 117, 64, 0.3);
}

/* 购物车模态框的遮罩层 */
.cart-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.cart-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* 购物车底部面板遮罩层 */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}
.ai-search-assistant{
  margin: 20px 0;
}
/* AI搜索助手按钮 */
.ai-assistant-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, #1e88e5, #1565c0);
  border-radius: 20px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  border: none;
  box-shadow: none;
}

.ai-assistant-btn:hover {
  background-color: #d6ecff;
}

.ai-assistant-btn i {
  font-size: 15px;
  margin-right: 6px;
}

/* 图标旋转动画 */
.ai-icon-rotate {
  animation: rotating 2s linear infinite;
}

@keyframes rotating {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .cart-panel {
    max-height: 85vh;
  }
  
  .cart-item {
    flex-wrap: wrap;
  }
  
  .cart-item-actions {
    width: 100%;
    flex-direction: row;
    margin-top: 10px;
    justify-content: space-between;
  }
  
  .cart-item-delete {
    margin-top: 0;
  }
}

.fixed-table-header {
  display: none;
  background-color: #e9f2ff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-bottom: 2px solid #c0d7f7;
  animation-duration: 0.3s;
  animation-fill-mode: both;
  will-change: opacity, transform;
  backface-visibility: hidden; /* 提高动画性能 */
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d; /* 提高动画性能 */
  -webkit-transform-style: preserve-3d;
  perspective: 1000px; /* 提高动画性能 */
  -webkit-perspective: 1000px;
}

.fixed-table-header th {
  padding: 12px 15px;
  text-align: center;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  border-right: 1px solid #d1e1f8;
  background-color: #e9f2ff; /* 确保背景色一致 */
}

.fixed-table-header th:last-child {
  border-right: none;
}

/* 确保表格容器有正确的定位上下文 */
.product-table-container {
  position: relative;
}

/* 确保表格在移动设备上也能正确显示 */
@media (max-width: 768px) {
  .fixed-table-header {
    top: 70px !important; /* 确保在移动设备上也固定在正确位置 */
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutUp {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* 无结果提示单元格 */
.no-results-cell {
  height: 300px;
  position: relative;
  padding: 0 !important;
  vertical-align: middle;
}

/* 图片搜索按钮样式 */
.image-search-button {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 8px; /* 改为方形带圆角 */
  background-color: #1e88e5;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 2;
}

.image-search-button:hover {
  background-color: #1565c0;
}

.image-search-button i {
  font-size: 20px;
}

/* 调整原有搜索按钮的间距 */
.search-input {
  padding-right: 110px; /* 为两个按钮预留空间 */
}

/* 平台logo样式 */
.platform-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
}

.search-logo {
  max-width: 260px;
  height: auto;
}

/* 热搜榜样式 */
.hot-search-section {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
}

.hot-search-container {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  width: 100%;
  overflow: hidden;
  padding: 0;
  border: 1px solid #eaeaea;
}

.hot-search-header {
  padding: 14px 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f9f9f9;
}

.hot-search-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: #333;
  display: flex;
  align-items: center;
}

.hot-search-title::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background-color: var(--primary-color);
  margin-right: 10px;
  border-radius: 2px;
}

.hot-search-list {
  display: flex;
  padding: 10px 0;
}

.hot-search-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hot-search-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: all 0.2s;
  box-sizing: border-box;
  border-bottom: 1px dashed #f0f0f0;
}

.hot-search-item:last-child {
  border-bottom: none;
}

.hot-search-item:hover {
  background-color: #f5f5f5;
  color: var(--primary-color);
}

.hot-search-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 14px;
  font-weight: bold;
  margin-right: 12px;
  color: #fff;
  background-color: #d9d9d9;
  flex-shrink: 0;
}

.rank-1, .rank-2, .rank-3 {
  background-color: var(--primary-color);
}

.hot-search-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.hot-search-tag {
  font-size: 12px;
  border-radius: 3px;
  padding: 2px 6px;
  margin-left: 8px;
  background-color: var(--primary-color);
  color: #fff;
  flex-shrink: 0;
}

.hot-search-tag.new-tag {
  background-color: #ff9800;
}

.hot-search-tag.rank-tag {
  background-color: #2196F3;
}

/* 在移动设备上改为单列显示 */
@media (max-width: 768px) {
  .hot-search-list {
    flex-direction: column;
  }
  
  .hot-search-column {
    width: 100%;
  }
}

/* 数量步进器样式 */
.quantity-selector {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  overflow: hidden;
  /* margin: 8px auto; */
  width: 120px;
  height: 32px;
}

.quantity-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  color: #666;
  transition: all 0.2s ease;
  user-select: none;
}

.quantity-btn:hover {
  background: #e9ecef;
  color: var(--primary-color);
}

.quantity-btn:active {
  background: #dee2e6;
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.quantity-input {
  flex: 1;
  height: 32px;
  border: none;
  text-align: center;
  font-size: 14px;
  background: #fff;
  color: #333;
  -moz-appearance: textfield;
  outline: none;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-input:focus {
  background: #f8f9fa;
}

/* 仓库操作区域布局调整 */
.warehouse-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.warehouse-name {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  text-align: center;
  width: 100%;
}

.warehouse-select {
  width: 120px;
  padding: 6px 8px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
  margin: 0 auto;
}

.action-buttons {
  display: flex;
  gap: 6px;
  width: 120px;
  margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .quantity-selector {
    width: 100px;
    height: 28px;
    margin: 6px auto;
  }
  
  .quantity-btn {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .quantity-input {
    height: 28px;
    font-size: 12px;
  }
  
  .warehouse-action {
    gap: 6px;
    align-items: center;
  }
  
  .action-buttons {
    gap: 4px;
    width: 100px;
    margin: 0 auto;
  }
  
  .warehouse-select {
    width: 100px;
    font-size: 11px;
  }
}

.el-table .el-table__cell{
  text-align: center !important;
}
.el-table__header{
      background-color: #e9f2ff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}
.el-table .el-table__cell{
    border-bottom: 2px solid #e0e0e0  !important;
    border-right: 1px solid #efefef  !important;
    background-color:transparent !important;
}
.el-table__header-wrapper .el-table__cell{
      border-bottom: 2px solid #c0d7f7 !important;
    border-right: 1px solid #d1e1f8 !important;
    padding: 10px 0 !important;
}
.el-table tr{
   background-color:transparent !important;
}
.pagination-layet{
  padding: 30px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.el-pagination.is-background .el-pager li ,.el-pagination.is-background .btn-next,.el-pagination.is-background .btn-prev:disabled{
      display: flex;
    align-items: center;
    justify-content: center;
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #ddd !important;
    background-color: #fff !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all 0.3s;
    color: #666 !important;
}
.el-pagination.is-background .btn-prev:disabled{
      opacity: 0.5 !important;
}
.el-pagination.is-background .el-pager li.is-active{
  background-color: #157540 !important;
  border:1px solid #157540 !important;
  color: #fff !important;
}
.el-pagination.is-background .el-pager li:hover {
    border-color: #157540 !important;
    color: #157540 !important;
    background-color: rgba(21, 117, 64, 0.05);
}