/*
Theme Name: PP Embroidery 刺绣织物
Theme URI: https://example.com/pp-embroidery
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-embroidery
Tags: light, one-column, custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --linen: #f4efe4;
  --linen-2: #ebe4d5;
  --card: #fbf8f1;
  --thread-red: #c2453f;
  --thread-blue: #3f6f8f;
  --thread-green: #7d8a5c;
  --ink: #3a352c;
  --gray: #7b7364;
  --line: #d8cfbc;
  --container: 1140px;
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", Menlo, Consolas, monospace;
  /* 亚麻布纹 */
  --weave:
    repeating-linear-gradient(0deg, rgba(58,53,44,.035) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(58,53,44,.03) 0 1px, transparent 1px 4px);
}

/* ===== 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.88;
  color: var(--ink);
  background: var(--linen);
  background-image: var(--weave);
}
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: 600;
  border: 2px dashed var(--ink); border-radius: 8px; background: var(--card);
  color: var(--ink); cursor: pointer; transition: background .18s ease, color .18s ease;
}
.btn:hover { background: var(--ink); color: var(--linen); border-style: solid; }
.btn-main { background: var(--thread-red); border-color: var(--thread-red); border-style: dashed; color: #fff; }
.btn-main:hover { background: #a2352f; border-color: #a2352f; color: #fff; }

/* 缝线分隔条 */
.stitch-rule {
  height: 3px;
  background-image: repeating-linear-gradient(90deg, var(--thread-red) 0 12px, transparent 12px 22px);
  opacity: .75;
}

/* ===== Header ===== */
.site-header { background: var(--card); 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; border-radius: 8px;
  background: var(--thread-red); color: #fff; font-weight: 800; font-size: 16px;
  box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--thread-red);
}
.site-title { font-size: 20px; font-weight: 700; line-height: 1.3; }
.site-desc { font-size: 11px; color: var(--gray); letter-spacing: .1em; }
.site-nav .menu { display: flex; gap: 26px; list-style: none; }
.site-nav a { font-size: 15px; padding: 4px 0; border-bottom: 2px dashed transparent; }
.site-nav a:hover, .site-nav .current-menu-item > a { color: var(--thread-red); border-bottom-color: var(--thread-red); }
.nav-toggle-input, .nav-toggle-label { display: none; }

/* ===== Hero ===== */
.hero { padding: 66px 0 58px; }
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 46px; align-items: center; }
.hero-label {
  display: inline-block; font-size: 13px; color: var(--thread-blue);
  border: 2px dashed var(--line); border-radius: 20px; padding: 4px 16px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(32px, 5vw, 50px); line-height: 1.22; font-weight: 800; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: var(--thread-red); }
.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: 28px; }
.hero-hoop {
  background: var(--card); border: 3px dashed var(--line); border-radius: 20px;
  padding: 26px 22px 16px; text-align: center;
}
.hero-hoop figcaption { margin-top: 12px; font-size: 12.5px; color: var(--gray); }

/* ===== Sections ===== */
.section { padding: 62px 0; }
.section-cloth { background: var(--linen-2); }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 32px; }
.sec-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.015em; }
.sec-note { font-size: 13px; color: var(--gray); }

/* ===== Products ===== */
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.prod {
  background: var(--card); border: 2px dashed var(--line); border-radius: 14px;
  padding: 16px 20px 22px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .18s ease, transform .18s ease;
}
.prod:hover { border-color: var(--thread-red); transform: translateY(-3px); }
.prod-fig { background: var(--linen-2); border-radius: 10px; padding: 10px 8px 2px; }
.prod h3 { font-size: 18px; font-weight: 700; }
.prod h3 a:hover { color: var(--thread-red); }
.prod p { font-size: 14px; color: var(--gray); flex: 1; line-height: 1.8; }
.prod-link { font-size: 14px; font-weight: 600; color: var(--thread-blue); }

