/* ===== UI优化：商品查看按钮和Shop页面重构 - CSS版本 ===== */

/* 变量定义 */
:root {
  --primary: #0F2F4F; /* Dark blue for header, footer, headings, navigation */
  --accent: #6FD0C1; /* Teal for interactive components */
  --secondary: #F0F7FF; /* Light blue content separator */
  --neutralDark: #0F2F4F; /* Dark blue for text */
  --borderColor: #D1E0F0; /* Light blue border */
  --white: #FFFFFF; /* White background */
  --button-shadow: 0 4px 12px rgba(15, 47, 79, 0.08);
  --button-shadow-hover: 0 8px 25px rgba(15, 47, 79, 0.1);
  --filter-shadow: 0 8px 25px rgba(15, 47, 79, 0.08);
}

/* 1. 商品查看按钮优化 */
.product-view-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: 1.2rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--button-shadow);
  overflow: hidden;
}

.product-view-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.product-view-btn:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.product-view-btn:hover::before {
  left: 100%;
}

.product-view-btn:active {
  transform: translateY(0);
  box-shadow: var(--button-shadow);
}

.product-view-btn .icon {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.product-view-btn .icon:hover {
  transform: scale(1.1);
}

/* 2. Shop页面标题样式重构 */
.shop-page-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
  animation: fadeInUp 0.6s ease-out;
}

.shop-page-title::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* 3. 创新筛选按钮样式 */
.filter-btn {
  position: relative;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--borderColor);
  border-radius: 1.5rem;
  background: var(--white);
  color: var(--neutralDark);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 1;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--primary);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.filter-btn:hover {
  color: var(--white);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--filter-shadow);
}

.filter-btn:hover::before {
  width: 100%;
}

.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(15, 47, 79, 0.08);
}

/* 4. 筛选区域背景优化 */
.filters-container {
  background: var(--secondary);
  border: 1px solid var(--borderColor);
  border-radius: 1.2rem;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(15, 47, 79, 0.08);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
  animation-delay: 0.2s;
}

.filters-container::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(15, 47, 79, 0.05) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* 5. 商品计数样式优化 */
.product-count {
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 4px 15px rgba(15, 47, 79, 0.08);
  animation: fadeInUp 0.6s ease-out;
  animation-delay: 0.4s;
}

/* 6. 动画增强 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 7. 响应式设计优化 */
/* 移动端 */
@media (max-width: 767px) {
  .shop-page-title {
    font-size: 2rem;
  }

  .product-view-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }

  .filter-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
  }

  .filters-container {
    padding: 1rem;
  }

  .product-count {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* 平板端 */
@media (min-width: 768px) and (max-width: 1023px) {
  .shop-page-title {
    font-size: 2.25rem;
  }
}

/* 桌面端 */
@media (min-width: 1024px) {
  .shop-page-title {
    font-size: 2.75rem;
  }

  .product-view-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
  }

  .filter-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
  }
}