/*
 * TOPSHOP 主题主样式（M0 占位）
 *
 * 全部 CSS 变量通过 :root 输出，由主题选项实时驱动。
 * 真实业务样式将在 M1-M10 阶段添加。
 */

:root {
    --topshop-primary: #0057A0;
    --topshop-secondary: #66BC29;
    --topshop-accent: #D4002A;
    --topshop-text: #333333;
    --topshop-radius: 6px;
    --topshop-container: 1200px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--topshop-text);
    line-height: 1.6;
}

.topshop-container {
    max-width: var(--topshop-container);
    margin: 0 auto;
    padding: 0 16px;
}

.topshop-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 9999;
}
.topshop-skip-link:focus {
    left: 8px;
    top: 8px;
    background: #fff;
    padding: 8px 12px;
    border: 2px solid var(--topshop-primary);
}

.topshop-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 16px 0;
}
.topshop-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.topshop-header-branding {
    flex: 0 0 auto;
}
.topshop-site-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--topshop-primary);
    text-decoration: none;
}
.topshop-nav-primary {
    flex: 1 1 auto;
}
.topshop-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 16px;
    flex-wrap: wrap;
}
.topshop-menu a {
    text-decoration: none;
    color: var(--topshop-text);
}
.topshop-menu a:hover {
    color: var(--topshop-primary);
}
.topshop-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topshop-lang-list {
    list-style: none;
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
}
.topshop-lang-item a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--topshop-text);
    padding: 4px 8px;
    border: 1px solid transparent;
    border-radius: var(--topshop-radius);
}
.topshop-lang-item.is-current a {
    border-color: var(--topshop-primary);
    color: var(--topshop-primary);
}
.topshop-cart-link {
    position: relative;
    text-decoration: none;
    color: var(--topshop-text);
}
.topshop-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--topshop-accent);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
}

.topshop-main {
    padding: 32px 0;
    min-height: 60vh;
}

.topshop-page-title {
    font-size: 24px;
    margin: 0 0 16px;
}

.topshop-loop {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.topshop-post {
    background: #fff;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
}
.topshop-post-title {
    font-size: 18px;
    margin: 0 0 8px;
}
.topshop-post-title a {
    color: var(--topshop-text);
    text-decoration: none;
}
.topshop-post-title a:hover {
    color: var(--topshop-primary);
}

.topshop-footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 32px 0 16px;
    margin-top: 48px;
}
.topshop-footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.topshop-footer-bottom {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #333;
}
.topshop-copyright {
    margin: 0;
    font-size: 13px;
}
.topshop-copyright a {
    color: var(--topshop-secondary);
    text-decoration: none;
}

.topshop-no-posts {
    text-align: center;
    padding: 48px 16px;
    color: #666;
}

/* ===== M1: 面包屑 ===== */
.topshop-breadcrumb-wrap {
    background: #f6f7f7;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.topshop-breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    color: #666;
}
.topshop-breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.topshop-breadcrumb-item a {
    color: var(--topshop-primary);
    text-decoration: none;
}
.topshop-breadcrumb-item a:hover {
    text-decoration: underline;
}
.topshop-breadcrumb-sep {
    color: #ccc;
    margin: 0 4px;
}

/* ===== M1: 布局（主区 + 侧边栏） ===== */
.topshop-layout {
    display: grid;
    gap: 32px;
    margin: 24px 0;
}
.topshop-layout.has-sidebar-right {
    grid-template-columns: 1fr 280px;
}
.topshop-layout.has-sidebar-left {
    grid-template-columns: 280px 1fr;
}
.topshop-layout.has-sidebar-none {
    grid-template-columns: 1fr;
}
.topshop-sidebar .topshop-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
    padding: 16px;
    margin-bottom: 16px;
}
.topshop-widget-title {
    font-size: 14px;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #1a1a1a;
    border-bottom: 2px solid var(--topshop-primary);
    padding-bottom: 8px;
    display: inline-block;
}

/* ===== M1: 文章卡片 ===== */
.topshop-loop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.topshop-post-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
    flex-direction: column;
}
.topshop-post-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}
.topshop-post-card-thumb {
    display: block;
    overflow: hidden;
    aspect-ratio: 16/10;
    background: #f0f0f0;
}
.topshop-post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.topshop-post-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #999;
    font-size: 13px;
}
.topshop-post-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.topshop-post-card-title {
    font-size: 16px;
    margin: 0 0 8px;
    line-height: 1.4;
}
.topshop-post-card-title a {
    color: var(--topshop-text);
    text-decoration: none;
}
.topshop-post-card-title a:hover {
    color: var(--topshop-primary);
}
.topshop-post-card-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.topshop-post-card-sep {
    color: #ddd;
}
.topshop-post-card-excerpt {
    font-size: 14px;
    color: #666;
    flex: 1 1 auto;
    margin-bottom: 12px;
}
.topshop-post-card-readmore {
    color: var(--topshop-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.topshop-post-card-readmore:hover {
    text-decoration: underline;
}

/* ===== M1: 文章详情 ===== */
.topshop-post-single,
.topshop-page-article,
.topshop-front-article {
    background: #fff;
    padding: 24px;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
}
.topshop-post-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}
.topshop-post-title {
    font-size: 28px;
    margin: 0 0 12px;
    line-height: 1.3;
}
.topshop-post-meta {
    font-size: 13px;
    color: #999;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.topshop-post-thumb,
.topshop-page-thumb {
    margin: 0 0 24px;
    border-radius: var(--topshop-radius);
    overflow: hidden;
}
.topshop-post-thumb img,
.topshop-page-thumb img {
    width: 100%;
    height: auto;
    display: block;
}
.topshop-entry-content {
    font-size: 16px;
    line-height: 1.8;
    color: #2c2c2c;
}
.topshop-entry-content h2,
.topshop-entry-content h3,
.topshop-entry-content h4 {
    margin: 1.5em 0 .5em;
    line-height: 1.3;
}
.topshop-entry-content p {
    margin: 0 0 1em;
}
.topshop-entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--topshop-radius);
}
.topshop-post-tags {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.topshop-post-tags a {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    margin: 0 4px 4px 0;
    text-decoration: none;
    color: #555;
    font-size: 12px;
}
.topshop-post-tags a:hover {
    background: var(--topshop-primary);
    color: #fff;
}

/* ===== M1: 上下篇导航 ===== */
.topshop-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 24px 0;
    padding: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
}
.topshop-post-nav-prev,
.topshop-post-nav-next {
    flex: 1;
    text-decoration: none;
    color: var(--topshop-text);
    padding: 8px 12px;
    border-radius: var(--topshop-radius);
    transition: background .2s ease;
}
.topshop-post-nav-prev:hover,
.topshop-post-nav-next:hover {
    background: #f6f7f7;
}
.topshop-post-nav-next {
    text-align: right;
}
.topshop-post-nav-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 4px;
}
.topshop-post-nav-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