/* ===== Stitch cards ===== */
.stitch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stitch-card {
  background: var(--card); border-radius: 14px; padding: 24px 22px;
  box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--line);
}
.stitch-no {
  display: inline-block; font-size: 12px; color: #fff; background: var(--thread-blue);
  border-radius: 12px; padding: 2px 12px; margin-bottom: 10px;
}
.stitch-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.stitch-card p { font-size: 14px; color: var(--gray); line-height: 1.9; }

/* ===== Swatches ===== */
.swatch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.swatch {
  background: var(--card); border-radius: 14px; padding: 22px 22px 24px;
  border-left: 8px solid var(--c, var(--thread-red)); border-top: 2px dashed var(--line);
  border-right: 2px dashed var(--line); border-bottom: 2px dashed var(--line);
}
.swatch b { display: block; font-size: 20px; font-weight: 800; color: var(--c, var(--thread-red)); }
.swatch span { display: block; font-family: var(--mono); font-size: 12px; color: var(--gray); margin-top: 2px; }
.swatch p { font-size: 13.5px; color: var(--gray); margin-top: 8px; line-height: 1.8; }

/* ===== Notes ===== */
.note-list { background: var(--card); border: 2px dashed var(--line); border-radius: 14px; overflow: hidden; }
.note-row {
  display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 14px;
  padding: 15px 22px; border-bottom: 1px dashed var(--line); transition: background .16s ease;
}
.note-row:last-child { border-bottom: 0; }
.note-row:hover { background: var(--linen-2); }
.note-x { color: var(--thread-red); font-size: 13px; }
.note-row h3 { font-size: 16px; font-weight: 500; }
.note-row:hover h3 { color: var(--thread-red); }
.note-row time { font-family: var(--mono); font-size: 12px; color: var(--gray); }

/* ===== CTA ===== */
.cta-patch {
  position: relative; margin: 58px 0; padding: 36px 34px; background: var(--card);
  border-radius: 18px; box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--thread-red);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
}
.patch-tag {
  position: absolute; top: -14px; left: 30px; background: var(--thread-red); color: #fff;
  font-size: 12px; letter-spacing: .1em; padding: 3px 14px; border-radius: 12px;
}
.cta-patch h2 { font-size: 24px; font-weight: 800; letter-spacing: -.015em; }
.cta-patch p { font-size: 14px; color: var(--gray); margin-top: 8px; max-width: 42em; }
.cta-side { display: flex; align-items: center; gap: 18px; }
.cta-phone { font-family: var(--mono); font-size: 22px; font-weight: 800; color: var(--thread-red); }

/* ===== Page hero / inner ===== */
.page-hero { background: var(--card); padding: 36px 0; border-bottom: 2px dashed var(--line); }
.page-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -.015em; }
.breadcrumbs { margin-top: 6px; font-size: 13px; color: var(--gray); }
.breadcrumbs a:hover { color: var(--thread-red); }

