/*
Theme Name: SUBORBOX Theme
Theme URI: https://45.205.29.121/
Author: SUBORBOX
Description: SUBORBOX 外贸企业官网主题（效仿 kugoo.ru 风格）：深色头部+橙色 CTA、分类入口、产品网格、Tabs 产品页，中俄双语。
Version: 2.0.6
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.2
License: GNU General Public License v2 or later
Text Domain: suborbox
*/

/* ============ 设计变量 ============ */
:root {
  --dark: #0d1b2a;
  --dark-2: #13263c;
  --dark-3: #1b3350;
  --accent: #ff6b00;
  --accent-2: #ff8c33;
  --accent-dark: #e55f00;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --line: #e6e9ee;
  --text: #1a1f2b;
  --text-2: #5b6472;
  --text-3: #8a94a3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 18px rgba(13, 27, 42, .07);
  --shadow-lg: 0 10px 34px rgba(13, 27, 42, .12);
  --font: "Roboto", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 1em; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 22px; }

.screen-reader-text, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { clip: auto; width: auto; height: auto; padding: 10px 16px; background: var(--accent); color: #fff; z-index: 999; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(255,107,0,.32); }
.btn-primary:hover { background: var(--accent-dark); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { border-color: #fff; color: #fff; }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-ghost:hover { background: var(--line); color: var(--text); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }

/* ============ 头部 ============ */
.topbar { background: var(--dark); color: rgba(255,255,255,.78); font-size: 13px; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 12px; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }
.topbar-left { display: flex; gap: 18px; align-items: center; }
.topbar-right { display: flex; gap: 14px; align-items: center; }

.site-header {
  background: var(--dark-2);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 14px rgba(0,0,0,.18);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 16px; }

.site-brand { display: flex; align-items: center; gap: 10px; }
.site-brand img { max-height: 42px; width: auto; }
.site-title { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: .5px; }
.site-title span { color: var(--accent); }
.site-title:hover { color: #fff; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 9px 15px; color: rgba(255,255,255,.9);
  font-weight: 500; font-size: 15px; border-radius: 8px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,.1); }
.main-nav .menu-item-has-children { position: relative; }
.main-nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 210px; padding: 8px;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg);
  display: none; flex-direction: column; gap: 2px; z-index: 200;
}
.main-nav .menu-item-has-children:hover .sub-menu { display: flex; }
.main-nav .sub-menu a { color: var(--text); padding: 9px 14px; font-size: 14px; border-radius: 7px; }
.main-nav .sub-menu a:hover { background: var(--bg-soft); color: var(--accent-dark); }