/* ===== M1: 分页 ===== */
.topshop-pagination {
    margin: 32px 0;
    text-align: center;
}
.topshop-pagination ul {
    list-style: none;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0;
    padding: 0;
}
.topshop-pagination li a,
.topshop-pagination li span {
    display: inline-block;
    min-width: 36px;
    height: 36px;
    line-height: 36px;
    padding: 0 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
    color: var(--topshop-text);
    text-decoration: none;
    text-align: center;
    font-size: 14px;
}
.topshop-pagination li a:hover {
    background: #f6f7f7;
    color: var(--topshop-primary);
}
.topshop-pagination li span.current {
    background: var(--topshop-primary);
    border-color: var(--topshop-primary);
    color: #fff;
}

/* ===== M1: 404 ===== */
.topshop-404-content {
    text-align: center;
    padding: 64px 16px;
}
.topshop-404-title {
    font-size: 96px;
    font-weight: 900;
    margin: 0;
    color: var(--topshop-primary);
    line-height: 1;
}
.topshop-404-subtitle {
    font-size: 24px;
    margin: 16px 0;
    color: var(--topshop-text);
}
.topshop-404-text {
    color: #666;
    margin-bottom: 24px;
}
.topshop-404-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.topshop-button {
    display: inline-block;
    padding: 10px 24px;
    background: var(--topshop-primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--topshop-radius);
    font-weight: 600;
    transition: opacity .2s ease;
}
.topshop-button:hover {
    opacity: .9;
    color: #fff;
}

/* ===== M1: 首页 hero ===== */
.topshop-hero {
    background: linear-gradient(135deg, var(--topshop-primary) 0%, var(--topshop-secondary) 100%);
    color: #fff;
    padding: 64px 0;
    text-align: center;
}
.topshop-hero-title {
    font-size: 36px;
    margin: 0 0 12px;
    color: #fff;
}
.topshop-hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, .9);
    margin: 0;
}
.topshop-front-content {
    padding: 32px 0;
}

/* ===== M1: 头部 - 移动端菜单按钮 ===== */
.topshop-menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ddd;
    border-radius: var(--topshop-radius);
    padding: 6px 10px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--topshop-text);
}
.topshop-menu-toggle:hover {
    border-color: var(--topshop-primary);
    color: var(--topshop-primary);
}
.topshop-site-tagline {
    font-size: 12px;
    color: #888;
    margin: 2px 0 0;
}
.topshop-header-titles {
    display: flex;
    flex-direction: column;
}

/* ===== M1: 搜索面板 ===== */
.topshop-search-panel {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 16px 0;
}
.topshop-search-form {
    display: flex;
    gap: 8px;
}
.topshop-search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--topshop-radius);
    font-size: 14px;
}
.topshop-search-input:focus {
    border-color: var(--topshop-primary);
    outline: none;
}
.topshop-search-submit {
    padding: 8px 20px;
    background: var(--topshop-primary);
    color: #fff;
    border: none;
    border-radius: var(--topshop-radius);
    cursor: pointer;
    font-weight: 600;
}
.topshop-search-submit:hover {
    opacity: .9;
}

/* ===== M1: 头部操作区（搜索/语言/购物车） ===== */
.topshop-action-item {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--topshop-text);
    text-decoration: none;
    padding: 8px;
    border-radius: var(--topshop-radius);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}
.topshop-action-item:hover {
    background: #f6f7f7;
    color: var(--topshop-primary);
}
.topshop-language-switcher {
    position: relative;
}
.topshop-lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--topshop-radius);
    color: var(--topshop-text);
    font-size: 13px;
}
.topshop-lang-toggle:hover {
    background: #f6f7f7;
    color: var(--topshop-primary);
}
.topshop-lang-dropdown {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--topshop-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
    min-width: 140px;
    z-index: 99;
    display: none;
}
.topshop-language-switcher.is-open .topshop-lang-dropdown {
    display: block;
}
.topshop-lang-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--topshop-text);
    font-size: 13px;
}
.topshop-lang-item a:hover {
    background: #f6f7f7;
    color: var(--topshop-primary);
}
.topshop-lang-item.is-current a {
    color: var(--topshop-primary);
    font-weight: 600;
}

/* ===== M7: 商品卡片 ===== */
.topshop-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
    display: flex;
    flex-direction: column;
}
.topshop-product-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
    transform: translateY(-2px);
}
.topshop-product-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
    flex: 1;
}
.topshop-product-card-thumb {
    background: #f6f7f7;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}
.topshop-product-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.topshop-product-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
}
.topshop-product-card-body {
    padding: 12px 14px;
}
.topshop-product-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.4;
    color: var(--topshop-text);
}
.topshop-product-card-price {
    color: var(--topshop-accent);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 4px;
}
.topshop-product-card-sku {
    color: #888;
    font-size: 12px;
}
.topshop-product-card-actions {
    padding: 10px 14px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f0f0;
}

/* ===== M7: 按钮系统 ===== */
.topshop-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border-radius: var(--topshop-radius);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.topshop-button-primary {
    background: var(--topshop-primary);
    color: #fff;
    border-color: var(--topshop-primary);
}
.topshop-button-primary:hover {
    background: #004a87;
    color: #fff;
}
.topshop-button-secondary {
    background: #fff;
    color: var(--topshop-primary);
    border-color: var(--topshop-primary);
}
.topshop-button-secondary:hover {
    background: var(--topshop-primary);
    color: #fff;
}
.topshop-button-inquire {
    background: var(--topshop-accent);
    color: #fff;
    border-color: var(--topshop-accent);
}
.topshop-button-inquire:hover {
    background: #b30024;
    color: #fff;
}
.topshop-inquire-block {
    margin: 24px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: var(--topshop-radius);
    text-align: center;
}
.topshop-inquire-note {
    color: #666;
    font-size: 13px;
    margin: 10px 0 0;
}

/* ===== M7: B2B 事实块 ===== */
.topshop-b2b-facts {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
    background: #fafbfc;
}
.topshop-b2b-facts-title {
    font-size: 18px;
    margin: 0 0 12px;
    color: var(--topshop-primary);
}
.topshop-b2b-facts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.topshop-b2b-facts-table th,
.topshop-b2b-facts-table td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #eaeaea;
}
.topshop-b2b-facts-table th {
    background: #f0f4f8;
    color: #555;
    font-weight: 600;
    width: 30%;
    white-space: nowrap;
}
.topshop-b2b-facts-table tr:last-child th,
.topshop-b2b-facts-table tr:last-child td {
    border-bottom: 0;
}

