/*
 * odi frontend design system
 * 全站统一的前台设计令牌与公共组件层：主题色、字体、圆角、阴影、公共类。
 *
 * 设计原则（重要）：
 * - 只提供继承式与单类选择器样式，禁止 !important 与通配符强制覆盖，
 *   保证用户在页面/模板里写的自定义样式能按正常层叠规则覆盖本文件。
 * - 默认字体 Noto Sans SC 通过重定义 --ui-font-sans 应用，
 *   body 及其后代以继承方式获得，用户内容设置 font-family 时自然生效。
 * - 本文件仅加载于前台文档；后台样式完全独立，互不影响。
 */

:root {
    /* 默认字体：Noto Sans SC 优先，逐级回退，不锁定用户内容 */
    --ui-font-sans: "Noto Sans SC", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

    /* 主题色令牌（Aceternity 风格：中性底 + 靛紫点缀） */
    --ax-accent: #6366f1;
    --ax-accent-vivid: #a855f7;
    --ax-accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --ax-accent-ring: rgba(99, 102, 241, .16);
    --ax-accent-border: #c7d2fe;
    --ax-ink: #111113;
    --ax-muted: #6b7280;
    --ax-border: #e5e7eb;
    --ax-border-strong: #d4d4d8;
    --ax-canvas: #ffffff;
    --ax-surface: #ffffff;
    --ax-surface-muted: #fafafa;
    --ax-radius: 16px;
    --ax-radius-sm: 12px;
    --ax-radius-pill: 9999px;
    --ax-shadow-hover: 0 10px 30px -12px rgba(99, 102, 241, .18);
    --ax-shadow-soft: 0 4px 16px rgba(17, 17, 19, .06);
}

/* ==========================================================================
 * 版式与文本
 * ========================================================================== */

.ax-section {
    position: relative;
    padding: 72px 20px;
}

.ax-wrap {
    width: 100%;
    max-width: 1080px;
    margin-inline: auto;
}

.ax-narrow {
    max-width: 760px;
}

.ax-head {
    margin-bottom: 36px;
}

.ax-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ax-muted);
}

.ax-eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: var(--ax-radius-pill);
    background: var(--ax-accent-gradient);
}

.ax-title {
    margin: 14px 0 10px;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.18;
    letter-spacing: -.02em;
    font-weight: 600;
    color: var(--ax-ink);
}

.ax-heading {
    margin: 14px 0 10px;
    font-size: clamp(22px, 2.6vw, 28px);
    line-height: 1.25;
    letter-spacing: -.01em;
    font-weight: 600;
    color: var(--ax-ink);
}

.ax-sub {
    max-width: 640px;
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--ax-muted);
}

.ax-meta {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--ax-muted);
}

/* ==========================================================================
 * 按钮与徽标
 * ========================================================================== */

.ax-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--ax-radius-pill);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background-color .25s ease;
}

.ax-btn:hover,
.ax-btn:focus-visible {
    transform: translateY(-1px);
}

.ax-btn .ax-arrow {
    transition: transform .25s ease;
}

.ax-btn:hover .ax-arrow {
    transform: translateX(3px);
}

.ax-btn-primary {
    background: var(--ax-ink);
    color: #fff;
}

.ax-btn-primary:hover,
.ax-btn-primary:focus-visible {
    color: #fff;
    box-shadow: 0 0 0 4px var(--ax-accent-ring);
}

.ax-btn-ghost {
    background: var(--ax-surface);
    color: var(--ax-ink);
    border-color: var(--ax-border);
}

.ax-btn-ghost:hover,
.ax-btn-ghost:focus-visible {
    color: var(--ax-ink);
    border-color: var(--ax-accent-border);
    box-shadow: var(--ax-shadow-soft);
}

.ax-btn-light {
    background: #fff;
    color: var(--ax-ink);
}

.ax-btn-light:hover,
.ax-btn-light:focus-visible {
    color: var(--ax-ink);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, .18);
}

.ax-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-pill);
    background: var(--ax-surface);
    font-size: 12.5px;
    color: #52525b;
}

.ax-badge .ax-dot {
    width: 6px;
    height: 6px;
    border-radius: var(--ax-radius-pill);
    background: var(--ax-accent-gradient);
}

.ax-chip {
    display: inline-block;
    padding: 4px 12px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-pill);
    background: var(--ax-surface-muted);
    font-size: 12px;
    color: #52525b;
}

/* ==========================================================================
 * 卡片与网格
 * ========================================================================== */