.header-cta { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.lang-switch a { color: rgba(255,255,255,.75); padding: 5px 9px; border-radius: 6px; }
.lang-switch a.active { color: #fff; background: rgba(255,255,255,.14); }
.lang-switch span { color: rgba(255,255,255,.35); }

.nav-toggle {
  display: none; background: transparent; border: 0; color: #fff;
  font-size: 26px; padding: 6px 10px; cursor: pointer;
}

/* ============ Hero ============ */
.hero {
  position: relative; background: linear-gradient(135deg, #0d1b2a 0%, #13263c 55%, #1b3350 100%);
  color: #fff; overflow: hidden; padding: 0;
  min-height: clamp(540px, 78vh, 780px);
  display: flex; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; opacity: .16;
  background-image: radial-gradient(circle at 82% 30%, #ff6b00 0%, transparent 42%),
    radial-gradient(circle at 15% 85%, #2e5f9e 0%, transparent 40%);
}

/* Hero 幻灯片大图背景 */
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease;
  background-size: cover; background-position: center;
}
.hero-slide.is-active { opacity: 1; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,22,38,.82) 0%, rgba(10,22,38,.55) 45%, rgba(10,22,38,.28) 100%),
    linear-gradient(0deg, rgba(10,22,38,.65) 0%, transparent 55%);
}
.hero-slide-cap {
  position: absolute; right: 26px; bottom: 26px; z-index: 2;
  background: rgba(10,22,38,.55); border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.9); padding: 7px 16px; border-radius: 999px;
  font-size: 13px; letter-spacing: .3px; backdrop-filter: blur(4px);
}
.hero-dots {
  position: absolute; left: 0; right: 0; bottom: 18px; z-index: 3;
  display: flex; justify-content: center; gap: 8px;
}
.hero-dots button {
  width: 26px; height: 4px; border: 0; border-radius: 2px; cursor: pointer;
  background: rgba(255,255,255,.32); padding: 0; transition: background .3s;
}
.hero-dots button.is-active { background: var(--accent-2, #ff6b00); }

.hero .container { position: relative; z-index: 2; }
.hero-inner { max-width: 760px; padding: 10px 0 54px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 15px;
  background: rgba(255,107,0,.16); color: var(--accent-2); border: 1px solid rgba(255,107,0,.35);
  border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); font-weight: 800; margin-bottom: 18px; letter-spacing: .3px; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: rgba(255,255,255,.82); max-width: 640px; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0;
  border-top: 1px solid rgba(255,255,255,.14); margin-top: 0;
}
.hero-meta > div { padding: 18px 20px 18px 0; }
.hero-meta .num { font-size: 30px; font-weight: 800; color: #fff; }
.hero-meta .lbl { font-size: 13.5px; color: rgba(255,255,255,.62); margin-top: 2px; }

/* 通用区块 */
.section { padding: 66px 0; }
.section-alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.section-head .lead { color: var(--text-2); font-size: 16.5px; margin: 10px 0 0; }
.section-head .eyebrow {
  display: inline-block; color: var(--accent-dark); font-weight: 700; font-size: 13.5px;
  text-transform: uppercase; letter-spacing: 1.4px; margin-bottom: 10px;
}

/* 分类入口卡片 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.cat-tile {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 168px; padding: 22px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); transition: all .22s; overflow: hidden;
}
.cat-tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.cat-tile .cat-ico { font-size: 30px; margin-bottom: 14px; }
.cat-tile h3 { font-size: 17px; margin-bottom: 6px; }
.cat-tile p { color: var(--text-2); font-size: 13.5px; margin: 0 0 12px; }
.cat-tile .count { font-size: 13px; color: var(--accent-dark); font-weight: 600; }
.cat-tile .link-stretch { position: absolute; inset: 0; z-index: 1; }

/* 产品卡片（网格） */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); gap: 20px; }
.product-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: all .22s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card .thumb {
  display: flex; align-items: center; justify-content: center; background: #fff;
  aspect-ratio: 4 / 3; overflow: hidden; position: relative;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .thumb .ph { color: var(--text-3); font-size: 14px; }
.product-card .p-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .p-cat { font-size: 12.5px; color: var(--accent-dark); font-weight: 600; text-transform: uppercase; letter-spacing: .6px; }
.product-card h3 { font-size: 17px; margin: 0; }
.product-card h3 a { color: var(--text); }
.product-card h3 a:hover { color: var(--accent-dark); }
.product-card .p-spec { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--text-2); font-size: 13.5px; }
.product-card .p-spec b { color: var(--text); font-weight: 600; }
.product-card .p-link { margin-top: auto; padding-top: 10px; font-weight: 600; font-size: 14px; color: var(--accent-dark); }
.product-card .p-link:hover { color: var(--accent); }

/* 主推/新品分栏 */
.feature-split { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 26px; }
.feature-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.feature-card .fc-img { background: var(--bg-soft); min-height: 240px; display: flex; align-items: center; justify-content: center; }
.feature-card .fc-img img { width: 100%; height: 100%; object-fit: cover; }
.feature-card .fc-body { padding: 28px; }
.feature-card h3 { font-size: 21px; margin-bottom: 10px; }
.feature-card p { color: var(--text-2); font-size: 14.5px; }

/* 优势信息块 */
.benefit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.benefit {
  padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.benefit .b-ico { font-size: 28px; margin-bottom: 14px; }
.benefit .b-num { font-size: 34px; font-weight: 800; color: var(--dark); line-height: 1; margin-bottom: 8px; }
.benefit h3 { font-size: 17px; margin-bottom: 8px; }
.benefit p { color: var(--text-2); font-size: 14px; margin: 0; }

/* 步骤 */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; counter-reset: step; }
.step { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 13px; font-weight: 800; color: #fff; background: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%; margin-bottom: 14px;
}
.step h3 { font-size: 16.5px; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 14px; margin: 0; }

/* FAQ 手风琴 */
.faq-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 20px; color: var(--accent-dark); font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--text-2); font-size: 14.5px; }

