/* 首页产品区 — 参考科室导航：分类 Tab + 产品卡片网格 */
.wel-products--dept {
  padding: 3rem 0 2.5rem;
  background: #f5f5f5 url(../images/y16.png) no-repeat right bottom;
  background-size: 20.75rem 16.25rem;
}

.wel-dept-wrap {
  margin: 0 auto;
}

.wel-dept-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.wel-dept-title .cn {
  font-size: 0.9rem;
  line-height: 1.2;
  color: #231f20;
  font-weight: bold;
}

.wel-dept-title .en {
  font-size: 0.45rem;
  color: #888;
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wel-dept-title .en:before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 2px;
  background: #e70012;
  vertical-align: middle;
  margin-right: 0.35rem;
}

.wel-dept-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0.5rem;
  max-width: 100%;
}

.wel-dept-tab {
  border: none;
  background: transparent;
  padding: 0.35rem 0.55rem;
  font-size: 0.42rem;
  color: #666;
  cursor: pointer;
  position: relative;
  line-height: 1.4;
  transition: color 0.25s ease;
}

.wel-dept-tab:after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0;
  height: 2px;
  background: #e70012;
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.wel-dept-tab.is-active {
  color: #e70012;
  font-weight: bold;
}

.wel-dept-tab.is-active:after {
  transform: scaleX(1);
}

.wel-dept-panel {
  display: none !important;
}

.wel-dept-panel.is-active {
  display: block !important;
}

.wel-dept-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: #eee;
}

.wel-dept-card {
  display: block;
  background: #fafafa;
  color: inherit;
  text-decoration: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.wel-dept-card:hover {
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.wel-dept-card__img {
  position: relative;
  width: 100%;
  padding-top: 62%;
  overflow: hidden;
  background: #e8e8e8;
}

.wel-dept-card__img img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.wel-dept-card:hover .wel-dept-card__img img {
  transform: scale(1.05);
}

.wel-dept-card__body {
  position: relative;
  padding: 0.55rem 0.65rem 0.65rem;
  min-height: 2.2rem;
}

.wel-dept-card__tit {
  font-size: 0.48rem;
  line-height: 1.35;
  color: #231f20;
  font-weight: bold;
  padding-right: 1rem;
}

.wel-dept-card__sub {
  font-size: 0.38rem;
  color: #999;
  margin-top: 0.2rem;
  line-height: 1.3;
}

.wel-dept-card__arrow {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.35rem;
  height: 0.35rem;
  border-top: 1px solid #ccc;
  border-right: 1px solid #ccc;
  transform: translateY(-50%) rotate(45deg);
  opacity: 0.6;
}

.wel-dept-more {
  text-align: center;
  padding-top: 1.35rem;
}

.wel-dept-more .wel-more {
  display: inline-block;
  margin: 0 auto;
  min-width: 3.5rem;
}

@media (max-width: 1200px) {
  .wel-dept-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .wel-products--dept {
    padding: 1.5rem 0 1.25rem;
  }

  .wel-dept-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .wel-dept-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .wel-dept-tab {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .wel-dept-grid {
    grid-template-columns: 1fr;
  }
}