.ax-card {
    position: relative;
    padding: 22px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    background: var(--ax-surface);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.ax-card:hover {
    border-color: var(--ax-accent-border);
    box-shadow: var(--ax-shadow-hover);
    transform: translateY(-2px);
}

.ax-card-title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ax-ink);
}

.ax-card-title a.ax-card-link {
    color: inherit;
    text-decoration: none;
}

.ax-card-title a.ax-card-link:hover {
    color: var(--ax-accent);
}

.ax-card-text {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--ax-muted);
}

.ax-card-body {
    padding-top: 14px;
}

.ax-grid {
    display: grid;
    gap: 16px;
}

.ax-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* 产品集合筛选：桌面侧栏、移动端自然折叠。 */
.ax-catalog-layout.has-facets,
.ax-catalog-layout:has(> .product-filter-facets),
.product-catalog-layout.has-facets {
    display: grid;
    grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.ax-catalog-results,
.product-catalog-results {
    min-width: 0;
}

.product-filter-facets {
    position: sticky;
    top: 20px;
    padding: 18px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    background: color-mix(in srgb, var(--ax-surface) 94%, transparent);
}

.product-filter-facets-head,
.product-filter-group-title,
.product-filter-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-filter-facets-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ax-border);
}

.product-filter-clear,
.product-filter-group-title a {
    color: var(--ax-accent);
    font-size: 12px;
    text-decoration: none;
}

.product-filter-group {
    padding-top: 16px;
}

.product-filter-group + .product-filter-group {
    margin-top: 16px;
    border-top: 1px solid var(--ax-border);
}

.product-filter-group-title {
    margin-bottom: 8px;
    color: var(--ax-ink);
    font-size: 13px;
    font-weight: 600;
}

.product-filter-options {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-filter-option {
    justify-content: flex-start;
    padding: 7px 8px;
    border-radius: 7px;
    color: var(--ax-muted);
    font-size: 13px;
    text-decoration: none;
}

.product-filter-option:hover,
.product-filter-option.is-active {
    background: var(--ax-accent-soft);
    color: var(--ax-accent);
}

.product-filter-option.is-empty:not(.is-active) {
    opacity: .48;
}

.product-filter-label {
    min-width: 0;
    overflow-wrap: anywhere;
}

.product-filter-depth {
    margin-right: 3px;
    color: var(--ax-border-strong);
}

.product-filter-count {
    margin-left: auto;
    color: var(--ax-muted);
    font-variant-numeric: tabular-nums;
}

.product-filter-swatch {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border: 1px solid var(--ax-border-strong);
    border-radius: 50%;
    background: var(--filter-swatch, transparent);
}

.ax-bento {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ax-bento > .ax-span-2 { grid-column: span 2; }
.ax-bento > .ax-span-3 { grid-column: span 3; }
.ax-bento > .ax-span-6 { grid-column: span 6; }

.ax-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.ax-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ax-accent);
    text-decoration: none;
}

.ax-link .ax-arrow {
    transition: transform .25s ease;
}

.ax-link:hover .ax-arrow {
    transform: translateX(3px);
}

/* ==========================================================================
 * 媒体、状态与提示
 * ========================================================================== */

.ax-media {
    display: block;
    overflow: hidden;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-sm);
    background: var(--ax-surface-muted);
    aspect-ratio: 4 / 3;
}

.ax-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.ax-card:hover .ax-media img {
    transform: scale(1.03);
}

.ax-media-wide {
    aspect-ratio: 21 / 9;
    margin: 22px 0;
}

.ax-empty {
    padding: 44px 20px;
    border: 1px dashed var(--ax-border-strong);
    border-radius: var(--ax-radius);
    background: var(--ax-surface-muted);
    text-align: center;
    color: var(--ax-muted);
}

.ax-notice {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 24px;
    padding: 12px 18px;
    border: 1px solid #fde68a;
    border-radius: var(--ax-radius-sm);
    background: #fffbeb;
    color: #92400e;
    font-size: 14px;
}

.ax-terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--ax-muted);
}

.ax-terms a {
    display: inline-block;
    padding: 3px 12px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-pill);
    background: var(--ax-surface-muted);
    color: #52525b;
    font-size: 12px;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease;
}

.ax-terms a:hover {
    border-color: var(--ax-accent-border);
    color: var(--ax-accent);
}

.ax-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.ax-pagination a,
.ax-pagination span,
.ax-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 6px 12px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-pill);
    background: var(--ax-surface);
    color: #3f3f46;
    font-size: 13px;
    text-decoration: none;
}

