/*
Theme Name: PP Botanical 植物图鉴
Theme URI: https://example.com/pp-botanical
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-botanical
Tags: light, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --paper: #faf8f2;
  --paper-2: #f2efe5;
  --card: #ffffff;
  --green: #2f5741;
  --green-lit: #47765b;
  --sage: #8aa694;
  --ink: #35392f;
  --gray: #7a7f72;
  --line: #ddd9cb;
  --container: 1120px;
  --font: "PingFang SC", "Microsoft YaHei", Georgia, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
}

/* ===== 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.9;
  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: 12px 28px; font-size: 15px; font-weight: 500;
  letter-spacing: .04em; border: 1px solid var(--green); background: transparent;
  color: var(--green); cursor: pointer; transition: background .18s ease, color .18s ease;
}
.btn:hover { background: var(--green); color: var(--paper); }
.btn-main { background: var(--green); color: var(--paper); }
.btn-main:hover { background: var(--green-lit); border-color: var(--green-lit); }

/* ===== Header ===== */
.site-header { background: var(--paper); border-bottom: 1px solid var(--green); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
.site-branding { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--green); color: var(--green);
  font-family: var(--serif); font-style: italic; font-size: 17px;
}
.site-title { font-family: var(--serif); font-size: 21px; font-weight: 700; letter-spacing: .02em; line-height: 1.3; }
.site-desc { font-family: var(--serif); font-style: italic; font-size: 12px; color: var(--gray); }
.site-nav .menu { display: flex; gap: 28px; list-style: none; }
.site-nav a { font-size: 15px; padding: 4px 0; border-bottom: 1px solid transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--green); border-bottom-color: var(--green); }
.nav-toggle-input, .nav-toggle-label { display: none; }

/* ===== Hero ===== */
.hero { padding: 72px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.hero-latin {
  display: block; font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--green-lit); border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 22px;
}
.hero h1 { font-family: var(--serif); font-size: clamp(32px, 4.8vw, 50px); line-height: 1.26; font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--green); }
.hero-sub { margin-top: 20px; font-size: 16px; color: var(--gray); max-width: 27em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.hero-plate { background: var(--card); border: 1px solid var(--line); padding: 26px 22px 16px; }
.hero-plate figcaption {
  display: flex; flex-direction: column; gap: 4px; margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line); font-family: var(--serif); font-size: 12px; color: var(--gray);
}
.plate-no { font-style: italic; color: var(--green); letter-spacing: .1em; }

/* ===== Sections ===== */
.section { padding: 66px 0; }
.section-tint { background: var(--paper-2); }
.sec-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 36px; }
.sec-genus { font-family: var(--serif); font-style: italic; font-size: 13px; letter-spacing: .16em; color: var(--green-lit); }
.sec-head h2 { font-family: var(--serif); font-size: 27px; font-weight: 700; }
.sec-rule { flex: 1; height: 1px; background: var(--line); }

/* ===== Specimen cards ===== */
.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.spec-card { background: var(--card); border: 1px solid var(--line); transition: border-color .18s ease, transform .18s ease; }
.spec-card:hover { border-color: var(--green); transform: translateY(-3px); }
.spec-fig { position: relative; padding: 14px 12px 4px; border-bottom: 1px solid var(--line); background: #fdfcf8; }
.spec-no {
  position: absolute; top: 12px; left: 14px;
  font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--green);
}
.spec-body { padding: 16px 20px 22px; }
.spec-body h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.spec-body h3 a:hover { color: var(--green); }
.spec-latin { display: block; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--sage); margin: 2px 0 8px; }
.spec-body p { font-size: 14px; color: var(--gray); line-height: 1.85; }