/* ===== M7: FAQ ===== */
.topshop-faq-item {
    padding: 18px 0;
    border-bottom: 1px solid #eee;
}
.topshop-faq-item:first-child {
    border-top: 1px solid #eee;
}
.topshop-faq-question {
    font-size: 17px;
    margin: 0 0 8px;
    color: var(--topshop-text);
}
.topshop-faq-answer {
    color: #555;
    line-height: 1.7;
    font-size: 15px;
}
.topshop-faq-permalink {
    display: inline-block;
    margin-top: 8px;
    color: var(--topshop-primary);
    font-size: 13px;
    text-decoration: none;
}
.topshop-faq-permalink:hover {
    text-decoration: underline;
}

/* ===== M7: 案例卡片 ===== */
.topshop-case-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
    overflow: hidden;
    transition: box-shadow .2s ease;
}
.topshop-case-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, .08);
}
.topshop-case-card-link {
    color: inherit;
    text-decoration: none;
    display: block;
}
.topshop-case-card-thumb {
    background: #f6f7f7;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}
.topshop-case-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.topshop-case-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
}
.topshop-case-card-body {
    padding: 14px 16px 18px;
}
.topshop-case-card-title {
    font-size: 16px;
    margin: 0 0 6px;
    font-weight: 600;
}
.topshop-case-card-meta {
    color: #888;
    font-size: 12px;
    margin: 0 0 8px;
}
.topshop-case-card-sep {
    margin: 0 6px;
}
.topshop-case-card-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* ===== M7: 横幅 ===== */
.topshop-banner {
    position: relative;
    margin-bottom: 24px;
    border-radius: var(--topshop-radius);
    overflow: hidden;
    background: #f0f4f8;
}
.topshop-banner-image img {
    width: 100%;
    height: auto;
    display: block;
}
.topshop-banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 32px;
    background: linear-gradient(to right, rgba(0,0,0,.55), transparent 70%);
    color: #fff;
}
.topshop-banner-title {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.topshop-banner-text {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}
.topshop-banner-cta {
    align-self: flex-start;
}

/* ===== M7: 询盘表单 ===== */
.topshop-inquiry-form {
    max-width: 640px;
    margin: 24px auto;
    padding: 24px;
    background: #fafbfc;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius);
}
.topshop-inquiry-form .topshop-form-row {
    margin-bottom: 14px;
}
.topshop-inquiry-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
}
.topshop-inquiry-form input[type="text"],
.topshop-inquiry-form input[type="email"],
.topshop-inquiry-form input[type="number"],
.topshop-inquiry-form input[type="tel"],
.topshop-inquiry-form textarea,
.topshop-inquiry-form select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: var(--topshop-radius);
    font-size: 14px;
    background: #fff;
    font-family: inherit;
}
.topshop-inquiry-form input:focus,
.topshop-inquiry-form textarea:focus,
.topshop-inquiry-form select:focus {
    border-color: var(--topshop-primary);
    outline: none;
}
.topshop-inquiry-form textarea {
    min-height: 100px;
    resize: vertical;
}
.topshop-inquiry-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    background: var(--topshop-primary);
    color: #fff;
    border: none;
    border-radius: var(--topshop-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.topshop-inquiry-form button[type="submit"]:hover {
    background: #004a87;
}
.topshop-inquiry-form button[type="submit"]:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.topshop-inquiry-msg {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--topshop-radius);
    font-size: 14px;
    display: none;
}
.topshop-inquiry-msg.is-success {
    background: #e7f7ec;
    color: #166534;
    display: block;
}
.topshop-inquiry-msg.is-error {
    background: #fdecec;
    color: #991b1b;
    display: block;
}

/* ===== M7: 列表视图切换 ===== */
.topshop-view-toggle {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: var(--topshop-radius);
    padding: 2px;
}
.topshop-view-toggle [data-view] {
    background: transparent;
    border: 0;
    padding: 6px 12px;
    cursor: pointer;
    color: #555;
    border-radius: calc(var(--topshop-radius) - 2px);
    font-size: 13px;
}
.topshop-view-toggle [data-view].is-active {
    background: var(--topshop-primary);
    color: #fff;
}

/* ===== M7: 商品循环（grid / list） ===== */
.topshop-loop {
    display: grid;
    gap: 16px;
}
.topshop-loop.is-grid {
    grid-template-columns: repeat(4, 1fr);
}
.topshop-loop.is-list .topshop-product-card {
    flex-direction: row;
}
.topshop-loop.is-list .topshop-product-card-thumb {
    flex: 0 0 240px;
    aspect-ratio: 1 / 1;
}
@media (max-width: 1024px) {
    .topshop-loop.is-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .topshop-loop.is-grid { grid-template-columns: repeat(2, 1fr); }
    .topshop-loop.is-list .topshop-product-card { flex-direction: column; }
    .topshop-loop.is-list .topshop-product-card-thumb { flex: 0 0 auto; }
}
@media (max-width: 480px) {
    .topshop-loop.is-grid { grid-template-columns: 1fr; }
}