.ax-pagination .active span,
.ax-pagination .active,
.ax-pagination [aria-current] {
    background: var(--ax-ink);
    border-color: var(--ax-ink);
    color: #fff;
}

/* ==========================================================================
 * 正文排版（详情内容区）
 * ========================================================================== */

.ax-prose {
    font-size: 15px;
    line-height: 1.85;
    color: #3f3f46;
}

.ax-prose h2,
.ax-prose h3,
.ax-prose h4 {
    margin: 28px 0 12px;
    color: var(--ax-ink);
    font-weight: 600;
    line-height: 1.3;
}

.ax-prose h2 { font-size: 22px; }
.ax-prose h3 { font-size: 18px; }
.ax-prose h4 { font-size: 16px; }

.ax-prose p { margin: 0 0 14px; }

.ax-prose a {
    color: var(--ax-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ax-prose ul,
.ax-prose ol {
    margin: 0 0 14px;
    padding-left: 22px;
}

.ax-prose img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-sm);
}

.ax-prose blockquote {
    margin: 0 0 14px;
    padding: 10px 18px;
    border-left: 3px solid var(--ax-accent-border);
    background: var(--ax-surface-muted);
    border-radius: 0 var(--ax-radius-sm) var(--ax-radius-sm) 0;
    color: var(--ax-muted);
}

.ax-prose code {
    padding: 2px 6px;
    border: 1px solid var(--ax-border);
    border-radius: 6px;
    background: var(--ax-surface-muted);
    font-family: var(--ui-font-mono);
    font-size: 13px;
}

.ax-prose table {
    width: 100%;
    margin: 0 0 14px;
    border-collapse: collapse;
    font-size: 14px;
}

.ax-prose table th,
.ax-prose table td {
    padding: 10px 12px;
    border: 1px solid var(--ax-border);
    text-align: left;
}

.ax-prose table th {
    background: var(--ax-surface-muted);
    font-weight: 600;
    color: var(--ax-ink);
}

/* ==========================================================================
 * 详情页布局（产品/文章）
 * ========================================================================== */

.ax-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 36px;
    align-items: start;
    margin-top: 18px;
}

.ax-detail-media .carousel-item img,
.ax-detail-media > img {
    width: 100%;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    object-fit: cover;
}

.ax-detail-info .ax-price-lg {
    margin: 14px 0 6px;
    font-size: 24px;
    font-weight: 600;
    color: var(--ax-ink);
}

.ax-detail-info .ax-sku {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--ax-muted);
}

.ax-detail-info .ax-sku code {
    padding: 2px 8px;
    border: 1px solid var(--ax-border);
    border-radius: 6px;
    background: var(--ax-surface-muted);
    font-family: var(--ui-font-mono);
}

.ax-detail-tables {
    margin-top: 14px;
}

.ax-detail-tables table {
    width: 100%;
    margin-bottom: 14px;
    border-collapse: collapse;
    font-size: 14px;
}

.ax-detail-tables table th,
.ax-detail-tables table td {
    padding: 9px 12px;
    border: 1px solid var(--ax-border);
    text-align: left;
}

.ax-detail-tables table th {
    background: var(--ax-surface-muted);
    color: var(--ax-ink);
    font-weight: 600;
    width: 34%;
}

.ax-detail-cart {
    margin: 18px 0 6px;
}

.ax-detail-body-grid {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 36px;
    align-items: start;
    margin-top: 48px;
    padding-top: 40px;
    border-top: 1px solid var(--ax-border);
}

.ax-inquiry {
    padding: 24px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    background: var(--ax-surface-muted);
}

.ax-inquiry h2 {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ax-ink);
}

/* ==========================================================================
 * 首页组件：数据、步骤、FAQ、深色 CTA、联系页
 * ========================================================================== */

.ax-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    max-width: 720px;
    margin: 44px 0 0;
}

.ax-stat {
    margin: 0;
    padding: 18px 20px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-sm);
    background: color-mix(in srgb, var(--ax-surface) 80%, transparent);
}

.ax-stat-value {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--ax-ink);
}

.ax-stat-label {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--ax-muted);
}

.ax-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: ax-step;
}

.ax-step {
    position: relative;
    padding: 22px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    background: var(--ax-surface);
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}

.ax-step:hover {
    border-color: var(--ax-accent-border);
    box-shadow: var(--ax-shadow-hover);
    transform: translateY(-2px);
}