.layout { display: grid; grid-template-columns: 1fr 290px; gap: 32px; padding: 44px 0 64px; align-items: start; }
.layout-full { padding: 44px 0 64px; }
.entry-card { background: var(--card); border: 2px dashed var(--line); border-radius: 14px; padding: 24px; margin-bottom: 18px; }
.entry-card:hover { border-color: var(--thread-red); }
.entry-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.entry-card h2 a:hover { color: var(--thread-red); }
.entry-meta { display: flex; gap: 14px; font-family: var(--mono); font-size: 12px; color: var(--gray); }
.entry-meta a { color: var(--thread-blue); }
.entry-excerpt { margin-top: 10px; font-size: 15px; color: #56503f; }
.entry-thumb { margin-bottom: 16px; border-radius: 10px; overflow: hidden; }
.single-header { padding-bottom: 14px; margin-bottom: 22px; border-bottom: 3px dashed var(--thread-red); }
.single-header h1 { font-size: 27px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.entry-content { background: var(--card); border: 2px dashed var(--line); border-radius: 14px; padding: 28px; font-size: 16px; }
.entry-content > * + * { margin-top: 16px; }
.entry-content h2 { font-size: 21px; font-weight: 800; color: var(--thread-red); }
.entry-content h3 { font-size: 18px; font-weight: 700; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content blockquote { border-left: 4px dashed var(--thread-blue); background: var(--linen-2); padding: 14px 18px; border-radius: 0 10px 10px 0; color: #56503f; }
.entry-content code { font-family: var(--mono); background: var(--linen-2); padding: 2px 6px; border-radius: 4px; }
.entry-content a { color: var(--thread-blue); 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(--thread-red); }
.pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pagination .page-numbers {
  display: grid; place-items: center; min-width: 42px; height: 42px; padding: 0 10px;
  border: 2px dashed var(--line); border-radius: 10px; background: var(--card); font-family: var(--mono);
}
.pagination .current, .pagination .page-numbers:hover { background: var(--thread-red); color: #fff; border-color: var(--thread-red); border-style: solid; }

/* ===== Sidebar ===== */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 94px; }
.sidebar-cta {
  background: var(--thread-blue); color: #fff; border-radius: 14px; padding: 24px 20px; text-align: center;
  box-shadow: 0 0 0 3px var(--linen), 0 0 0 5px var(--thread-blue);
}
.sidebar-cta h3 { font-size: 17px; font-weight: 700; }
.sidebar-cta p { font-size: 13px; color: #d3e0ea; margin: 8px 0 12px; }
.sidebar-cta strong { display: block; font-family: var(--mono); font-size: 21px; margin-bottom: 14px; }
.sidebar-cta .btn { width: 100%; background: #fff; color: var(--thread-blue); border-color: #fff; }
.widget { background: var(--card); border: 2px dashed var(--line); border-radius: 14px; 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: #56503f; }
.widget li a:hover { color: var(--thread-red); }

.search-form { display: flex; gap: 8px; }
.search-field { flex: 1; min-width: 0; padding: 10px 14px; border: 2px dashed var(--line); border-radius: 10px; background: var(--card); font-family: inherit; font-size: 14px; }
.search-field:focus { outline: none; border-color: var(--thread-red); border-style: solid; }
.search-submit { padding: 10px 18px; border: 2px solid var(--thread-red); border-radius: 10px; background: var(--thread-red); color: #fff; font-weight: 700; cursor: pointer; }

/* ===== Comments ===== */
.comments-area { margin-top: 28px; background: var(--card); border: 2px dashed var(--line); border-radius: 14px; padding: 26px; }
.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: 16px; 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: 600; 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 14px; border: 2px dashed var(--line); border-radius: 10px; background: var(--card); font-family: inherit; font-size: 14px;
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--thread-red); border-style: solid; }
.comment-form .submit { padding: 12px 30px; border: 2px solid var(--thread-red); border-radius: 10px; background: var(--thread-red); color: #fff; font-weight: 700; cursor: pointer; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 84px 0; }
.error-code { font-family: var(--mono); font-size: 88px; font-weight: 800; color: var(--thread-red); line-height: 1; }
.error-page h1 { font-size: 25px; font-weight: 800; 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(--card); margin-top: 24px; }
.footer-main { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 34px; padding: 46px 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; color: var(--thread-red); margin-bottom: 14px; }
.footer-col ul, .footer-menu { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { font-size: 14px; color: #56503f; }
.footer-col a:hover { color: var(--thread-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: 2px dashed var(--line); padding: 15px 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; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .stitch-grid, .swatch-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: 42px; height: 42px; padding: 0 8px; border: 2px dashed var(--line); border-radius: 10px; 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: 2px 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; }
  .prod-grid, .stitch-grid, .swatch-grid { grid-template-columns: 1fr; }
  .note-row { grid-template-columns: 18px 1fr; }
  .note-row time { display: none; }
  .cta-patch { padding: 30px 22px; }
  .footer-main { grid-template-columns: 1fr; gap: 26px; }
}
