/*
Theme Name: PP RedTrust 红信企业
Theme URI: https://example.com/pp-redtrust
Author: PP Theme Studio
Author URI: https://example.com
Description: 面向 PP 酸洗槽厂家的经典国内企业站风格 WordPress 主题。中国红通栏导航、左侧产品分类栏、荣誉资质与双栏新闻的传统布局,信息密集、电话醒目,符合国内 B2B 采购用户的浏览习惯,适合注重询盘转化的中小制造企业。
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-redtrust
Tags: red, two-columns, left-sidebar, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --red: #c8102e;
  --red-deep: #9e0b22;
  --red-dark: #7c081a;
  --gold: #f5b301;
  --text: #333333;
  --text-light: #777777;
  --line: #e3e3e3;
  --bg-gray: #f5f5f5;
  --container: 1200px;
  --font: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* ===== Base ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.8; color: var(--text); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--text); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--red); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { color: #222; line-height: 1.4; font-weight: 700; }
table { border-collapse: collapse; width: 100%; }
button, input, textarea, select { font-family: inherit; font-size: inherit; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 15px; }
.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ===== Buttons ===== */
.btn { display: inline-block; padding: 10px 28px; font-size: 15px; font-weight: 700; cursor: pointer; border: none; transition: all 0.2s ease; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-deep); color: #fff; }
.btn-gold { background: var(--gold); color: #7a5600; }
.btn-gold:hover { background: #ffc82e; }
.btn-line { border: 1px solid #fff; color: #fff; background: transparent; }
.btn-line:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* ===== Topbar ===== */
.topbar { background: #f0f0f0; border-bottom: 1px solid var(--line); font-size: 12px; color: #888; }
.topbar .container { display: flex; justify-content: space-between; gap: 12px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.topbar a { color: #888; margin-left: 14px; }
.topbar a:hover { color: var(--red); }

/* ===== Header ===== */
.site-header { background: #fff; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 15px; }
.site-branding { display: flex; align-items: center; gap: 14px; }
.site-branding .custom-logo { max-height: 64px; width: auto; }
.brand-mark {
  width: 58px; height: 58px; flex: none;
  background: var(--red);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px;
  border-radius: 6px;
}
.site-title { font-size: 26px; font-weight: 800; color: #222; }
.site-title a { color: #222; }
.site-title a:hover { color: var(--red); }
.site-desc { font-size: 13px; color: var(--text-light); letter-spacing: 1px; }
.header-phone { display: flex; align-items: center; gap: 12px; }
.phone-icon {
  width: 46px; height: 46px; flex: none;
  border: 2px solid var(--red);
  border-radius: 50%;
  color: var(--red);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.header-phone small { display: block; font-size: 13px; color: var(--text-light); line-height: 1.4; }
.header-phone strong { display: block; font-size: 26px; color: var(--red); font-weight: 800; line-height: 1.2; letter-spacing: 1px; }

/* ===== Main nav (red bar) ===== */
.mainnav { background: var(--red); position: relative; }
.mainnav-inner { max-width: var(--container); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.nav-toggle-input { display: none; }
.nav-toggle-label { display: none; width: 46px; height: 46px; cursor: pointer; flex-direction: column; justify-content: center; gap: 6px; padding: 12px; }
.nav-toggle-label span { display: block; height: 2px; background: #fff; }
.site-nav { flex: 1; }
.site-nav > ul, .site-nav > .menu { display: flex; }
.site-nav li { position: relative; }
.site-nav a {
  display: block;
  padding: 15px 30px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}
.site-nav > ul > li:first-child > a { border-left: 1px solid rgba(255, 255, 255, 0.14); }
.site-nav a:hover,
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a { background: var(--red-deep); color: #fff; }
.site-nav .sub-menu {
  position: absolute; top: 100%; left: 0;
  min-width: 200px;
  background: var(--red-deep);
  display: none;
  z-index: 99;
}
.site-nav li:hover > .sub-menu { display: block; }
.site-nav .sub-menu a { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); font-size: 14px; padding: 12px 20px; }
.site-nav .sub-menu a:hover { background: var(--red-dark); }

/* ===== Banner ===== */
.banner {
  background:
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.10) 0%, transparent 45%),
    linear-gradient(115deg, var(--red-dark) 0%, var(--red) 60%, #e2334f 100%);
  color: #fff;
  text-align: center;
  padding: 64px 15px 70px;
}
.banner h1 { color: #fff; font-size: 42px; letter-spacing: 2px; margin-bottom: 14px; }
.banner h1 em { font-style: normal; color: var(--gold); }
.banner p { font-size: 17px; color: #ffd9df; margin-bottom: 30px; }
.banner .btn { margin: 0 8px; }
.banner-tags { margin-top: 26px; font-size: 14px; color: #ffc4cd; }
.banner-tags b { color: var(--gold); margin: 0 4px; font-weight: 600; }

/* ===== Hot search bar ===== */
.hotbar { background: #fff; border-bottom: 1px solid var(--line); font-size: 13px; }
.hotbar .container { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
.hotbar-words b { color: var(--red); }
.hotbar-words a { margin-right: 14px; color: var(--text-light); }
.hotbar-words a:hover { color: var(--red); }
.hotbar .search-form { width: 300px; }

/* ===== Section common ===== */
.section { padding: 50px 0; }
.section-gray { background: var(--bg-gray); }
.sec-title { text-align: center; margin-bottom: 36px; }
.sec-title h2 { font-size: 30px; color: #222; display: inline-flex; align-items: center; gap: 18px; }
.sec-title h2::before, .sec-title h2::after { content: ""; width: 60px; height: 2px; background: var(--red); }
.sec-title p { color: var(--text-light); font-size: 14px; margin-top: 8px; letter-spacing: 2px; }

/* ===== Home columns ===== */
.home-cols { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }

/* Left category */
.cat-box { border: 1px solid var(--line); background: #fff; }
.cat-head { background: var(--red); color: #fff; padding: 16px 20px; }
.cat-head h3 { color: #fff; font-size: 20px; }
.cat-head span { font-size: 12px; color: #ffb9c4; text-transform: uppercase; letter-spacing: 1px; }
.cat-list { padding: 12px; }
.cat-list li { margin-bottom: 8px; }
.cat-list a {
  display: block;
  background: var(--bg-gray);
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  border-left: 3px solid transparent;
}
.cat-list a::after { content: "»"; position: absolute; right: 14px; color: #bbb; }
.cat-list a:hover { background: #fdeef1; border-left-color: var(--red); color: var(--red); }
.cat-list a:hover::after { color: var(--red); }
.side-contact { border: 1px solid var(--line); margin-top: 20px; background: #fff; }
.side-contact .cat-head { background: var(--red-deep); }
.side-contact-body { padding: 16px 18px; font-size: 13.5px; }
.side-contact-body p { margin-bottom: 8px; color: #555; }
.side-contact-body b { color: var(--red); font-size: 17px; }

/* Product grid (right) */
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pcard { border: 1px solid var(--line); background: #fff; transition: all 0.2s ease; }
.pcard:hover { border-color: var(--red); box-shadow: 0 6px 18px rgba(200, 16, 46, 0.12); }
.pcard-img { background: linear-gradient(160deg, #fdf1f3 0%, #f7dfe4 100%); padding: 22px; display: flex; justify-content: center; }
.pcard-img svg { width: 140px; height: 96px; }
.pcard-body { padding: 12px 14px 16px; text-align: center; border-top: 1px solid var(--line); }
.pcard-body h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 8px; }
.pcard-body h3 a { color: #333; }
.pcard-body h3 a:hover { color: var(--red); }
.pcard-btns { display: flex; gap: 8px; justify-content: center; }
.pcard-btns a { font-size: 12.5px; padding: 5px 16px; border: 1px solid var(--red); color: var(--red); }
.pcard-btns a:hover { background: var(--red); color: #fff; }
.pcard-btns a.solid { background: var(--red); color: #fff; }
.pcard-btns a.solid:hover { background: var(--red-deep); }

/* ===== Ad band ===== */
.ad-band { background: linear-gradient(100deg, var(--red-dark) 0%, var(--red) 100%); color: #fff; padding: 26px 0; }
.ad-band .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.ad-band h3 { color: #fff; font-size: 22px; }
.ad-band h3 small { display: block; font-size: 13px; font-weight: 400; color: #ffc4cd; margin-top: 4px; }
.ad-phone { display: flex; align-items: center; gap: 12px; }
.ad-phone strong { font-size: 28px; color: var(--gold); font-weight: 800; letter-spacing: 1px; }

/* ===== Advantage ===== */
.adv-rows { max-width: 1000px; margin: 0 auto; }
.adv-row { display: flex; gap: 24px; padding: 22px 0; border-bottom: 1px dashed var(--line); }
.adv-row:last-child { border-bottom: none; }
.adv-no {
  flex: none;
  width: 52px; height: 52px;
  background: var(--red);
  color: #fff;
  font-size: 22px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
}
.adv-row h3 { font-size: 18px; margin-bottom: 6px; }
.adv-row h3 span { color: var(--red); }
.adv-row p { color: var(--text-light); font-size: 14px; }

/* ===== About ===== */
.about-wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; }
.about-text h3 { font-size: 24px; margin-bottom: 6px; }
.about-text .en { font-size: 12px; color: #bbb; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.about-text p { color: #555; margin-bottom: 12px; text-indent: 2em; }
.about-more { margin-top: 18px; }
.about-img { background: #fff; border: 1px solid var(--line); padding: 26px; }
.about-img svg { width: 100%; height: auto; }
.about-img-cap { text-align: center; font-size: 13px; color: var(--text-light); padding-top: 12px; border-top: 1px dashed var(--line); margin-top: 16px; }

/* ===== Honor ===== */
.honor-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.honor-card { border: 1px solid var(--line); background: #fff; padding: 20px 16px 14px; text-align: center; transition: all 0.2s ease; }
.honor-card:hover { border-color: var(--gold); box-shadow: 0 6px 16px rgba(245, 179, 1, 0.18); }
.honor-card svg { width: 100%; max-width: 170px; height: auto; margin: 0 auto 10px; }
.honor-card p { font-size: 13.5px; font-weight: 600; color: #555; }

/* ===== News two columns ===== */
.news-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.news-box { border: 1px solid var(--line); background: #fff; }
.news-box-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  border-bottom: 2px solid var(--red);
  background: #fafafa;
}
.news-box-head h3 { font-size: 17px; padding: 12px 0; position: relative; }
.news-box-head h3::before { content: ""; display: inline-block; width: 4px; height: 16px; background: var(--red); margin-right: 10px; vertical-align: -2px; }
.news-box-head a { font-size: 12px; color: var(--text-light); }
.news-box-head a:hover { color: var(--red); }
.news-box ul { padding: 12px 18px 16px; }
.news-box li {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.news-box li:last-child { border-bottom: none; }
.news-box li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.news-box li a::before { content: "■"; color: var(--red); font-size: 9px; margin-right: 9px; vertical-align: 2px; }
.news-box li time { flex: none; color: #999; font-size: 13px; }

/* ===== Footer ===== */
.footer-nav { background: var(--red); }
.footer-nav ul { display: flex; justify-content: center; flex-wrap: wrap; }
.footer-nav a { display: block; color: #fff; padding: 13px 30px; font-size: 15px; }
.footer-nav a:hover { background: var(--red-deep); color: #fff; }
.site-footer { background: #2b2b2b; color: #9a9a9a; font-size: 13.5px; }
.footer-main { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding: 44px 15px 36px; }
.footer-col h3 { color: #fff; font-size: 16px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #444; }
.footer-col p { margin-bottom: 8px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a { color: #9a9a9a; }
.footer-col a:hover { color: #fff; }
.footer-contact li b { color: #ccc; margin-right: 6px; }
.footer-phone-big { font-size: 24px; color: var(--gold); font-weight: 800; margin: 6px 0 10px; }
.footer-bottom { border-top: 1px solid #3d3d3d; padding: 14px 0; font-size: 12.5px; text-align: center; }
.footer-bottom .container { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* ===== Inner pages ===== */
.page-hero { background: linear-gradient(115deg, var(--red-dark) 0%, var(--red) 100%); color: #fff; padding: 36px 0; }
.page-hero h1 { color: #fff; font-size: 26px; }
.breadcrumbs { margin-top: 6px; font-size: 12.5px; color: #ffc4cd; }
.breadcrumbs a { color: #ffe3e8; }
.breadcrumbs a:hover { color: #fff; }

.layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 36px 0; align-items: start; }
.layout-full { padding: 36px 0; }
.main-col { min-width: 0; border: 1px solid var(--line); background: #fff; padding: 26px 28px; }

.entry-card { padding: 18px 0; border-bottom: 1px dashed var(--line); }
.entry-card:first-child { padding-top: 0; }
.entry-card h2 { font-size: 18px; margin-bottom: 8px; }
.entry-card h2 a::before { content: "■"; color: var(--red); font-size: 10px; margin-right: 9px; vertical-align: 2px; }
.entry-meta { font-size: 12.5px; color: #999; margin-bottom: 8px; }
.entry-meta span { margin-right: 16px; }
.entry-excerpt { color: var(--text-light); font-size: 13.5px; }
.entry-thumb { margin-bottom: 14px; }

.entry-content { font-size: 15px; }
.entry-content h2, .entry-content h3 { margin: 1.5em 0 0.7em; }
.entry-content h2 { font-size: 22px; padding-left: 12px; border-left: 4px solid var(--red); }
.entry-content h3 { font-size: 18px; }
.entry-content p { margin-bottom: 1em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.1em 1.8em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content blockquote { border-left: 4px solid var(--gold); background: #fffbef; padding: 14px 20px; margin: 1.3em 0; color: #6b5b2a; }
.entry-content table th, .entry-content table td { border: 1px solid var(--line); padding: 9px 13px; text-align: left; }
.entry-content table th { background: #fdeef1; color: var(--red-deep); }
.entry-content a { color: var(--red); text-decoration: underline; }
.single-header { text-align: center; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.single-header h1 { font-size: 24px; margin-bottom: 8px; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 18px; border-top: 1px dashed var(--line); font-size: 13.5px; }

/* Inner sidebar reuses cat-box; extra widget style */
.sidebar .widget { border: 1px solid var(--line); background: #fff; margin-bottom: 20px; }
.sidebar .widget-title, .sidebar .widget > h2 {
  background: var(--red);
  color: #fff;
  font-size: 16px;
  padding: 12px 18px;
  margin: 0;
}
.sidebar .widget-inner, .sidebar .widget > ul, .sidebar .widget > div:not(.cat-head), .sidebar .widget form { padding: 14px 16px; }
.sidebar .widget ul li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.sidebar .widget ul li:last-child { border-bottom: none; }
.sidebar .widget ul li a::before { content: "»"; color: var(--red); margin-right: 8px; }

/* Search form */
.search-form { display: flex; }
.search-form .search-field { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--line); border-right: none; outline: none; font-size: 13px; }
.search-form .search-field:focus { border-color: var(--red); }
.search-form .search-submit { padding: 9px 18px; background: var(--red); color: #fff; border: none; cursor: pointer; font-weight: 700; }
.search-form .search-submit:hover { background: var(--red-deep); }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block;
  min-width: 36px;
  padding: 7px 12px;
  text-align: center;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13px;
  background: #fff;
}
.pagination .page-numbers.current, .pagination .page-numbers:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Comments */
.comments-area { margin-top: 36px; }
.comments-area > h2 { font-size: 19px; margin-bottom: 18px; padding-left: 10px; border-left: 4px solid var(--red); }
.comment-list > li { border: 1px solid var(--line); padding: 16px; margin-bottom: 14px; }
.comment-list .children { margin: 14px 0 0 22px; }
.comment-list .children > li { border: 1px dashed var(--line); padding: 12px; margin-bottom: 10px; }
.comment-meta { font-size: 12.5px; color: #999; margin-bottom: 6px; }
.comment-meta b { color: var(--red); }
.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: 9px 12px;
  border: 1px solid var(--line);
  outline: none;
}
.comment-form input:focus, .comment-form textarea:focus { border-color: var(--red); }

/* 404 */
.error-page { text-align: center; padding: 70px 15px; }
.error-code { font-size: 96px; font-weight: 800; color: var(--red); line-height: 1.1; }
.error-page h1 { font-size: 24px; margin: 12px 0 8px; }
.error-page p { color: var(--text-light); margin-bottom: 22px; }
.error-page .search-form { max-width: 400px; margin: 0 auto 22px; }

/* WP core */
.alignleft { float: left; margin: 0 20px 14px 0; }
.alignright { float: right; margin: 0 0 14px 20px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12.5px; color: var(--text-light); text-align: center; padding: 6px 0; }
.sticky { background: #fffbef; }
.bypostauthor { display: block; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .home-cols { grid-template-columns: 1fr; }
  .cat-box, .side-contact { display: none; }
  .pgrid { grid-template-columns: repeat(3, 1fr); }
  .about-wrap { grid-template-columns: 1fr; }
  .honor-grid { grid-template-columns: repeat(2, 1fr); }
  .news-cols { grid-template-columns: 1fr; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
  .layout .sidebar { order: 2; }
}
@media (max-width: 860px) {
  .topbar { display: none; }
  .header-phone { display: none; }
  .nav-toggle-label { display: flex; }
  .mainnav-inner { justify-content: flex-end; min-height: 46px; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--red);
    display: none;
    z-index: 98;
  }
  .nav-toggle-input:checked ~ .site-nav { display: block; }
  .site-nav > ul, .site-nav > .menu { flex-direction: column; }
  .site-nav a { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.12); padding: 13px 22px; }
  .site-nav .sub-menu { position: static; display: block; background: var(--red-deep); }
  .banner h1 { font-size: 30px; }
  .hotbar .search-form { width: 100%; }
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .ad-band .container { flex-direction: column; text-align: center; }
}
@media (max-width: 600px) {
  .section { padding: 36px 0; }
  .sec-title h2 { font-size: 24px; }
  .sec-title h2::before, .sec-title h2::after { width: 30px; }
  .banner h1 { font-size: 25px; }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pcard-btns a { padding: 4px 10px; }
  .honor-grid { grid-template-columns: 1fr 1fr; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
  .footer-nav a { padding: 11px 16px; font-size: 14px; }
  .site-title { font-size: 21px; }
}