.ax-step-num {
    display: inline-flex;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ax-accent);
    letter-spacing: .08em;
}

.ax-step-num::before {
    counter-increment: ax-step;
    content: "0" counter(ax-step);
}

.ax-faq {
    display: grid;
    gap: 12px;
}

.ax-faq details {
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-sm);
    background: var(--ax-surface);
    transition: border-color .25s ease;
}

.ax-faq details[open] {
    border-color: var(--ax-accent-border);
}

.ax-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--ax-ink);
    cursor: pointer;
    list-style: none;
}

.ax-faq summary::-webkit-details-marker {
    display: none;
}

.ax-faq summary::after {
    content: "+";
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 400;
    color: var(--ax-muted);
    transition: transform .25s ease;
}

.ax-faq details[open] summary::after {
    transform: rotate(45deg);
}

.ax-faq details p {
    margin: 0;
    padding: 0 20px 16px;
    font-size: 14px;
    line-height: 1.75;
    color: var(--ax-muted);
}

.ax-dark {
    position: relative;
    overflow: hidden;
    padding: 48px 28px;
    border-radius: 20px;
    background: #0a0a0a;
    color: #fff;
    text-align: center;
}

.ax-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(500px 200px at 50% 0, rgba(99, 102, 241, .35), transparent 70%);
    pointer-events: none;
}

.ax-dark-title {
    position: relative;
    margin: 0 0 10px;
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 600;
    letter-spacing: -.01em;
}

.ax-dark-sub {
    position: relative;
    max-width: 560px;
    margin: 0 auto 24px;
    font-size: 15px;
    line-height: 1.7;
    color: #a1a1aa;
}

.ax-dark .ax-btn {
    position: relative;
}

.ax-contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 36px;
    align-items: start;
    margin-top: 8px;
}

.ax-form-card {
    padding: 26px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius);
    background: var(--ax-surface);
    box-shadow: var(--ax-shadow-soft);
}

.ax-form-card h2 {
    margin: 0 0 16px;
    font-size: 18px;
    font-weight: 600;
    color: var(--ax-ink);
}

.ax-form-card input[type="text"],
.ax-form-card input[type="email"],
.ax-form-card input[type="tel"],
.ax-form-card input[type="url"],
.ax-form-card textarea,
.ax-form-card select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-sm);
    background: var(--ax-canvas);
    font: inherit;
    font-size: 14px;
    color: var(--ax-ink);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.ax-form-card input:focus,
.ax-form-card textarea:focus,
.ax-form-card select:focus {
    outline: none;
    border-color: var(--ax-accent);
    box-shadow: 0 0 0 4px var(--ax-accent-ring);
}

.ax-form-card button[type="submit"],
.ax-form-card .btn,
.ax-form-card button:not([type]) {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--ax-radius-pill);
    background: var(--ax-ink);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: box-shadow .25s ease, transform .25s ease;
}

.ax-form-card button[type="submit"]:hover,
.ax-form-card .btn:hover,
.ax-form-card button:not([type]):hover {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px var(--ax-accent-ring);
}

.ax-info-list {
    display: grid;
    gap: 14px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.ax-info-list li {
    padding: 14px 18px;
    border: 1px solid var(--ax-border);
    border-radius: var(--ax-radius-sm);
    background: var(--ax-surface-muted);
    font-size: 14px;
    color: #3f3f46;
}

/* ==========================================================================
 * 背景装饰
 * ========================================================================== */

.ax-dots {
    background-image: radial-gradient(circle, var(--ax-border) 1px, transparent 1px);
    background-size: 22px 22px;
}

.ax-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 240px at 50% -60px, rgba(99, 102, 241, .10), transparent 70%);
    pointer-events: none;
}

/* ==========================================================================
 * 响应式
 * ========================================================================== */

@media (max-width: 900px) {
    .ax-detail-grid,
    .ax-detail-body-grid,
    .ax-contact-grid,
    .ax-catalog-layout.has-facets,
    .ax-catalog-layout:has(> .product-filter-facets),
    .product-catalog-layout.has-facets {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .product-filter-facets {
        position: static;
    }

    .ax-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ax-bento > .ax-span-2,
    .ax-bento > .ax-span-3,
    .ax-bento > .ax-span-6 {
        grid-column: span 2;
    }

    .ax-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ax-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ax-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .ax-section {
        padding: 52px 16px;
    }

    .ax-grid-3,
    .ax-bento,
    .ax-steps,
    .ax-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .ax-dark {
        padding: 36px 20px;
    }
}
