/* 产品展示：左侧 Tab + 右侧网格 */

.product-showcase-layout {
  display: grid;
  gap: 1.5rem;
  align-items: stretch;
}

.product-showcase-sidebar {
  position: relative;
  min-width: 0;
}

.product-showcase-sidebar__label {
  margin: 0 0 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgb(255 255 255 / 92%);
}

.product-showcase-panels {
  min-width: 0;
}

/* 移动端：横向滚动 Tab */
.product-showcase-layout .product-tabs {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 0;
  border-bottom: 2px solid rgb(195 3 25 / 18%);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.product-showcase-layout .product-tab-btn {
  flex: 0 0 auto;
  padding: 0.625rem 1.125rem;
  white-space: nowrap;
  position: relative;
  border-radius: 0.5rem;
}

.product-showcase-layout .product-tab-btn.is-active::after {
  display: none;
}

.product-showcase-layout .product-showcase-sidebar__all-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.125rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 600;
  color: rgb(255 255 255 / 88%);
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.product-showcase-layout .product-showcase-sidebar__all-link:hover {
  color: #fff;
  background: rgb(195 3 25 / 18%);
}

/* 移动端：标题在 Tab 条上方 */
.product-showcase-layout .product-showcase-sidebar__label {
  margin-bottom: 0.625rem;
  padding-bottom: 0;
  border-bottom: none;
  color: var(--brand-red, #c30319);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (width >= 1024px) {
  .product-showcase-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    /* 侧栏与产品卡片区之间的横向间隙 */
    gap: 3rem;
  }

  .product-showcase-sidebar {
    position: sticky;
    top: 6.5rem;
    display: flex;
    flex-direction: column;
  }

  .product-showcase-layout .product-tabs {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
    overflow: visible;
    padding: 1rem 1rem 1.125rem;
    margin-bottom: 0;
    border: 1px solid rgb(195 3 25 / 18%);
    border-top: 3px solid var(--brand-red, #c30319);
    border-radius: 1rem;
    background: linear-gradient(180deg, var(--brand-black, #111928) 0%, #1a2234 100%);
    box-shadow: 0 12px 32px rgb(17 25 40 / 14%);
  }

  .product-showcase-layout .product-tab-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: rgb(255 255 255 / 78%);
    border-left: 3px solid transparent;
    background: transparent;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .product-showcase-layout .product-tab-btn:hover:not(.is-active) {
    color: #fff;
    background: rgb(195 3 25 / 18%);
    border-left-color: rgb(195 3 25 / 55%);
  }

  .product-showcase-layout .product-tab-btn.is-active {
    color: #fff !important;
    background: linear-gradient(90deg, var(--brand-red, #c30319) 0%, #9a0215 100%);
    border-left-color: #fff;
    box-shadow: 0 4px 14px rgb(195 3 25 / 32%);
  }

  .product-showcase-layout .product-tab-btn.is-active::after {
    display: none;
  }

  .product-showcase-layout .product-showcase-sidebar__all-link {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgb(255 255 255 / 12%);
    border-radius: 0.5rem;
    color: rgb(255 255 255 / 88%);
    border-left: 3px solid transparent;
  }

  .product-showcase-layout .product-showcase-sidebar__all-link:hover {
    color: #fff;
    background: rgb(195 3 25 / 18%);
    border-left-color: rgb(195 3 25 / 55%);
  }

  .product-showcase-panels {
    padding: 1.75rem 1.875rem;
    border-radius: 1rem;
    border: 1px solid rgb(195 3 25 / 14%);
    background: linear-gradient(145deg, #fff 0%, var(--brand-gray-tint, #fdf2f3) 100%);
    box-shadow: 0 12px 32px rgb(17 25 40 / 8%);
  }

  .product-showcase-panels .product-tab-panel {
    transition: opacity 0.25s ease;
  }

  .dark .product-showcase-panels {
    background: linear-gradient(145deg, #1f2937 0%, #111928 100%);
    border-color: rgb(195 3 25 / 22%);
  }

  .product-showcase-panels .product-tab-grid__item {
    width: 100%;
    margin-bottom: 0;
    padding: 0;
  }
}

/* 右侧产品网格：卡片行列间隙 */
.product-showcase-panels .product-tab-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.75rem;
  margin: 0;
}

@media (width >= 640px) {
  .product-showcase-panels .product-tab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

@media (width >= 1280px) {
  .product-showcase-panels .product-tab-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.25rem;
  }
}
