/* 产品中心页面专属样式 */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  border: 0;
}

.product-filters {
  background: var(--white);
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
}

.filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-medium);
  transition: all 0.2s ease;
  font-weight: 500;
}

.filter-btn:hover {
  background: rgba(15, 76, 117, 0.05);
  border-color: rgba(15, 76, 117, 0.2);
  color: var(--primary-color);
}

.filter-btn.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--white);
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.search-box input {
  border: none;
  background: transparent;
  outline: none;
  padding: 0.5rem 0.25rem;
  min-width: 200px;
  font-size: 14px;
  color: var(--text-dark);
}

.search-box input::placeholder {
  color: var(--text-light);
}

.search-btn {
  background: var(--primary-color);
  border: none;
  color: var(--white);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.2s ease;
}

.search-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.05);
}

.filter-tip {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 1rem;
}

.products-gallery {
  background: #fff;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 25px;
  margin-top: 2.5rem;
}

.product-card {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: all 0.35s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}
.product-card .card-inner {
  padding: 1rem 0.95rem 1.2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.9rem;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img img {
  transform: scale(1.07);
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.35;
  margin-bottom: 0.4rem;
}
.product-desc {
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.4;
  flex-grow: 1;
  margin-bottom: 0.7rem;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.tag {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: #fff;
}
.tag-otc {
  background: #059669;
}
.tag-rx {
  background: #dc2626;
}
.tag-device {
  background: #6366f1;
}
.tag-health {
  background: #f59e0b;
}
.spec {
  font-size: 0.65rem;
  color: #475569;
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

/* 合规模块 */
.compliance-text {
  max-width: 900px;
  margin: 0 auto;
  background: linear-gradient(145deg, #ffffff, #f1f5f9);
  border: 1px solid #e2e8f0;
  padding: 2rem 2rem 1.8rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}
.compliance-text p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.65;
}
.compliance-text p:last-child {
  margin-bottom: 0;
}

/* 动画可见时补间 */
.product-card.animate-fade-up.visible {
  animation: pop-in 0.55s cubic-bezier(0.16, 0.8, 0.3, 1);
}
@keyframes pop-in {
  0% {
    transform: translateY(25px) scale(0.96);
    opacity: 0;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* 响应式 */
@media (max-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
@media (max-width: 640px) {
  .filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .search-box {
    width: 100%;
  }
  .search-box input {
    width: 100%;
    min-width: 0;
  }
}