/* ===== M7: noscript fallback ===== */
.topshop-noscript-fallback {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===== M8: 首页模块区 ===== */
.topshop-section-title {
    font-size: 24px;
    margin: 0 0 20px;
    text-align: center;
    color: var(--topshop-text);
}
.topshop-featured-products,
.topshop-cases,
.topshop-faq-list,
.topshop-home-cta {
    padding: 40px 0;
    border-top: 1px solid #eee;
}
.topshop-featured-products:first-of-type,
.topshop-cases:first-of-type,
.topshop-faq-list:first-of-type {
    border-top: 0;
}
.topshop-home-cta {
    background: linear-gradient(135deg, var(--topshop-primary) 0%, #003f74 100%);
    color: #fff;
    text-align: center;
}
.topshop-home-cta-title {
    font-size: 28px;
    margin: 0 0 10px;
    color: #fff;
}
.topshop-home-cta-text {
    font-size: 15px;
    margin: 0 auto 18px;
    max-width: 640px;
    color: rgba(255, 255, 255, .92);
}
.topshop-home-cta .topshop-button-inquire {
    background: #fff;
    color: var(--topshop-primary);
    border-color: #fff;
}
.topshop-home-cta .topshop-button-inquire:hover {
    background: #f0f4f8;
    color: var(--topshop-primary);
}

/* ===== M8: 列数控制 ===== */
.topshop-loop-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.topshop-loop-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.topshop-loop-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.topshop-loop-cols-5 { grid-template-columns: repeat(5, 1fr) !important; }
.topshop-loop-cols-6 { grid-template-columns: repeat(6, 1fr) !important; }
@media (max-width: 1024px) {
    .topshop-loop-cols-5,
    .topshop-loop-cols-6 { grid-template-columns: repeat(3, 1fr) !important; }
    .topshop-loop-cols-4 { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 768px) {
    .topshop-loop-cols-3,
    .topshop-loop-cols-4,
    .topshop-loop-cols-5,
    .topshop-loop-cols-6 { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
    .topshop-loop-cols-2,
    .topshop-loop-cols-3,
    .topshop-loop-cols-4,
    .topshop-loop-cols-5,
    .topshop-loop-cols-6 { grid-template-columns: 1fr !important; }
}

/* ===== M8: 联系我们页 ===== */
.topshop-contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 32px;
    margin: 24px 0 40px;
}
.topshop-contact-info {
    background: #f8f9fa;
    border-radius: var(--topshop-radius);
    padding: 24px;
}
.topshop-contact-item {
    margin: 0 0 12px;
    color: var(--topshop-text);
}
.topshop-contact-item strong {
    color: var(--topshop-primary);
    display: block;
    margin-bottom: 4px;
}
.topshop-contact-item a {
    color: var(--topshop-text);
    text-decoration: none;
}
.topshop-contact-item a:hover {
    color: var(--topshop-primary);
    text-decoration: underline;
}
.topshop-social-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
}
.topshop-social-list li {
    margin-bottom: 6px;
    word-break: break-all;
}
.topshop-social-list a {
    color: var(--topshop-primary);
    text-decoration: none;
    font-size: 13px;
}
.topshop-social-list a:hover {
    text-decoration: underline;
}
@media (max-width: 768px) {
    .topshop-contact-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* ===== M8: Hero 区域 ===== */
.topshop-hero {
    padding: 56px 0 40px;
    text-align: center;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}
.topshop-hero-title {
    font-size: 36px;
    margin: 0 0 14px;
    color: var(--topshop-text);
    line-height: 1.2;
}
.topshop-hero-subtitle {
    font-size: 16px;
    color: #555;
    margin: 0 auto 22px;
    max-width: 720px;
}
@media (max-width: 768px) {
    .topshop-hero { padding: 32px 0 24px; }
    .topshop-hero-title { font-size: 26px; }
    .topshop-home-cta-title { font-size: 22px; }
    .topshop-section-title { font-size: 20px; }
}

/* ===== M8: 商品 B2B 快速信息 ===== */
.topshop-product-b2b-quick {
    list-style: none;
    padding: 12px 14px;
    margin: 16px 0;
    background: #fafbfc;
    border-radius: var(--topshop-radius);
    border: 1px solid #eee;
}
.topshop-product-b2b-quick li {
    display: inline-block;
    margin-right: 14px;
    color: #555;
    font-size: 13px;
}
.topshop-product-b2b-quick strong {
    color: var(--topshop-primary);
    margin-right: 4px;
}

/* ===== M8: 商品详情布局 ===== */
.topshop-product-single {
    margin: 24px 0;
}
.topshop-product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}
.topshop-product-summary > .summary,
.topshop-product-summary .product_title {
    margin-top: 0;
}
@media (max-width: 768px) {
    .topshop-product-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== M9: Widget 通用样式 ===== */
.topshop-widget {
    margin-bottom: 28px;
    font-size: 14px;
    line-height: 1.6;
}
.topshop-widget-title {
    font-size: 16px;
    margin: 0 0 12px;
    color: var(--topshop-primary);
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--topshop-primary);
}
.topshop-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.topshop-widget li {
    margin-bottom: 10px;
}
.topshop-widget a {
    color: var(--topshop-text);
    text-decoration: none;
}
.topshop-widget a:hover {
    color: var(--topshop-primary);
}

/* 最近文章 widget */
.topshop-widget-recent-posts li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.topshop-widget-recent-posts li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.topshop-widget-post-date {
    color: #888;
    font-size: 12px;
}

/* 最近商品 widget */
.topshop-widget-product-link {
    display: flex;
    gap: 10px;
    align-items: center;
}
.topshop-widget-product-thumb {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    background: #f6f7f7;
    border-radius: 4px;
    overflow: hidden;
}
.topshop-widget-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.topshop-widget-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.topshop-widget-product-title {
    font-size: 13px;
    line-height: 1.4;
}
.topshop-widget-product-price {
    color: var(--topshop-accent);
    font-size: 12px;
    font-weight: 600;
}

/* 联系信息 widget */
.topshop-widget-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.topshop-widget-contact li {
    margin-bottom: 8px;
    color: var(--topshop-text);
}
.topshop-widget-contact strong {
    color: var(--topshop-primary);
    margin-right: 4px;
}

/* 社交 widget */
.topshop-widget-social li {
    word-break: break-all;
    font-size: 12px;
    color: #555;
}
.topshop-widget-social a {
    color: var(--topshop-primary);
}

/* 跳过链接 */
.topshop-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--topshop-primary);
    color: #fff;
    padding: 8px 14px;
    z-index: 100000;
    text-decoration: none;
}
.topshop-skip-link:focus {
    top: 0;
}

/* ===== M12: 版块构建器（动态首页） ===== */
.topshop-section {
    padding: 40px 0;
    border-top: 1px solid #eee;
}
.topshop-section:first-of-type {
    border-top: 0;
}
.topshop-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}
.topshop-section-head .topshop-section-title {
    margin: 0;
    text-align: left;
}
.topshop-section-cta {
    color: var(--topshop-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.topshop-section-cta:hover {
    text-decoration: underline;
}
.topshop-section-subtitle {
    text-align: center;
    color: #6b7280;
    margin: -8px 0 24px;
}

/* B2B 关键数据 */
.topshop-b2b-facts-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(4, 1fr);
}
.topshop-b2b-facts-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.topshop-b2b-facts-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.topshop-b2b-facts-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.topshop-b2b-facts-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.topshop-b2b-facts-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.topshop-b2b-fact-item {
    text-align: center;
    padding: 12px;
}
.topshop-b2b-fact-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: var(--topshop-primary);
    display: block;
    margin: 0 auto 8px;
}
.topshop-b2b-fact-value {
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    line-height: 1.2;
}
.topshop-b2b-fact-unit {
    font-size: 18px;
    color: var(--topshop-primary);
    margin-left: 2px;
}
.topshop-b2b-fact-label {
    margin-top: 4px;
    color: #6b7280;
    font-size: 14px;
}