/* CTA 横幅 */
.cta-band {
  background: linear-gradient(120deg, var(--dark) 0%, var(--dark-3) 100%);
  color: #fff; text-align: center; padding: 64px 22px; position: relative; overflow: hidden;
}
.cta-band::before { content: ""; position: absolute; inset: 0; opacity: .12; background-image: radial-gradient(circle at 20% 30%, #ff6b00 0%, transparent 45%); }
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 14px; }
.cta-band p { color: rgba(255,255,255,.78); max-width: 560px; margin: 0 auto 28px; font-size: 16px; }

/* 页面内部 hero（列表/产品/子页） */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 60%, var(--dark-3) 100%);
  color: #fff; padding: 42px 0;
}
.page-hero h1 { font-size: clamp(26px, 3.4vw, 38px); margin: 8px 0 0; }
.page-hero .crumbs { font-size: 13.5px; color: rgba(255,255,255,.6); }
.page-hero .crumbs a { color: rgba(255,255,255,.78); }
.page-hero .crumbs a:hover { color: #fff; }
.page-hero .crumbs span { color: rgba(255,255,255,.92); }
.page-body { padding: 44px 0 70px; }
.page-desc { color: var(--text-2); max-width: 820px; margin: 14px 0 30px; }

/* 产品详情 */
.product-detail { display: grid; grid-template-columns: minmax(300px, 460px) 1fr; gap: 40px; align-items: start; }
.product-gallery .main-img {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; display: flex; align-items: center; justify-content: center;
}
.product-gallery .main-img img { border-radius: var(--radius-sm); width: 100%; height: auto; display: block; }
.product-card .thumb img { width: 100%; height: auto; display: block; }
.thumb { display: block; }
.thumb .ph { display: flex; align-items: center; justify-content: center; min-height: 140px; background: var(--bg-soft); color: var(--text-2); font-size: 13px; }

.gallery-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-top: 12px;
}
.gallery-thumbs button {
  border: 2px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; cursor: pointer; overflow: hidden;
}
.gallery-thumbs button.is-active { border-color: var(--accent-2, #ff6b00); }
.gallery-thumbs img { width: 100%; height: auto; display: block; border-radius: 5px; }

.product-info h1 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 8px; }
.product-info .p-cat { color: var(--accent-dark); font-weight: 600; font-size: 14px; margin-bottom: 18px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 8px 0 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.spec-table th { text-align: left; background: var(--bg-soft); color: var(--text-2); font-weight: 500; width: 38%; }
.spec-table th, .spec-table td { padding: 11px 15px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table td { color: var(--text); font-weight: 500; }
.product-cta-box {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin-top: 22px;
}
.product-cta-box h3 { font-size: 17px; }
.product-cta-box p { color: var(--text-2); font-size: 14px; }
.product-cta-box .btn { width: 100%; }
.contact-mini { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.contact-mini a { font-weight: 600; }
.entry-content { color: var(--text); }
.entry-content h2, .entry-content h3 { margin-top: 26px; }
.entry-content ul { padding-left: 20px; }

/* Tabs（产品页） */
.tabs { margin-top: 56px; }
.tabs-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--line); flex-wrap: wrap; }
.tab-btn {
  background: none; border: 0; padding: 13px 22px; font-size: 15px; font-weight: 600;
  color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.tab-btn.active { color: var(--accent-dark); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding: 26px 4px 10px; }
.tab-panel.active { display: block; }
.tab-panel h3 { font-size: 18px; margin-bottom: 12px; }

/* 面包屑（独立） */
.breadcrumb { font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb span { color: var(--text); }

/* 页脚 */
.site-footer { background: var(--dark); color: rgba(255,255,255,.72); font-size: 14.5px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding: 54px 0 40px; }
.site-footer h4 { color: #fff; font-size: 16px; margin-bottom: 16px; }
.site-footer a { color: rgba(255,255,255,.72); }
.site-footer a:hover { color: #fff; }
.footer-main ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer-brand p { margin-top: 14px; color: rgba(255,255,255,.6); font-size: 13.5px; }
.footer-contact li { display: flex; gap: 8px; align-items: flex-start; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 18px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 13px; color: rgba(255,255,255,.5);
}

/* 表单（联系页） */
.inquiry-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; max-width: 640px; }
.inquiry-form label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
.inquiry-form input[type="text"], .inquiry-form input[type="email"], .inquiry-form input[type="tel"], .inquiry-form textarea, .inquiry-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; font-family: var(--font); background: var(--bg-soft);
}
.inquiry-form input:focus, .inquiry-form textarea:focus, .inquiry-form select:focus { outline: 2px solid rgba(255,107,0,.4); border-color: var(--accent); background: #fff; }
.inquiry-form textarea { min-height: 130px; resize: vertical; }
.inquiry-form .btn { margin-top: 20px; }
.form-note { font-size: 13px; color: var(--text-3); margin-top: 10px; }
.form-success { background: #e9f9ef; color: #1c7c3c; padding: 14px 18px; border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 16px; }

/* 通用页面 */
.page-simple { max-width: 860px; }
.page-simple h2 { margin-top: 34px; }
.page-simple ul { padding-left: 20px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-list { display: flex; flex-direction: column; gap: 18px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; }
.contact-item .ci-ico { font-size: 22px; }
.contact-item h3 { font-size: 15.5px; margin: 0 0 4px; }
.contact-item p, .contact-item a { color: var(--text-2); font-size: 14.5px; margin: 0; }

/* 新闻列表 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: all .22s; }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.news-card .n-date { font-size: 13px; color: var(--text-3); margin-bottom: 8px; }
.news-card h3 { font-size: 17px; }
.news-card p { color: var(--text-2); font-size: 14px; }

/* 响应式 */

/* 平板（竖屏 768px / 横屏 1024px）自适应 */
@media (max-width: 1024px) {
  .hero { min-height: 520px; }
  .hero-inner { max-width: 680px; }
  .cat-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
  .feature-split { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .hero { min-height: 500px; }
  .hero-inner { padding: 48px 0 40px; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .section { padding: 54px 0; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-col .footer-nav { columns: 2; column-gap: 24px; }
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .hero-slide-cap { right: 16px; bottom: 44px; font-size: 12px; }
}
@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .feature-card { grid-template-columns: 1fr; }
  .feature-card .fc-img { min-height: 200px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .section { padding: 48px 0; }
  .topbar-left .hide-sm { display: none; }
  .topbar-right { font-size: 12.5px; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    background: var(--dark-2); padding: 14px 18px 20px; box-shadow: 0 12px 24px rgba(0,0,0,.25);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 2px; }
  .main-nav .sub-menu { position: static; display: none; box-shadow: none; background: rgba(255,255,255,.06); padding: 4px 10px; border-radius: 8px; min-width: 0; }
  .main-nav .menu-item-has-children.open > .sub-menu { display: flex; }
  .main-nav .sub-menu a { color: rgba(255,255,255,.85); }
  .header-cta .btn { display: none; }
  .container { padding: 0 16px; }
  .hero { min-height: 480px; }
  .hero-inner { padding: 56px 16px 42px; }
  .product-detail { padding: 0; }
  .product-gallery .main-img { min-height: 0; }
  .hero-cta .btn { width: 100%; }
  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .hero-meta > div { padding: 14px 10px 14px 0; }
  .cat-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
  .product-card .p-body { padding: 12px; }
  .product-card h3 { font-size: 15px; }
  .product-card .p-spec { font-size: 12.5px; gap: 4px 10px; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .tabs-nav { overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { padding: 11px 14px; white-space: nowrap; }
}


/* ============ 回到顶部按钮 ============ */
#back-to-top {
  position: fixed; right: 22px; bottom: 26px; z-index: 300;
  width: 46px; height: 46px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; font-size: 22px; line-height: 1;
  box-shadow: var(--shadow-lg); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
#back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
#back-to-top:hover { background: var(--accent-dark); }
@media (max-width: 640px) {
  #back-to-top { right: 14px; bottom: 18px; width: 42px; height: 42px; }
}

/* ============ 分类页：查看全部 ============ */
.cat-grid-collapsed .product-card.is-collapsed { display: none; }
.cat-grid-expanded .product-card.is-collapsed { display: flex; }
.cat-grid-more { text-align: center; margin-top: 30px; }
.cat-grid-more .btn { min-width: 240px; padding: 12px 26px; }


/* ============ 分类页：产品系列侧边栏（效仿 kugoo.ru / 图1 结构） ============ */
.cat-layout {
  display: flex; gap: 34px; align-items: flex-start;
}
.cat-sidebar {
  flex: 0 0 240px; min-width: 0;
  background: #fff; border: 1px solid var(--border-color);
  border-radius: 14px; padding: 18px 14px;
  position: sticky; top: 90px;
}
.cat-sidebar-title {
  font-size: 17px; font-weight: 700; color: var(--text);
  padding: 4px 8px 14px; border-bottom: 2px solid var(--accent);
  margin: 0 0 10px;
}
.cat-sidebar-list { list-style: none; margin: 0; padding: 0; }
.cat-sidebar-list li { margin: 2px 0; }
.cat-sidebar-list a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-radius: 9px; color: var(--text);
  font-size: 14.5px; font-weight: 500; gap: 8px;
  transition: background .15s, color .15s;
}
.cat-sidebar-list a:hover { background: var(--bg-soft); color: var(--accent-dark); }
.cat-sidebar-list li.is-active a {
  background: var(--accent); color: #fff;
}
.cat-sidebar-count {
  font-size: 12px; font-weight: 600;
  background: rgba(0,0,0,.06); color: var(--text-secondary);
  padding: 1px 8px; border-radius: 999px;
}
.cat-sidebar-list li.is-active .cat-sidebar-count { background: rgba(255,255,255,.22); color: #fff; }
.cat-sidebar-all {
  display: block; margin-top: 12px; padding: 10px 12px;
  text-align: center; border-top: 1px dashed var(--border-color);
  color: var(--accent-dark); font-size: 14px; font-weight: 600;
}
.cat-sidebar-all:hover { background: var(--bg-soft); border-radius: 9px; }
.cat-main { flex: 1 1 auto; min-width: 0; }
@media (max-width: 900px) {
  .cat-layout { flex-direction: column; gap: 20px; }
  .cat-sidebar {
    flex: 1 1 auto; width: 100%; position: static;
    padding: 14px 12px;
  }
  .cat-sidebar-list {
    display: flex; flex-wrap: wrap; gap: 6px;
  }
  .cat-sidebar-list li { margin: 0; }
  .cat-sidebar-list a {
    padding: 7px 11px; font-size: 13.5px;
    border: 1px solid var(--border-color); border-radius: 999px;
  }
  .cat-sidebar-title { border-bottom: 0; padding-bottom: 8px; }
  .cat-sidebar-all { margin-top: 8px; }
}