/* ===== Key table ===== */
.key-wrap { background: var(--card); border: 1px solid var(--line); padding: 4px 4px 0; }
.key-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.key-table th {
  text-align: left; padding: 14px 18px; font-family: var(--serif); font-size: 14px;
  color: var(--green); border-bottom: 1.5px solid var(--green);
}
.key-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.key-table tbody tr:last-child td { border-bottom: 0; }
.key-table tbody tr:hover { background: #fbfaf5; }
.key-table .rec { font-family: var(--serif); font-style: italic; color: var(--green); font-weight: 700; }
.key-note { font-size: 13px; color: var(--gray); padding: 14px 18px; border-top: 1px dashed var(--line); }

/* ===== Notes ===== */
.note-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.note-item { border-top: 2px solid var(--green); padding-top: 18px; }
.note-letter {
  display: block; font-family: var(--serif); font-style: italic; font-size: 22px;
  color: var(--green); margin-bottom: 8px;
}
.note-item h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.note-item p { font-size: 14px; color: var(--gray); line-height: 1.9; }

/* ===== Entries ===== */
.entry-list { border-top: 1px solid var(--line); }
.entry-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 22px; align-items: baseline;
  padding: 17px 4px; border-bottom: 1px solid var(--line); transition: padding-left .18s ease;
}
.entry-row:hover { padding-left: 12px; background: #fbfaf5; }
.entry-row time { font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--gray); }
.entry-row h3 { font-size: 16px; font-weight: 500; }
.entry-row:hover h3 { color: var(--green); }

/* ===== CTA ===== */
.cta-specimen {
  margin: 60px 0; padding: 34px 34px; background: var(--card); border: 1px solid var(--green);
  display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: space-between;
  position: relative;
}
.cta-label {
  position: absolute; top: -13px; left: 28px; background: var(--green); color: var(--paper);
  font-family: var(--serif); font-size: 13px; letter-spacing: .14em; padding: 2px 14px;
}
.cta-specimen h2 { font-family: var(--serif); font-size: 23px; font-weight: 700; }
.cta-specimen p { font-size: 14px; color: var(--gray); margin-top: 6px; max-width: 42em; }
.cta-side { display: flex; align-items: center; gap: 18px; }
.cta-phone { font-family: var(--serif); font-size: 21px; font-weight: 700; color: var(--green); }

/* ===== Page hero / inner ===== */
.page-hero { background: var(--paper-2); border-bottom: 1px solid var(--line); padding: 40px 0; }
.page-hero h1 { font-family: var(--serif); font-size: 28px; font-weight: 700; }
.breadcrumbs { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--gray); }
.breadcrumbs a:hover { color: var(--green); }

.layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; padding: 48px 0 70px; align-items: start; }
.layout-full { padding: 48px 0 70px; }
.entry-card { background: var(--card); border: 1px solid var(--line); padding: 24px; margin-bottom: 18px; }
.entry-card:hover { border-color: var(--green); }
.entry-card h2 { font-family: var(--serif); font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.entry-card h2 a:hover { color: var(--green); }
.entry-meta { display: flex; gap: 16px; font-family: var(--serif); font-style: italic; font-size: 13px; color: var(--gray); }
.entry-meta a { color: var(--green); }
.entry-excerpt { margin-top: 10px; font-size: 15px; color: #555a4d; }
.entry-thumb { margin-bottom: 16px; border: 1px solid var(--line); }
.single-header { border-bottom: 1.5px solid var(--green); padding-bottom: 14px; margin-bottom: 24px; }
.single-header h1 { font-family: var(--serif); font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.entry-content { background: var(--card); border: 1px solid var(--line); padding: 28px; font-size: 16px; }
.entry-content > * + * { margin-top: 17px; }
.entry-content h2 { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--green); }
.entry-content h3 { font-family: var(--serif); font-size: 19px; font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 24px; }
.entry-content blockquote { border-left: 3px solid var(--green); padding-left: 18px; color: var(--gray); font-style: italic; }
.entry-content code { font-family: Menlo, Consolas, monospace; background: var(--paper-2); padding: 2px 6px; }
.entry-content a { color: var(--green); text-decoration: underline; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; font-size: 14px; }
.post-nav a:hover { color: var(--green); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  border: 1px solid var(--line); background: var(--card); font-family: var(--serif);
}
.pagination .current, .pagination .page-numbers:hover { background: var(--green); color: var(--paper); border-color: var(--green); }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 98px; }
.sidebar-cta { background: var(--green); color: var(--paper); padding: 24px 20px; text-align: center; }
.sidebar-cta h3 { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.sidebar-cta p { font-size: 13px; color: #cbd8cf; margin: 8px 0 12px; }
.sidebar-cta strong { display: block; font-family: var(--serif); font-size: 21px; margin-bottom: 14px; }
.sidebar-cta .btn { width: 100%; background: var(--paper); color: var(--green); border-color: var(--paper); }
.widget { background: var(--card); border: 1px solid var(--line); padding: 20px; }
.widget-title { font-family: var(--serif); font-size: 17px; font-weight: 700; padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1.5px solid var(--green); }
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.widget li a { font-size: 14px; color: #555a4d; }
.widget li a:hover { color: var(--green); }

.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); background: var(--card); font-family: inherit; font-size: 14px; }
.search-field:focus { outline: none; border-color: var(--green); }
.search-submit { padding: 10px 18px; border: 1px solid var(--green); background: var(--green); color: var(--paper); cursor: pointer; }
.search-submit:hover { background: var(--green-lit); border-color: var(--green-lit); }

/* ===== Comments ===== */
.comments-area { margin-top: 30px; background: var(--card); border: 1px solid var(--line); padding: 26px; }
.comments-area h2, .comment-reply-title { font-family: var(--serif); font-size: 19px; font-weight: 700; margin-bottom: 16px; }
.comment-list { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }
.comment-list .comment-body { border-left: 2px solid var(--line); padding-left: 16px; font-size: 15px; }
.comment-notes { font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.comment-form p { margin-bottom: 13px; }
.comment-form label { display: block; font-size: 13px; 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: 1px solid var(--line); background: var(--card); font-family: inherit; font-size: 14px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--green); }
.comment-form .submit { padding: 12px 28px; border: 1px solid var(--green); background: var(--green); color: var(--paper); cursor: pointer; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 86px 0; }
.error-code { font-family: var(--serif); font-style: italic; font-size: 88px; color: var(--green); line-height: 1; }
.error-page h1 { font-family: var(--serif); font-size: 25px; font-weight: 700; margin: 12px 0 8px; }
.error-page p { color: var(--gray); margin-bottom: 20px; }
.error-page .search-form { max-width: 420px; margin: 0 auto 20px; }

/* ===== Footer ===== */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--green); margin-top: 24px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 36px; padding: 48px 0 34px; }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-brand strong { font-family: var(--serif); font-size: 18px; font-weight: 700; }
.footer-col p { font-size: 14px; color: var(--gray); }
.footer-col h3 { font-family: var(--serif); font-size: 16px; font-weight: 700; color: var(--green); margin-bottom: 14px; }
.footer-col ul, .footer-menu { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 14px; color: #555a4d; }
.footer-col a:hover { color: var(--green); }
.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 solid var(--line); padding: 16px 0; font-size: 13px; 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: 34px; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .note-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) {
  .nav-toggle-label {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--green); border-radius: 50%; cursor: pointer;
  }
  .nav-toggle-label span { display: block; height: 1.5px; background: var(--green); }
  .site-nav { display: none; order: 10; width: 100%; padding-top: 12px; margin-top: 12px; 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: 10px 0; }
  .header-inner { flex-wrap: wrap; }
  .header-cta { display: none; }
  .spec-grid, .note-grid { grid-template-columns: 1fr; }
  .key-table { font-size: 14px; }
  .key-table th, .key-table td { padding: 11px 12px; }
  .entry-row { grid-template-columns: 1fr; gap: 4px; }
  .cta-specimen { padding: 30px 22px; }
  .footer-main { grid-template-columns: 1fr; gap: 28px; }
}
