/*
Theme Name: OADOT B2B
Description: 汽车改装电子 2B 产品目录主题。配合 OADOT 产品目录插件使用。
Version: 0.1.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: oadot-b2b
License: GPL-2.0-or-later
*/
:root { --ink: #20272a; --muted: #586369; --line: #dce1e2; --paper: #fff; --soft: #f3f5f5; --accent: #0d6559; --focus: #bc4b24; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; letter-spacing: 0; }
a { color: inherit; text-underline-offset: 4px; overflow-wrap: anywhere; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button, .button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.container { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.section { padding-block: 64px; }
.section-muted { background: var(--soft); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 20px; overflow-wrap: anywhere; }
h1 { font-size: 40px; font-weight: 650; max-width: 800px; }
h2 { font-size: 28px; font-weight: 650; }
h3 { font-size: 20px; }
p { margin: 0 0 20px; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 14px; }
.page-intro, .intro-copy { color: var(--muted); max-width: 730px; font-size: 18px; }
.site-header { border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { min-width: 0; max-width: 300px; }
.brand-name { font-size: 27px; font-weight: 750; text-decoration: none; overflow-wrap: anywhere; }
.custom-logo { max-height: 48px; width: auto; }
.menu { display: flex; gap: 28px; align-items: center; padding: 0; margin: 0; list-style: none; }
.menu a { text-decoration: none; font-size: 14px; font-weight: 600; }
.menu li { position: relative; }
.sub-menu { list-style: none; padding: 14px; margin: 0; background: white; border: 1px solid var(--line); min-width: 190px; position: absolute; top: 100%; left: 0; display: none; z-index: 10; }
.sub-menu a { display: block; padding: 8px; }
.menu li:hover > .sub-menu, .menu li:focus-within > .sub-menu { display: block; }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 4px; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 99; padding: 12px 20px; background: white; border: 2px solid var(--accent); }
.skip-link:focus { top: 12px; }
.home-intro { padding: 68px 0 56px; border-bottom: 1px solid var(--line); }
.home-intro h1 { font-size: 46px; max-width: 850px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button, input[type="submit"], .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.4; max-width: 100%; text-align: center; }
.button:hover, input[type="submit"]:hover { background: #084b42; color: white; }
.actions .button + .button { background: white; color: var(--accent); }
.home-media { margin: 36px 0 0; max-width: 100%; background: var(--soft); }
.home-media img { width: 100%; max-height: 560px; object-fit: contain; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; }
.section-heading h2, .section-heading p:last-child { margin-bottom: 0; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14px; }
.family-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.family-item { display: flex; flex-direction: column; gap: 14px; text-decoration: none; padding: 28px 20px 28px 0; border-bottom: 1px solid var(--line); }
.family-item + .family-item { padding-left: 20px; border-left: 1px solid var(--line); }
.family-number { color: var(--muted); font-size: 13px; }
.family-item h3 { margin: 0; }
.family-item p { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.family-item .text-link { margin-top: auto; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.product-card { border: 1px solid var(--line); background: white; border-radius: 4px; overflow: hidden; min-width: 0; }
.product-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; padding: 18px; background: #f7f8f8; text-decoration: none; }
.product-image img { width: 100%; height: 100%; object-fit: contain; }
.image-empty { color: var(--muted); padding: 20px; text-align: center; font-size: 16px; overflow-wrap: anywhere; }
.product-card-body { padding: 22px; }
.product-card h2 { font-size: 20px; margin-bottom: 12px; }
.product-card h2 a { text-decoration: none; }
.product-card p:not(.eyebrow) { color: var(--muted); font-size: 14px; }
.enquiry-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: center; }
.enquiry-band p { max-width: 800px; color: var(--muted); }
.catalog-filters { display: flex; gap: 16px; align-items: end; padding: 24px 0; border-block: 1px solid var(--line); margin-block: 30px; }
label { display: block; font-size: 14px; font-weight: 600; }
.catalog-filters label { flex: 1; min-width: 0; }
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), select, textarea { display: block; width: 100%; padding: 11px 12px; border: 1px solid #aeb9bc; border-radius: 3px; background: white; color: var(--ink); min-height: 46px; margin-top: 6px; max-width: 100%; }
textarea { min-height: 160px; }
input[type="file"] { font-size: 13px; }
.reset-link { min-height: 46px; display: flex; align-items: center; font-size: 14px; }
.empty-state { padding-block: 70px; text-align: center; }
.empty-state h1 { margin-inline: auto; }
.pagination { margin-top: 36px; }
.nav-links { display: flex; gap: 12px; flex-wrap: wrap; }
.page-numbers { padding: 8px 14px; border: 1px solid var(--line); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; margin-bottom: 30px; }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: center; }
.detail-image { display: flex; align-items: center; justify-content: center; background: var(--soft); aspect-ratio: 4/3; padding: 30px; }
.detail-image img { width: 100%; height: 100%; object-fit: contain; }
.note { margin-top: 18px; font-size: 13px; color: var(--muted); }
.product-information { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 50px; border-top: 1px solid var(--line); margin-top: 48px; padding-top: 48px; }
.product-information h2 { font-size: 24px; }
.compatibility { border-left: 1px solid var(--line); padding-left: 32px; }
.compatibility p { color: var(--muted); }
.spec-list { margin: 20px 0; }
.spec-list > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
dt { font-weight: 600; font-size: 14px; }
dd { margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.prose { max-width: 900px; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 30px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { padding: 12px; border: 1px solid var(--line); }
.wp-block-table { overflow-x: auto; }
.alignwide { max-width: 1200px; }
.alignfull { max-width: 100%; }
.wpcf7 { max-width: 760px; }
.wpcf7-form p { margin-bottom: 22px; }
.wpcf7-not-valid-tip { color: #b12f22; font-weight: 400; }
.wpcf7-response-output { margin: 20px 0 !important; padding: 14px !important; }
.wpcf7-acceptance label { font-weight: 400; }
.wpcf7-acceptance input { margin-right: 8px; }
.site-footer { background: #20272a; color: #e4e9e9; padding-block: 40px 20px; }
.site-footer a:hover { color: #8fd2bb; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 36px; }
.site-footer .brand-name { color: white; }
.site-footer p { color: #bcc8cb; font-size: 14px; margin: 12px 0; }
.site-footer .menu { align-items: start; flex-direction: column; gap: 12px; }
.footer-bottom { margin-top: 32px; padding-top: 20px; border-top: 1px solid #4a5357; display: flex; justify-content: space-between; gap: 16px; font-size: 12px; flex-wrap: wrap; }
@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu { gap: 18px; }
  .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .family-item:nth-child(3) { border-left: 0; padding-left: 0; }
  .enquiry-band { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .product-detail, .product-information { gap: 28px; }
}
@media (max-width: 800px) {
  .container { width: calc(100% - 40px); }
  .header-inner { flex-wrap: wrap; min-height: 76px; padding-block: 16px; gap: 14px; }
  .brand { max-width: calc(100% - 92px); }
  .nav-toggle { display: block; }
  #primary-navigation { display: none; width: 100%; }
  #primary-navigation.is-open { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu a { display: block; padding-block: 12px; }
  .sub-menu { position: static; display: block; border: 0; padding: 0 0 0 18px; }
  .home-intro { padding: 42px 0; }
  .home-intro h1, h1 { font-size: 32px; }
  h2 { font-size: 25px; }
  .section { padding-block: 44px; }
  .section-heading { align-items: start; flex-direction: column; gap: 16px; }
  .catalog-filters { flex-wrap: wrap; }
  .catalog-filters label { flex-basis: 100%; }
  .product-detail, .product-information { grid-template-columns: minmax(0, 1fr); }
  .compatibility { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 30px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 520px) {
  .family-grid, .product-grid { grid-template-columns: minmax(0, 1fr); }
  .family-item + .family-item { padding-left: 0; border-left: 0; }
  .spec-list > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .actions { flex-direction: column; align-items: stretch; }
  .page-intro, .intro-copy { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