/* 品牌墙 */
.topshop-brands-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(6, 1fr);
}
.topshop-brands-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.topshop-brands-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.topshop-brands-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.topshop-brands-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.topshop-brands-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
.topshop-brands-grid-cols-7 { grid-template-columns: repeat(7, 1fr); }
.topshop-brands-grid-cols-8 { grid-template-columns: repeat(8, 1fr); }
.topshop-brand-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    transition: all .15s;
}
.topshop-brand-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transform: translateY(-1px);
}
.topshop-brand-link {
    display: block;
    text-align: center;
    text-decoration: none;
    color: #1d2327;
    width: 100%;
}
.topshop-brand-logo {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(.2);
    transition: filter .2s;
}
.topshop-brand-item:hover .topshop-brand-logo {
    filter: grayscale(0);
}
.topshop-brand-name {
    font-size: 14px;
    font-weight: 600;
}

/* 客户评价 */
.topshop-testimonials-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, 1fr);
}
.topshop-testimonials-grid-cols-1 { grid-template-columns: 1fr; }
.topshop-testimonials-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.topshop-testimonials-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.topshop-testimonials-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.topshop-testimonial-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.topshop-testimonial-rating {
    color: #f0b400;
    font-size: 18px;
    margin-bottom: 12px;
}
.topshop-testimonial-rating .topshop-star {
    color: #dcdcde;
}
.topshop-testimonial-rating .topshop-star.is-filled {
    color: #f0b400;
}
.topshop-testimonial-content {
    margin: 0 0 16px;
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    flex: 1;
    border: 0;
    padding: 0;
}
.topshop-testimonial-author {
    display: flex;
    align-items: center;
    gap: 10px;
}
.topshop-testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f1;
}
.topshop-testimonial-meta {
    display: flex;
    flex-direction: column;
}
.topshop-testimonial-name {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}
.topshop-testimonial-role {
    color: #6b7280;
    font-size: 12px;
}

/* 邮件订阅 */
.topshop-newsletter-inner {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}
.topshop-newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.topshop-newsletter-input {
    flex: 1;
    min-width: 240px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}
.topshop-newsletter-submit {
    flex: 0 0 auto;
}
.topshop-newsletter-feedback {
    flex-basis: 100%;
    margin: 8px 0 0;
    color: #6b7280;
    font-size: 13px;
}
.topshop-newsletter-feedback.is-success { color: #16a34a; }
.topshop-newsletter-feedback.is-error { color: #dc2626; }

/* hero / cta 沿用 M8 的样式（topshop-hero / topshop-home-cta） */
.topshop-section-hero {
    padding: 80px 0;
    text-align: center;
    background: var(--topshop-primary);
    color: #fff;
}
.topshop-section-hero .topshop-hero-title {
    font-size: 36px;
    margin: 0 0 12px;
    color: #fff;
}
.topshop-section-hero .topshop-hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, .92);
    margin: 0 0 24px;
}

@media (max-width: 1024px) {
    .topshop-b2b-facts-grid-cols-5,
    .topshop-b2b-facts-grid-cols-6,
    .topshop-brands-grid-cols-6,
    .topshop-brands-grid-cols-7,
    .topshop-brands-grid-cols-8 {
        grid-template-columns: repeat(3, 1fr);
    }
    .topshop-testimonials-grid-cols-3,
    .topshop-testimonials-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 768px) {
    .topshop-b2b-facts-grid,
    .topshop-b2b-facts-grid-cols-3,
    .topshop-b2b-facts-grid-cols-4,
    .topshop-b2b-facts-grid-cols-5,
    .topshop-b2b-facts-grid-cols-6,
    .topshop-brands-grid,
    .topshop-brands-grid-cols-4,
    .topshop-brands-grid-cols-5,
    .topshop-brands-grid-cols-6,
    .topshop-brands-grid-cols-7,
    .topshop-brands-grid-cols-8,
    .topshop-testimonials-grid,
    .topshop-testimonials-grid-cols-2,
    .topshop-testimonials-grid-cols-3,
    .topshop-testimonials-grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .topshop-section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .topshop-newsletter-form {
        flex-direction: column;
    }
    .topshop-newsletter-input {
        min-width: 0;
    }
}
@media (max-width: 480px) {
    .topshop-b2b-facts-grid,
    .topshop-b2b-facts-grid-cols-2,
    .topshop-b2b-facts-grid-cols-3,
    .topshop-b2b-facts-grid-cols-4,
    .topshop-b2b-facts-grid-cols-5,
    .topshop-b2b-facts-grid-cols-6,
    .topshop-brands-grid,
    .topshop-brands-grid-cols-2,
    .topshop-brands-grid-cols-3,
    .topshop-brands-grid-cols-4,
    .topshop-brands-grid-cols-5,
    .topshop-brands-grid-cols-6,
    .topshop-brands-grid-cols-7,
    .topshop-brands-grid-cols-8,
    .topshop-testimonials-grid,
    .topshop-testimonials-grid-cols-1,
    .topshop-testimonials-grid-cols-2,
    .topshop-testimonials-grid-cols-3,
    .topshop-testimonials-grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
 * 版块分类封面图（settings: cover_image / cover_orientation）
 *
 * 三种布局模式：
 *  1) cover_image 空 或 cover_orientation = 'none'：不输出 HTML，无占位
 *  2) cover_orientation = 'horizontal'（横版）：标题 → 全宽封面 → 全宽列表（自上而下）
 *     - 封面图**宽度 100% 撑满版块**，**高度由图片原始比例自适应**
 *  3) cover_orientation = 'vertical'  （竖版）：标题 → 左封面 + 右列表（左右分栏）
 *     - 封面图**高度 100% 撑到与右侧网格等高**（CSS Grid stretch），
 *       **object-fit: contain 完整显示图像内容，不裁剪**
 *
 * HTML 结构：
 *  - 横版：
 *      <div class="topshop-section-cover-horizontal">
 *        <img>
 *      </div>
 *  - 竖版（split 容器）：
 *      <div class="topshop-section-layout-vertical">
 *        <aside class="topshop-section-cover-vertical"><img></aside>
 *        <div class="topshop-section-cover-main">[这里是产品列表]</div>
 *      </div>
 * ============================================================ */

/* 横版：宽度撑满版块，高度由图片自身比例决定（自适应） */
.topshop-section-cover-horizontal {
    width: 100%;
    /* 不设固定 aspect-ratio，height 自适应图片比例 */
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
    margin: 0 0 24px;
}
.topshop-section-cover-horizontal img {
    width: 100%;
    height: auto; /* 关键：高度随图片自身比例 */
    display: block;
}

/* 竖版：左右分栏，align-items: stretch（默认）让封面跟随网格等高 */
.topshop-section-layout-vertical {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.5fr);
    gap: 24px;
    align-items: stretch; /* 默认 stretch：竖版封面会跟随右侧网格高度撑开 */
}
.topshop-section-cover-vertical {
    /* 不设固定 aspect-ratio */
    overflow: hidden;
    border-radius: 12px;
    background: #f3f4f6;
    position: sticky;
    top: 24px;
    height: 100%; /* 跟随 grid item 高度（= 右侧网格自然高度） */
    min-height: 240px; /* 当右侧无产品时给个最小高度，避免完全坍缩 */
}
.topshop-section-cover-vertical img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 完整显示图像内容，不裁剪，自动缩放到容器内 */
    display: block;
}
.topshop-section-cover-main {
    min-width: 0; /* 防止 grid item 撑破容器 */
}

