/*
Theme Name: PP Ticket 票据存根
Theme URI: https://example.com/pp-ticket
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-ticket
Tags: light, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --note: #f7f4ec;
  --note-2: #efe9dc;
  --paper: #fffdf8;
  --ink: #1d1d1d;
  --red: #c8342b;
  --red-dim: #a82b23;
  --gray: #6f6a60;
  --line: #d9d2c4;
  --container: 1140px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  /* 齿孔边:圆点重复形成撕裂线 */
  --perf: radial-gradient(circle at 6px 50%, transparent 0 5px, var(--note) 5px);
}

/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--note);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
svg { max-width: 100%; height: auto; }
.barcode { width: 200px; height: 40px; margin-top: 16px; }
.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: 12px 26px; font-size: 15px; font-weight: 700;
  border: 1.5px dashed var(--ink); background: transparent; 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: 1.5px solid var(--red); color: #fff; }
.btn-main:hover { background: var(--red-dim); border-color: var(--red-dim); color: #fff; }

/* 齿孔分隔条 */
.perf-edge {
  height: 12px;
  background-image: radial-gradient(circle at 8px 6px, var(--note) 4px, transparent 4.5px);
  background-size: 16px 12px;
  background-repeat: repeat-x;
}

/* ===== Header ===== */
.site-header { background: var(--paper); border-bottom: 2px dashed var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 22px; padding: 15px 0; }
.site-branding { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 44px; height: 44px;
  background: var(--red); color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: 2px 2px 0 var(--ink);
}
.site-title { font-size: 20px; font-weight: 800; line-height: 1.3; }
.site-desc { font-family: var(--mono); font-size: 11px; color: var(--gray); letter-spacing: .08em; }
.site-nav .menu { display: flex; gap: 26px; list-style: none; }
.site-nav a { font-size: 15px; font-weight: 600; padding: 4px 0; border-bottom: 2px dashed 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 ticket ===== */
.hero { padding: 48px 0 42px; }
.ticket {
  display: grid; grid-template-columns: 1.5fr 24px 1fr;
  background: var(--paper); border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 rgba(29,29,29,.14);
}
.ticket-main { padding: 34px 32px 30px; }
.tk-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12px; color: var(--gray);
  padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px dashed var(--line);
}
.tk-type { background: var(--red); color: #fff; padding: 2px 10px; letter-spacing: .06em; }
.hero h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.24; font-weight: 900; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--red); }
.hero-sub { margin-top: 16px; font-size: 16px; color: #4b463d; max-width: 27em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
/* 撕裂齿孔列 */
.ticket-tear {
  background-image: radial-gradient(circle at 50% 8px, var(--note) 5px, transparent 5.5px);
  background-size: 24px 16px; background-repeat: repeat-y;
  border-left: 1px dashed var(--line); border-right: 1px dashed var(--line);
}
.ticket-stub { padding: 26px 24px; background: var(--note-2); }
.tk-stub-label {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  border: 1px solid var(--ink); padding: 2px 10px; margin-bottom: 14px;
}
.tk-rows { list-style: none; margin-top: 14px; }
.tk-rows li {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 14px;
}
.tk-rows span { color: var(--gray); }
.tk-rows b { font-family: var(--mono); font-weight: 700; }

/* ===== Sections ===== */
.section { padding: 60px 0; }
.section-tint { background: var(--note-2); }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 32px; padding-bottom: 12px; border-bottom: 2px dashed var(--line); }
.sec-no {
  display: grid; place-items: center; min-width: 40px; height: 40px;
  background: var(--ink); color: var(--paper); font-family: var(--mono); font-weight: 700;
}
.sec-head h2 { font-size: 25px; font-weight: 800; }
.sec-en { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--gray); }

/* ===== Products ===== */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.prod {
  background: var(--paper); border: 1.5px solid var(--ink); padding: 16px 20px 22px;
  display: flex; flex-direction: column; gap: 9px; transition: transform .16s ease, box-shadow .16s ease;
}
.prod:hover { transform: translateY(-4px); box-shadow: 5px 5px 0 var(--red); }
.prod-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; }
.prod-code { background: var(--ink); color: var(--paper); padding: 2px 8px; }
.prod-price { color: var(--red); font-weight: 700; }
.prod-fig { background: var(--note-2); padding: 10px 8px 4px; }
.prod h3 { font-size: 18px; font-weight: 800; }
.prod h3 a:hover { color: var(--red); }
.prod p { font-size: 14px; color: var(--gray); flex: 1; line-height: 1.7; }
.prod-link { font-size: 14px; font-weight: 700; color: var(--red); }

