/*
Theme Name: PP Catalog 五金目录
Theme URI: https://example.com/pp-catalog
Author: PP Theme Studio
Author URI: https://example.com
Description: 面向 PP 酸洗槽厂家的老式采购目录风 WordPress 主题。纸白底配油墨黑与目录红,章节编号、货号索引、剖面线稿插图与密集规格总表,信息优先、装饰克制,适合品类多、需要客户按货号查询下单的工厂。
Version: 1.0.0
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pp-catalog
Tags: light, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --paper: #fbfaf7;
  --paper-2: #f2f0ea;
  --ink: #1a1a1a;
  --red: #b32a24;
  --gray: #6b6862;
  --line: #d5d2c9;
  --container: 1180px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
}

/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
svg { max-width: 100%; height: auto; }
.container { width: min(100% - 40px, var(--container)); margin-inline: auto; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.btn {
  display: inline-block; padding: 10px 22px; font-size: 14px; font-weight: 700;
  border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink);
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-main { background: var(--red); border-color: var(--red); color: #fff; }
.btn-main:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ===== Topbar ===== */
.topbar { background: var(--ink); color: #cfcbc2; font-family: var(--mono); font-size: 12px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 6px 0; }
.tb-tel b { color: #fff; margin-left: 4px; }

/* ===== Header ===== */
.site-header { background: var(--paper); border-bottom: 3px double var(--ink); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 20px; padding: 12px 0; }
.site-branding { display: flex; align-items: center; gap: 11px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-weight: 700; font-size: 15px;
}
.site-title { font-size: 19px; font-weight: 700; line-height: 1.3; }
.site-desc { font-family: var(--mono); font-size: 11px; color: var(--gray); }
.site-nav .menu { display: flex; gap: 22px; list-style: none; }
.site-nav a { font-size: 14.5px; font-weight: 600; padding: 3px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--red); border-bottom-color: var(--red); }
.nav-toggle-input, .nav-toggle-label { display: none; }

/* ===== Hero ===== */
.hero { padding: 44px 0 40px; border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-sec {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: .08em;
  color: #fff; background: var(--ink); padding: 2px 12px; margin-bottom: 16px;
}
.hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.24; font-weight: 800; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-sub { margin-top: 16px; font-size: 15.5px; color: var(--gray); max-width: 28em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-plate { border: 1.5px solid var(--ink); padding: 18px 16px 12px; background: #fff; }
.hero-plate figcaption {
  display: flex; flex-direction: column; gap: 2px; margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--line); font-family: var(--mono); font-size: 11.5px; color: var(--gray);
}

/* ===== Sections ===== */
.section { padding: 46px 0; }
.section-tint { background: var(--paper-2); }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.sec-no { font-family: var(--mono); font-size: 12px; color: #fff; background: var(--red); padding: 2px 10px; }
.sec-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.015em; }

/* ===== Catalog grid ===== */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cat { background: #fff; display: flex; flex-direction: column; }
.cat:hover { background: var(--paper-2); }
.cat-fig { border-bottom: 1px solid var(--line); padding: 10px 12px 2px; }
.cat-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cat-sku { font-family: var(--mono); font-size: 12px; color: #fff; background: var(--ink); align-self: flex-start; padding: 1px 8px; }
.cat h3 { font-size: 17px; font-weight: 700; }
.cat h3 a:hover { color: var(--red); }
.cat p { font-size: 13.5px; color: var(--gray); flex: 1; line-height: 1.7; }
.cat-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px dotted var(--line); font-size: 13px; }
.cat-spec { font-family: var(--mono); color: var(--red); font-weight: 700; }
.cat-foot a { font-weight: 700; }

/* ===== SKU table ===== */
.table-wrap { overflow-x: auto; border: 1.5px solid var(--ink); background: #fff; }
.sku-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14px; }
.sku-table th {
  text-align: left; padding: 9px 14px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .04em;
  border-right: 1px solid #3a3a3a;
}
.sku-table th:last-child { border-right: 0; }
.sku-table td { padding: 9px 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.sku-table td:last-child { border-right: 0; }
.sku-table tbody tr:last-child td { border-bottom: 0; }
.sku-table tbody tr:nth-child(even) { background: var(--paper-2); }
.sku-table tbody tr:hover { background: #fdf4f3; }
.sku-table .sku { font-family: var(--mono); font-weight: 700; color: var(--red); }
.sku-table .num { font-family: var(--mono); }
.table-note { font-size: 12.5px; color: var(--gray); padding: 10px 14px; border-top: 1px solid var(--line); background: var(--paper-2); }

/* ===== Terms ===== */
.terms { list-style: none; counter-reset: tm; border-top: 1px solid var(--line); }
.terms li {
  counter-increment: tm; display: grid; grid-template-columns: 36px 96px 1fr; gap: 16px;
  align-items: baseline; padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.terms li::before { content: counter(tm) "."; font-family: var(--mono); font-size: 13px; color: var(--red); font-weight: 700; }
.terms b { font-size: 15px; font-weight: 800; }
.terms span { font-size: 14px; color: var(--gray); }

/* ===== Updates ===== */
.upd-list { border-top: 1px solid var(--line); }
.upd-row {
  display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: baseline;
  padding: 12px 4px; border-bottom: 1px solid var(--line); transition: background .15s ease;
}
.upd-row:hover { background: var(--paper-2); }
.upd-row time { font-family: var(--mono); font-size: 12.5px; color: var(--gray); }
.upd-row h3 { font-size: 15px; font-weight: 600; }
.upd-row:hover h3 { color: var(--red); }

/* ===== CTA ===== */
.cta-order {
  position: relative; margin: 44px 0; padding: 26px 28px; background: #fff;
  border: 1.5px solid var(--ink); display: flex; flex-wrap: wrap; gap: 20px;
  align-items: center; justify-content: space-between;
}
.cta-sec {
  position: absolute; top: -11px; left: 24px; background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 11.5px; padding: 2px 12px;
}
.cta-order h2 { font-size: 21px; font-weight: 800; }
.cta-order p { font-size: 14px; color: var(--gray); margin-top: 6px; max-width: 42em; }
.cta-side { display: flex; align-items: center; gap: 16px; }
.cta-phone { font-family: var(--mono); font-size: 20px; font-weight: 800; color: var(--red); }

/* ===== Page hero / inner ===== */
.page-hero { padding: 28px 0; border-bottom: 2px solid var(--ink); }
.page-hero h1 { font-size: 25px; font-weight: 800; letter-spacing: -.015em; }
.breadcrumbs { margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.breadcrumbs a:hover { color: var(--red); }

.layout { display: grid; grid-template-columns: 1fr 280px; gap: 28px; padding: 36px 0 56px; align-items: start; }
.layout-full { padding: 36px 0 56px; }
.entry-card { background: #fff; border: 1px solid var(--line); padding: 18px 22px; margin-bottom: 14px; }
.entry-card:hover { border-color: var(--ink); }
.entry-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.entry-card h2 a:hover { color: var(--red); }
.entry-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.entry-meta a { color: var(--red); }
.entry-excerpt { margin-top: 8px; font-size: 14.5px; color: #4a4740; }
.entry-thumb { margin-bottom: 14px; border: 1px solid var(--line); }
.single-header { border-bottom: 2px solid var(--ink); padding-bottom: 12px; margin-bottom: 20px; }
.single-header h1 { font-size: 24px; font-weight: 800; margin-bottom: 6px; }
.entry-content { background: #fff; border: 1px solid var(--line); padding: 24px; font-size: 15.5px; }
.entry-content > * + * { margin-top: 14px; }
.entry-content h2 { font-size: 19px; font-weight: 800; border-left: 4px solid var(--red); padding-left: 10px; }
.entry-content h3 { font-size: 17px; font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote { border-left: 3px solid var(--red); background: var(--paper-2); padding: 12px 16px; color: #4a4740; }
.entry-content code { font-family: var(--mono); background: var(--paper-2); padding: 2px 5px; }
.entry-content a { color: var(--red); text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; font-size: 13.5px; }
.post-nav a:hover { color: var(--red); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 36px; height: 36px; padding: 0 9px;
  border: 1px solid var(--line); background: #fff; font-family: var(--mono); font-size: 13px;
}
.pagination .current, .pagination .page-numbers:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 90px; }
.sidebar-cta { background: var(--ink); color: var(--paper); padding: 20px 18px; text-align: center; }
.sidebar-cta h3 { font-size: 16px; font-weight: 800; }
.sidebar-cta p { font-size: 12.5px; color: #b6b2a9; margin: 6px 0 10px; }
.sidebar-cta strong { display: block; font-family: var(--mono); font-size: 19px; color: #fff; margin-bottom: 12px; }
.sidebar-cta .btn { width: 100%; background: var(--red); border-color: var(--red); color: #fff; }
.widget { background: #fff; border: 1px solid var(--line); padding: 16px; }
.widget-title { font-size: 15px; font-weight: 800; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 2px solid var(--ink); }
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.widget li a { font-size: 13.5px; color: #4a4740; }
.widget li a:hover { color: var(--red); }

.search-form { display: flex; gap: 6px; }
.search-field { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); background: #fff; font-family: var(--mono); font-size: 13px; }
.search-field:focus { outline: none; border-color: var(--ink); }
.search-submit { padding: 8px 14px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; }
.search-submit:hover { background: var(--red); border-color: var(--red); }

/* ===== Comments ===== */
.comments-area { margin-top: 22px; background: #fff; border: 1px solid var(--line); padding: 22px; }
.comments-area h2, .comment-reply-title { font-size: 17px; font-weight: 800; margin-bottom: 12px; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.comment-list .comment-body { border-left: 3px solid var(--line); padding-left: 14px; font-size: 14.5px; }
.comment-notes { font-size: 12.5px; color: var(--gray); margin-bottom: 10px; }
.comment-form p { margin-bottom: 10px; }
.comment-form label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); background: #fff; font-family: inherit; font-size: 13.5px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--ink); }
.comment-form .submit { padding: 10px 24px; border: 1.5px solid var(--red); background: var(--red); color: #fff; font-weight: 700; cursor: pointer; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 70px 0; }
.error-code { font-family: var(--mono); font-size: 82px; font-weight: 800; color: var(--red); line-height: 1; }
.error-page h1 { font-size: 23px; font-weight: 800; margin: 10px 0 6px; }
.error-page p { color: var(--gray); margin-bottom: 16px; }
.error-page .search-form { max-width: 400px; margin: 0 auto 16px; }

/* ===== Footer ===== */
.site-footer { background: var(--paper-2); border-top: 3px double var(--ink); margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 30px; padding: 36px 0 26px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.footer-brand strong { font-size: 16px; font-weight: 800; }
.footer-col p { font-size: 13.5px; color: var(--gray); }
.footer-col h3 { font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--red); margin-bottom: 12px; }
.footer-col ul, .footer-menu { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 13.5px; color: #4a4740; }
.footer-col a:hover { color: var(--red); }
.footer-contact li { font-size: 13.5px; display: flex; gap: 8px; color: var(--gray); }
.footer-contact b { color: var(--ink); font-weight: 700; min-width: 32px; }
.footer-bottom { border-top: 1px solid var(--line); padding: 12px 0; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.footer-bottom .container { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 780px) {
  .topbar-inner { flex-direction: column; gap: 2px; text-align: center; }
  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 38px; height: 38px; padding: 0 7px; border: 1.5px solid var(--ink); cursor: pointer;
  }
  .nav-toggle-label span { display: block; height: 2px; background: var(--ink); }
  .site-nav { display: none; order: 10; width: 100%; padding-top: 10px; margin-top: 10px; border-top: 1px solid var(--line); }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .site-nav .menu { flex-direction: column; gap: 2px; }
  .site-nav a { display: block; padding: 9px 0; }
  .header-inner { flex-wrap: wrap; }
  .header-cta { display: none; }
  .cat-grid { grid-template-columns: 1fr; }
  .terms li { grid-template-columns: 28px 1fr; }
  .terms b { grid-column: 2; }
  .terms span { grid-column: 2; }
  .upd-row { grid-template-columns: 1fr; gap: 2px; }
  .cta-order { padding: 24px 20px; }
  .footer-main { grid-template-columns: 1fr; gap: 22px; }
}