/* 竖版嵌入产品卡片网格：grid 保持，但行数自适应，列数从 cols-* 决定 */
.topshop-section-cover-main .topshop-loop.is-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(var(--topshop-cols, 3), minmax(0, 1fr));
}
.topshop-section-cover-main .topshop-loop-cols-2 { --topshop-cols: 2; }
.topshop-section-cover-main .topshop-loop-cols-3 { --topshop-cols: 3; }
.topshop-section-cover-main .topshop-loop-cols-4 { --topshop-cols: 2; } /* 右侧空间小，缩为 2 */
.topshop-section-cover-main .topshop-loop-cols-5 { --topshop-cols: 2; }
.topshop-section-cover-main .topshop-loop-cols-6 { --topshop-cols: 2; }

/* 中等屏幕：竖版封面收窄 */
@media (max-width: 1024px) {
    .topshop-section-layout-vertical {
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    }
    .topshop-section-cover-vertical {
        position: static;
    }
}

/* 移动端：竖版封面回到顶部，全宽单列，列表自上而下
 * 此时竖版封面重新启用固定 aspect-ratio（避免移动端竖长图被压扁） */
@media (max-width: 768px) {
    .topshop-section-layout-vertical {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .topshop-section-cover-vertical {
        max-width: 240px;
        margin: 0 auto;
        aspect-ratio: 3 / 4; /* 移动端回退到 3:4 避免单列时被压扁 */
        height: auto;
    }
    .topshop-section-cover-vertical img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* 移动端同样完整显示，不裁剪 */
    }
    .topshop-section-cover-main .topshop-loop-cols-3,
    .topshop-section-cover-main .topshop-loop-cols-4,
    .topshop-section-cover-main .topshop-loop-cols-5,
    .topshop-section-cover-main .topshop-loop-cols-6 {
        --topshop-cols: 2;
    }
}
@media (max-width: 480px) {
    .topshop-section-cover-main .topshop-loop-cols-2,
    .topshop-section-cover-main .topshop-loop-cols-3,
    .topshop-section-cover-main .topshop-loop-cols-4,
    .topshop-section-cover-main .topshop-loop-cols-5,
    .topshop-section-cover-main .topshop-loop-cols-6 {
        --topshop-cols: 1;
    }
}

/* ============================================================
 * M10: 前端页面优化（非首页）
 *
 * 增强：404、表单、分页、侧边栏、按钮层级、联系页、
 * 空状态、评论、归档头部、面包屑、搜索结果
 * ============================================================ */

