/* 通用基础样式覆盖（自定义 Reset + 基线） */
* {
  margin: 0;
  padding: 0;
  border: 0;
  list-style: none;
  outline: none;
}
/* 盒模型与排版优化 */
html {
  box-sizing: border-box;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}

/* 文档与字体 */
html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #ffffff;
  color: #0f172a; /* slate-900 */
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 媒体元素 */
img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* 标题与文本 */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}
p {
  margin: 0;
}

/* 列表 */
ul,
ol {
  margin: 0;
  padding: 0;
}
li {
  margin: 0;
}

/* 链接 */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover {
  text-decoration: underline;
}

/* 表单控件 */
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: 0;
  background-color: transparent;
}
button {
  cursor: pointer;
}
input::placeholder,
textarea::placeholder {
  color: #94a3b8; /* slate-400 */
}

/* 表格与分隔线 */
table {
  border-collapse: collapse;
  width: 100%;
}
hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 1rem 0;
}

/* 代码块 */
pre,
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}

/* 首屏轮播占满视口（扣除头部高度） */
.full-viewport-under-header {
  min-height: calc(100vh - var(--header-height, 0px));
}
.full-viewport-under-header .swiper {
  height: 100%;
}
.full-viewport-under-header .swiper-slide {
  height: 100%;
}
.full-viewport-under-header .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
}

/* Swiper fallback styles if vendor CSS fails to load */
.swiper {
  position: relative;
}
.swiper-pagination {
  position: absolute;
  left: 50% !important;
  transform: translateX(-50%) !important;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.35);
  width: auto !important;
}
.swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  background: rgba(255, 255, 255, 0.6) !important;
  opacity: 1 !important;
  border-radius: 9999px !important;
  margin: 0 !important;
  transition: width 0.25s ease, background 0.25s ease;
}
.swiper-pagination-bullet-active {
  width: 32px !important;
  height: 8px !important;
  background: #ffffff !important;
  border-radius: 9999px !important;
}
.swiper-button-next,
.swiper-button-prev {
  color: #000;
}

/* Facet options pill style */
.facet-pill {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border-radius: 30px;
  /* background: #f1f5f9; */
  border: 2px solid #f1f5f9;
  color: #334155;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
    color 0.2s ease;
  font-size: 13px;
}
/* 增加空间用于显示清除叉号 */
.facet-pill {
  position: relative;
  padding-right: 28px;
}
.facet-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  line-height: 1;
  font-weight: 600;
  color: #64748b; /* slate-500 */
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
label:hover .facet-clear {
  color: #0f172a;
}
.facet:checked + .facet-pill .facet-clear {
  opacity: 1;
}
label:hover .facet-pill {
  background: #f1f5f9; /* slate-200 */
}
.facet:checked + .facet-pill {
  border-color: #000;
  color: #000;
}
.facet:disabled + .facet-pill {
  opacity: 0.5;
  cursor: not-allowed;
}
.facet {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Segmented control pills for contact page */
.seg-pill {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 9999px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1; /* slate-300 */
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}
label:hover .seg-pill {
  background: #f1f5f9;
}
.seg {
  /* visually hidden radios */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.seg:focus + .seg-pill {
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.15);
}
.seg:checked + .seg-pill {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.input-underline {
  border: none;
  border-bottom: 1px solid #cbd5e1;
  border-radius: 0;
  background: transparent;
}
.input-underline:focus {
  outline: none;
  border-bottom-color: #0f172a;
  box-shadow: none;
}

/* Tabs */
.tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 0;
  margin-bottom: 12px;
}
.tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #334155;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tab-btn::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 6px;
  background: #000;
}
.tab-btn:hover {
  color: #0f172a;
}
.tab-btn.is-active {
  color: #000;
}
.tab-btn.is-active::after {
  background: linear-gradient(90deg, #000 0%, #2f2f2f 35%, #f9c97a 95%);
}

.feature-table {
  width: 100%;
  border-collapse: collapse;
}
.feature-table thead th {
  background: #cfe3ee;
  font-weight: 700;
  text-align: center;
  font-size: 14px;
}
.feature-table tbody td {
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
  font-size: 14px;
  color: #334155;
}
.feature-table tbody tr:last-child td {
  border-bottom: 0;
}
.feature-table tbody td:first-child {
  font-weight: 700;
  color: #0f172a;
  width: 240px;
}
.feature-table .ft-yes {
  position: relative;
}
.feature-table .ft-yes::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f2a94b;
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: inset 0 0 0 2px #f7d49c;
}
.feature-table .ft-neutral {
  position: relative;
}
.feature-table .ft-neutral::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e5e7eb;
  margin-right: 10px;
  vertical-align: middle;
}
.feature-table .ft-no {
  position: relative;
}
.feature-table .ft-no::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d1d5db;
  margin-right: 10px;
  vertical-align: middle;
}

/* Ensure custom swiper navs stay clickable */
.related-prev,
.related-next {
  pointer-events: auto;
}
.nav-disabled {
  opacity: 0.6;
}

.qa-accordion {
  padding-top: 8px;
  padding-bottom: 8px;
}
.qa-accordion .qa-item {
  border-color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.qa-accordion .qa-item.is-open {
  border-color: #cbd5e1;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}
.qa-accordion .qa-toggle {
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.qa-accordion .qa-toggle:hover {
  background-color: #f8fafc;
}
.qa-accordion .qa-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9999px;
  background: #f1f5f9;
  color: #0f172a;
}
.qa-accordion .qa-panel {
  color: #334155;
  line-height: 1.75;
}

/* Related Swiper Hover Effects */
.related-swiper .swiper-slide .rounded-xl img {
  transition: transform 0.4s ease;
}

.related-swiper .swiper-slide .rounded-xl .font-semibold,
.related-swiper .swiper-slide .rounded-xl .text-slate-500 {
  transition: transform 0.4s ease;
}

.related-swiper .swiper-slide:hover .rounded-xl img {
  transform: scale(0.9);
}

.related-swiper .swiper-slide:hover .rounded-xl .font-semibold,
.related-swiper .swiper-slide:hover .rounded-xl .text-slate-500 {
  transform: translateY(-10px);
}

/* Multi-line clamp utility */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  word-break: break-word;
}

/* Multi-level Dropdown */
.dropdown-item {
  position: relative;
}
.dropdown-submenu {
  position: absolute;
  top: -1px; /* Align top borders */
  left: 100%;
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s ease;
  pointer-events: none;
}
.dropdown-item:hover > .dropdown-submenu {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