/* ===== Terms ===== */
.term-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.term { background: var(--paper); border: 1.5px dashed var(--ink); padding: 22px 20px; }
.term-chk {
  display: grid; place-items: center; width: 30px; height: 30px; margin-bottom: 12px;
  background: var(--red); color: #fff; font-weight: 800; border-radius: 50%;
}
.term h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.term p { font-size: 14px; color: var(--gray); line-height: 1.75; }

/* ===== Flow ===== */
.flow-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.flow { background: var(--paper); border: 1.5px solid var(--line); padding: 20px 14px; text-align: center; position: relative; }
.flow b {
  display: grid; place-items: center; width: 40px; height: 40px; margin: 0 auto 12px;
  background: var(--red); color: #fff; font-family: var(--mono); font-size: 14px;
}
.flow h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.flow p { font-size: 13px; color: var(--gray); }
.flow:not(:last-child)::after {
  content: "✂"; position: absolute; right: -11px; top: 50%; transform: translateY(-50%);
  color: var(--gray); font-size: 13px; background: var(--note); padding: 2px 0;
}

/* ===== Records ===== */
.rec-list { background: var(--paper); border: 1.5px solid var(--ink); }
.rec-row {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px;
  padding: 15px 20px; border-bottom: 1px dashed var(--line); transition: background .15s ease;
}
.rec-row:last-child { border-bottom: 0; }
.rec-row:hover { background: var(--note-2); }
.rec-no { font-family: var(--mono); font-size: 13px; color: #fff; background: var(--ink); text-align: center; }
.rec-row h3 { font-size: 16px; font-weight: 500; }
.rec-row:hover h3 { color: var(--red); }
.rec-row time { font-family: var(--mono); font-size: 12px; color: var(--gray); }

/* ===== CTA ===== */
.cta-stub {
  display: grid; grid-template-columns: 1fr 24px auto; margin: 54px 0;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 6px 6px 0 rgba(29,29,29,.14);
}
.stub-main { padding: 30px 32px; }
.stub-label {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  background: var(--red); color: #fff; padding: 2px 10px; margin-bottom: 12px;
}
.stub-main h2 { font-size: 24px; font-weight: 800; }
.stub-main p { font-size: 14px; color: var(--gray); margin-top: 6px; max-width: 40em; }
.stub-tear {
  background-image: radial-gradient(circle at 50% 8px, var(--note) 5px, transparent 5.5px);
  background-size: 24px 16px; background-repeat: repeat-y;
  border-left: 1px dashed var(--line); border-right: 1px dashed var(--line);
}
.stub-side { padding: 30px 28px; background: var(--note-2); text-align: center; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.stub-cap { font-family: var(--mono); font-size: 11px; color: var(--gray); letter-spacing: .1em; }
.cta-phone { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--red); }

/* ===== Page hero / inner ===== */
.page-hero { background: var(--paper); border-bottom: 2px dashed var(--line); padding: 34px 0; }
.page-hero h1 { font-size: 27px; font-weight: 800; }
.breadcrumbs { margin-top: 6px; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.breadcrumbs a:hover { color: var(--red); }

.layout { display: grid; grid-template-columns: 1fr 290px; gap: 34px; padding: 44px 0 64px; align-items: start; }
.layout-full { padding: 44px 0 64px; }
.entry-card { background: var(--paper); border: 1.5px solid var(--line); padding: 24px; margin-bottom: 18px; }
.entry-card:hover { border-color: var(--ink); }
.entry-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.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: 10px; font-size: 15px; color: #4b463d; }
.entry-thumb { margin-bottom: 16px; border: 1px solid var(--line); }
.single-header { border-bottom: 2px dashed var(--line); padding-bottom: 14px; margin-bottom: 22px; }
.single-header h1 { font-size: 27px; font-weight: 800; margin-bottom: 8px; }
.entry-content { background: var(--paper); border: 1.5px solid var(--line); padding: 26px; font-size: 16px; }
.entry-content > * + * { margin-top: 16px; }
.entry-content h2 { font-size: 21px; font-weight: 800; border-left: 5px solid var(--red); padding-left: 12px; }
.entry-content h3 { font-size: 18px; font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote { border-left: 4px solid var(--red); background: var(--note-2); padding: 14px 18px; color: #4b463d; }
.entry-content code { font-family: var(--mono); background: var(--note-2); padding: 2px 6px; }
.entry-content a { color: var(--red); text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; font-size: 14px; }
.post-nav a:hover { color: var(--red); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1.5px solid var(--line); background: var(--paper); font-family: var(--mono);
}
.pagination .current, .pagination .page-numbers:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 96px; }
.sidebar-cta { background: var(--paper); border: 2px solid var(--ink); padding: 22px 20px; text-align: center; box-shadow: 4px 4px 0 var(--red); }
.sidebar-cta h3 { font-size: 18px; font-weight: 800; }
.sidebar-cta p { font-size: 13px; color: var(--gray); margin: 8px 0 12px; }
.sidebar-cta strong { display: block; font-family: var(--mono); font-size: 21px; color: var(--red); margin-bottom: 14px; }
.sidebar-cta .btn { width: 100%; }
.widget { background: var(--paper); border: 1.5px dashed var(--line); padding: 20px; }
.widget-title { font-size: 16px; font-weight: 800; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 2px dashed var(--line); }
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.widget li a { font-size: 14px; color: #4b463d; }
.widget li a:hover { color: var(--red); }

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

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

/* ===== 404 ===== */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-family: var(--mono); font-size: 88px; font-weight: 800; color: var(--red); line-height: 1; }
.error-page h1 { font-size: 25px; font-weight: 800; margin: 10px 0 8px; }
.error-page p { color: var(--gray); margin-bottom: 18px; }
.error-page .search-form { max-width: 420px; margin: 0 auto 18px; }

/* ===== Footer ===== */
.site-footer { background: var(--paper); border-top: 2px solid var(--ink); margin-top: 20px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 34px; padding: 44px 0 34px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { font-size: 17px; font-weight: 800; }
.footer-col p { font-size: 14px; color: var(--gray); }
.footer-col h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.footer-col ul, .footer-menu { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: #4b463d; }
.footer-col a:hover { color: var(--red); }
.footer-contact li { font-size: 14px; display: flex; gap: 8px; color: var(--gray); }
.footer-contact b { color: var(--ink); font-weight: 600; min-width: 34px; }
.footer-bottom { border-top: 1px dashed var(--line); padding: 15px 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) {
  .ticket { grid-template-columns: 1fr; }
  .ticket-tear {
    height: 24px; background-image: radial-gradient(circle at 8px 50%, var(--note) 5px, transparent 5.5px);
    background-size: 16px 24px; background-repeat: repeat-x;
    border: 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line);
  }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .term-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-row { grid-template-columns: repeat(3, 1fr); }
  .flow:nth-child(3)::after { content: none; }
  .cta-stub { grid-template-columns: 1fr; }
  .stub-tear { height: 24px; background-image: radial-gradient(circle at 8px 50%, var(--note) 5px, transparent 5.5px); background-size: 16px 24px; background-repeat: repeat-x; border: 0; border-top: 1px dashed var(--line); }
  .footer-main { grid-template-columns: repeat(2, 1fr); }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 780px) {
  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0 8px; border: 1.5px dashed 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: 12px; margin-top: 12px; border-top: 1px dashed var(--line); }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .site-nav .menu { flex-direction: column; gap: 2px; }
  .site-nav a { display: block; padding: 10px 0; }
  .header-inner { flex-wrap: wrap; }
  .header-cta { display: none; }
  .ticket-main { padding: 26px 20px; }
  .prod-grid, .term-grid, .flow-row { grid-template-columns: 1fr; }
  .flow::after { content: none !important; }
  .rec-row { grid-template-columns: 44px 1fr; }
  .rec-row time { display: none; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .sec-en { display: none; }
}