/* === 按钮层级 === */
.topshop-button.topshop-button-secondary {
    background: #fff;
    color: var(--topshop-primary, #0057A0);
    border: 1px solid var(--topshop-primary, #0057A0);
}
.topshop-button.topshop-button-secondary:hover {
    background: var(--topshop-primary, #0057A0);
    color: #fff;
    opacity: 1;
}

.topshop-button.topshop-button-outline {
    background: transparent;
    color: var(--topshop-text, #333);
    border: 1px solid #ddd;
}
.topshop-button.topshop-button-outline:hover {
    border-color: var(--topshop-primary, #0057A0);
    color: var(--topshop-primary, #0057A0);
    opacity: 1;
}

.topshop-button.topshop-button-ghost {
    background: transparent;
    color: var(--topshop-text, #333);
    border: none;
    padding: 8px 12px;
}
.topshop-button.topshop-button-ghost:hover {
    background: #f6f7f8;
    color: var(--topshop-primary, #0057A0);
    opacity: 1;
}

.topshop-button.topshop-button-accent {
    background: var(--topshop-accent, #D4002A);
}
.topshop-button.topshop-button-accent:hover {
    background: #b30024;
    opacity: 1;
}

.topshop-button.topshop-button-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.topshop-button.topshop-button-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.topshop-button.topshop-button-block {
    display: flex;
    width: 100%;
}

/* === 404 页面增强 === */
.topshop-404-content {
    position: relative;
    overflow: hidden;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f6fc 0%, #f9fafb 50%, #fef3f4 100%);
    border-radius: 0;
    padding: 60px 20px;
}

.topshop-404-content::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 87, 160, .05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.topshop-404-content::after {
    content: "";
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 0, 42, .04) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.topshop-404-title {
    font-size: clamp(64px, 12vw, 120px);
    font-weight: 900;
    margin: 0;
    line-height: 1;
    background: linear-gradient(135deg, var(--topshop-primary, #0057A0) 0%, var(--topshop-accent, #D4002A) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
    letter-spacing: -.02em;
}

.topshop-404-subtitle {
    font-size: clamp(18px, 3vw, 26px);
    margin: 16px 0 8px;
    color: #1a1a1a;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.topshop-404-text {
    color: #666;
    margin-bottom: 28px;
    font-size: 15px;
    max-width: 480px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.topshop-404-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.topshop-404-actions .topshop-search-form {
    min-width: 280px;
    max-width: 400px;
    flex: 1 1 auto;
}

.topshop-404-actions .topshop-search-input {
    height: 44px;
    font-size: 15px;
}

.topshop-404-actions .topshop-search-submit {
    height: 44px;
    padding: 0 24px;
}

/* === 表单增强 === */

/* 通用表单字段聚焦状态 */
.topshop-inquiry-form input[type="text"]:focus,
.topshop-inquiry-form input[type="email"]:focus,
.topshop-inquiry-form input[type="number"]:focus,
.topshop-inquiry-form input[type="tel"]:focus,
.topshop-inquiry-form textarea:focus,
.topshop-inquiry-form select:focus,
.topshop-search-input:focus {
    border-color: var(--topshop-primary, #0057A0);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 87, 160, .12);
}

/* 表单字段验证状态 */
.topshop-inquiry-form input[type="text"]:invalid:not(:placeholder-shown),
.topshop-inquiry-form input[type="email"]:invalid:not(:placeholder-shown),
.topshop-inquiry-form textarea:invalid:not(:placeholder-shown) {
    border-color: var(--topshop-accent, #D4002A);
}

.topshop-inquiry-form input[type="text"]:valid:not(:placeholder-shown),
.topshop-inquiry-form input[type="email"]:valid:not(:placeholder-shown),
.topshop-inquiry-form textarea:valid:not(:placeholder-shown) {
    border-color: var(--topshop-secondary, #66BC29);
}

/* 表单标签增强 */
.topshop-inquiry-form label {
    margin-bottom: 6px;
}

.topshop-inquiry-form label .required,
.topshop-inquiry-form .topshop-form-row label[for*="name"]::after,
.topshop-inquiry-form .topshop-form-row label[for*="email"]::after,
.topshop-inquiry-form .topshop-form-row label[for*="msg"]::after {
    color: var(--topshop-accent, #D4002A);
}

/* 表单两列布局（宽屏） */
.topshop-inquiry-form .topshop-form-row:has(> input[type="text"]),
.topshop-inquiry-form .topshop-form-row:has(> input[type="email"]),
.topshop-inquiry-form .topshop-form-row:has(> input[type="tel"]),
.topshop-inquiry-form .topshop-form-row:has(> input[type="number"]) {
    /* 默认单列 */
}

@media (min-width: 600px) {
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-name),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-company),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-email),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-phone),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-country),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-qty) {
        display: inline-block;
        width: 48%;
        vertical-align: top;
    }
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-name),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-email),
    .topshop-inquiry-form .topshop-form-row:has(> #topshop-inq-country) {
        margin-right: 4%;
    }
}

/* 搜索表单增强 */
.topshop-search-form {
    position: relative;
}

.topshop-search-input {
    transition: border-color .2s ease, box-shadow .2s ease;
}

.topshop-search-submit {
    transition: background .2s ease, transform .1s ease;
}

.topshop-search-submit:active {
    transform: scale(.98);
}

/* === 分页增强 === */
.topshop-pagination li a,
.topshop-pagination li span {
    transition: all .2s ease;
    font-weight: 500;
}

.topshop-pagination li a:focus,
.topshop-pagination li a:hover {
    border-color: var(--topshop-primary, #0057A0);
    box-shadow: 0 2px 8px rgba(0, 87, 160, .15);
}

.topshop-pagination li span.current {
    box-shadow: 0 2px 8px rgba(0, 87, 160, .25);
}

.topshop-pagination li a:focus-visible {
    outline: 2px solid var(--topshop-primary, #0057A0);
    outline-offset: 2px;
}

/* === 侧边栏增强 === */
.topshop-sidebar .topshop-widget {
    transition: box-shadow .2s ease;
    overflow: hidden;
}

.topshop-sidebar .topshop-widget:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.topshop-widget-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 14px;
    display: block;
    width: 100%;
}

.topshop-widget-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--topshop-primary, #0057A0);
}

.topshop-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.topshop-sidebar ul li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.topshop-sidebar ul li:last-child {
    border-bottom: none;
}

.topshop-sidebar ul li a {
    color: var(--topshop-text, #333);
    text-decoration: none;
    transition: color .2s ease;
    display: inline-block;
}

.topshop-sidebar ul li a:hover {
    color: var(--topshop-primary, #0057A0);
}

.topshop-sidebar ul.children,
.topshop-sidebar ul.sub-menu {
    padding-left: 12px;
    margin-top: 6px;
}

.topshop-sidebar .tagcloud a {
    display: inline-block;
    padding: 4px 10px;
    margin: 0 4px 4px 0;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px !important;
    color: #555;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.topshop-sidebar .tagcloud a:hover {
    background: var(--topshop-primary, #0057A0);
    color: #fff;
}

/* === 联系页增强 === */
.topshop-contact-info {
    border-left: 4px solid var(--topshop-primary, #0057A0);
}

.topshop-contact-item {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.topshop-contact-item:last-child {
    border-bottom: none;
}

.topshop-contact-item strong {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--topshop-primary, #0057A0);
}

.topshop-contact-item span,
.topshop-contact-item a {
    font-size: 14px;
    color: var(--topshop-text, #333);
    margin-top: 4px;
}

.topshop-social-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.topshop-social-list li {
    margin-bottom: 0;
}

.topshop-social-list a {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius, 6px);
    font-size: 13px;
    transition: border-color .2s ease, color .2s ease;
}

.topshop-social-list a:hover {
    border-color: var(--topshop-primary, #0057A0);
    color: var(--topshop-primary, #0057A0);
    text-decoration: none;
}

/* === 空状态 / 无内容增强 === */
.topshop-no-content {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius, 6px);
    max-width: 600px;
    margin: 24px auto;
}

.topshop-no-content-title {
    font-size: 22px;
    margin: 0 0 12px;
    color: #1a1a1a;
}

.topshop-no-content p {
    font-size: 15px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.7;
}

.topshop-no-content .topshop-search-form {
    max-width: 400px;
    margin: 0 auto;
}

/* === 搜索结果页增强 === */
.topshop-search-header,
.topshop-archive-header {
    margin-bottom: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f0f6fc 0%, #f9fafb 100%);
    border-radius: var(--topshop-radius, 6px);
    border-left: 4px solid var(--topshop-primary, #0057A0);
}

.topshop-search-header h1,
.topshop-archive-header h1 {
    font-size: 24px;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.topshop-search-header .topshop-search-form {
    max-width: 500px;
    margin-top: 12px;
}

/* === 面包屑增强 === */
.topshop-breadcrumb-wrap {
    padding: 12px 0;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #777;
}

.topshop-breadcrumb-wrap a {
    color: var(--topshop-primary, #0057A0);
    text-decoration: none;
    transition: color .2s ease;
}

.topshop-breadcrumb-wrap a:hover {
    color: var(--topshop-accent, #D4002A);
    text-decoration: underline;
}

.topshop-breadcrumb-wrap .separator {
    margin: 0 6px;
    color: #ccc;
}

.topshop-breadcrumb-wrap .current {
    color: var(--topshop-text, #333);
    font-weight: 600;
}

/* === 文章 Meta 增强 === */
.topshop-post-meta {
    padding: 8px 0;
    gap: 8px;
}

.topshop-post-meta .topshop-post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.topshop-post-meta .topshop-post-meta-sep {
    color: #ddd;
    margin: 0 2px;
}

.topshop-post-meta a {
    color: #777;
    text-decoration: none;
    transition: color .2s ease;
}

.topshop-post-meta a:hover {
    color: var(--topshop-primary, #0057A0);
}

/* === 文章标签增强 === */
.topshop-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.topshop-post-tags .topshop-tags-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.topshop-post-tags a {
    margin: 0;
    transition: background .2s ease, color .2s ease, transform .1s ease;
}

.topshop-post-tags a:active {
    transform: scale(.97);
}

/* === 文章卡片增强 === */
.topshop-post-card {
    transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
}

.topshop-post-card-thumb {
    position: relative;
}

.topshop-post-card-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, .15) 100%);
    opacity: 0;
    transition: opacity .25s ease;
}

.topshop-post-card:hover .topshop-post-card-thumb::after {
    opacity: 1;
}

.topshop-post-card-thumb img {
    transition: transform .4s ease;
}

.topshop-post-card:hover .topshop-post-card-thumb img {
    transform: scale(1.05);
}

.topshop-post-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: gap .2s ease;
}

.topshop-post-card-readmore::after {
    content: "\2192";
    font-size: 16px;
    line-height: 1;
}

.topshop-post-card-readmore:hover {
    gap: 8px;
    text-decoration: none;
}

/* === 上下篇导航增强 === */
.topshop-post-nav {
    transition: box-shadow .2s ease;
}

.topshop-post-nav:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
}

.topshop-post-nav-prev::before {
    content: "\2190";
    margin-right: 6px;
    font-size: 14px;
}

.topshop-post-nav-next::after {
    content: "\2192";
    margin-left: 6px;
    font-size: 14px;
}

/* === 评论区域 === */
.topshop-comments,
.comments-area {
    margin: 32px 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--topshop-radius, 6px);
}

.topshop-comments-title,
.comments-title {
    font-size: 18px;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--topshop-primary, #0057A0);
    display: inline-block;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.comment-list .comment,
.comment-list .pingback {
    padding: 16px 0;
    border-bottom: 1px solid #eee;
}

.comment-list .comment:last-child {
    border-bottom: none;
}

.comment-list .comment-body {
    margin-left: 56px;
}

.comment-list .comment .avatar {
    float: left;
    margin-left: -56px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #eee;
}

.comment-list .comment-meta {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

.comment-list .comment-meta .comment-author {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
}

.comment-list .comment-content {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.comment-list .comment-respond {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.comment-respond {
    margin-top: 24px;
}

.comment-respond .comment-reply-title {
    font-size: 16px;
    margin: 0 0 16px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: var(--topshop-radius, 6px);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    border-color: var(--topshop-primary, #0057A0);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 87, 160, .12);
}

.comment-form .form-submit input {
    padding: 10px 24px;
    background: var(--topshop-primary, #0057A0);
    color: #fff;
    border: none;
    border-radius: var(--topshop-radius, 6px);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease;
}

.comment-form .form-submit input:hover {
    background: #004a87;
}

/* === 页面文章增强 === */
.topshop-page-article {
    box-shadow: 0 1px 3px rgba(0, 0, 0, .03);
}

.topshop-page-article h1,
.topshop-post-single h1 {
    font-size: 28px;
}

.topshop-page-article h2,
.topshop-post-single h2 {
    font-size: 24px;
    margin: 1.5em 0 .5em;
}

.topshop-page-article h3,
.topshop-post-single h3 {
    font-size: 20px;
    margin: 1.2em 0 .4em;
}

.topshop-page-article h4,
.topshop-post-single h4 {
    font-size: 17px;
    margin: 1em 0 .3em;
}

/* === 内容区域表格 === */
.topshop-entry-content table,
.topshop-page-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
    font-size: 14px;
}

.topshop-entry-content table th,
.topshop-page-article table th {
    padding: 10px 12px;
    background: #f6f7f8;
    border: 1px solid #eee;
    text-align: left;
    font-weight: 600;
}

.topshop-entry-content table td,
.topshop-page-article table td {
    padding: 10px 12px;
    border: 1px solid #eee;
}

/* === 内容区域引用 === */
.topshop-entry-content blockquote,
.topshop-page-article blockquote {
    margin: 1.5em 0;
    padding: 16px 20px;
    border-left: 4px solid var(--topshop-primary, #0057A0);
    background: #f9fafb;
    border-radius: 0 var(--topshop-radius, 6px) var(--topshop-radius, 6px) 0;
    font-style: italic;
    color: #555;
}

.topshop-entry-content blockquote p:last-child,
.topshop-page-article blockquote p:last-child {
    margin-bottom: 0;
}

/* === 内容区域代码 === */
.topshop-entry-content pre,
.topshop-page-article pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--topshop-radius, 6px);
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
    margin: 1.5em 0;
}

.topshop-entry-content code,
.topshop-page-article code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.topshop-entry-content pre code,
.topshop-page-article pre code {
    background: none;
    padding: 0;
}

/* === 内容区域列表 === */
.topshop-entry-content ul,
.topshop-entry-content ol,
.topshop-page-article ul,
.topshop-page-article ol {
    margin: 0 0 1em;
    padding-left: 20px;
}

.topshop-entry-content ul li,
.topshop-entry-content ol li,
.topshop-page-article ul li,
.topshop-page-article ol li {
    margin-bottom: 6px;
}

/* === 内容区域按钮 === */
.topshop-entry-content .topshop-button,
.topshop-page-article .topshop-button {
    margin: 8px 0;
}

/* === 选中文本颜色 === */
::selection {
    background: var(--topshop-primary, #0057A0);
    color: #fff;
    text-shadow: none;
}

::-moz-selection {
    background: var(--topshop-primary, #0057A0);
    color: #fff;
    text-shadow: none;
}

/* === 焦点可见性增强（可访问性） === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--topshop-primary, #0057A0);
    outline-offset: 2px;
}

.topshop-button:focus-visible {
    outline: 2px solid var(--topshop-primary, #0057A0);
    outline-offset: 2px;
}

/* === 滚动条美化（Webkit） === */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* === 平滑滚动 === */
html {
    scroll-behavior: smooth;
}

/* === 图片懒加载占位 === */
img[loading="lazy"] {
    background: #f6f7f8;
}

/* === 主内容区域间距 === */
.topshop-main {
    min-height: 50vh;
    padding-bottom: 48px;
}

/* === 页脚增强 === */
.topshop-footer {
    border-top: 3px solid var(--topshop-primary, #0057A0);
    background: #1a1a1a;
    color: #ccc;
}

.topshop-footer-widgets .topshop-widget {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--topshop-radius, 6px);
    padding: 20px;
}

.topshop-footer-widgets .topshop-widget-title {
    color: #fff;
    border-bottom-color: var(--topshop-primary, #0057A0);
}

.topshop-footer-widgets .topshop-widget ul li a {
    color: #ccc;
}

.topshop-footer-widgets .topshop-widget ul li a:hover {
    color: #fff;
}

.topshop-footer-widgets .topshop-widget p {
    color: #aaa;
    font-size: 14px;
    line-height: 1.7;
}

.topshop-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 16px 0;
    background: rgba(0, 0, 0, .2);
}

.topshop-footer-bottom a {
    color: #ccc;
    text-decoration: none;
}

.topshop-footer-bottom a:hover {
    color: #fff;
}

.topshop-footer-copyright {
    font-size: 13px;
    color: #999;
}

.topshop-footer-nav {
    font-size: 13px;
}

.topshop-footer-nav a {
    padding: 0 8px;
}
