/* ============================================================
   Yuanchuang Pill Press - Main Stylesheet
   Easy to edit: colors and fonts are in :root below.
   ============================================================ */
:root {
  --navy: #0b3d63;
  --blue: #15699b;
  --blue-light: #e8f2f8;
  --steel: #f4f7f9;
  --orange: #e8751a;
  --ink: #1d2733;
  --muted: #5c6b7a;
  --line: #dbe4ec;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 6px 20px rgba(11, 61, 99, 0.08);
  --max: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--orange); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 0.5em; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.container { width: min(100% - 32px, var(--max)); margin: 0 auto; }
.section { padding: 64px 0; }
.section.alt { background: var(--steel); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head p { color: var(--muted); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); font-size: 1.1rem; }
.brand-mark { width: 38px; height: 38px; border-radius: 8px; background: var(--blue); color: #fff; display: grid; place-items: center; font-size: 1.1rem; }
.brand small { display: block; font-size: 0.68rem; font-weight: 500; color: var(--muted); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a.active { color: var(--blue); }
.nav-cta { background: var(--orange); color: #fff !important; padding: 9px 16px; border-radius: 6px; }
.nav-cta:hover { background: #c96412; color: #fff !important; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font-size: 1rem; cursor: pointer; }

/* Hero */
.hero { background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; padding: 76px 0 84px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero p { color: #d9e8f4; font-size: 1.08rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }
.hero-img { background: #fff; padding: 18px; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.hero-badges { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 28px; font-size: .9rem; color: #cfe2f1; }
.hero-badges span::before { content: "✔ "; color: #7fd1a8; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 22px; border-radius: 6px; font-weight: 700; font-size: .95rem; transition: .2s; border: 2px solid transparent; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #c96412; color: #fff; }
.btn-ghost { border-color: rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }

/* Cards & grids */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(11,61,99,.14); }
.card-img { aspect-ratio: 1/1; background: #f7f9fb; display: grid; place-items: center; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.machine-card-img img { width: 68%; height: 68%; padding: 0; }
.card-body { padding: 18px; }
.card-body h3 { font-size: 1.05rem; margin-bottom: 6px; }
.card-body p { color: var(--muted); font-size: .9rem; margin-bottom: 12px; }
.card-meta { font-size: .78rem; color: var(--blue); font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.feature-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px; }

/* Filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 32px; }
.filter-btn { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 16px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.filter-btn.active, .filter-btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

/* Breadcrumbs */
.breadcrumbs { font-size: .85rem; color: var(--muted); padding: 18px 0 0; }
.breadcrumbs a { color: var(--muted); }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-gallery { background: var(--steel); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.product-gallery img { width: 100%; border-radius: 8px; }
.product-info h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.product-info .lead { color: var(--muted); font-size: 1.05rem; }
.spec-table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .92rem; }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; vertical-align: top; }
.spec-table th { width: 38%; color: var(--navy); font-weight: 700; }
.inquiry-box { background: var(--blue-light); border-radius: var(--radius); padding: 20px; }
.inquiry-box p { margin-bottom: 12px; }

/* Content pages */
.page-hero { background: var(--steel); padding: 48px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: 8px; }
.page-hero p { color: var(--muted); max-width: 760px; }
.prose { max-width: 820px; }
.prose h2 { margin-top: 36px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
input, textarea, select {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: .95rem; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { min-height: 130px; resize: vertical; }
.contact-card { background: var(--steel); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.contact-card h3 { margin-bottom: 12px; }
.contact-line { display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }

/* FAQ */
.faq-item { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; background: #fff; }
.faq-item summary { cursor: pointer; padding: 16px 18px; font-weight: 700; color: var(--navy); }
.faq-item div { padding: 0 18px 16px; color: var(--muted); }

/* CTA band */
.cta-band { background: var(--navy); color: #fff; text-align: center; padding: 54px 0; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe2f1; }

/* Footer */
.site-footer { background: #082f4d; color: #c9d9e6; padding: 52px 0 22px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.site-footer h3, .site-footer h4 { color: #fff; }
.site-footer a { color: #c9d9e6; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 18px; text-align: center; font-size: .82rem; }

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Chips - shop by machine */
.section.slim { padding: 40px 0; }
.section-sub { color: var(--muted); margin-bottom: 20px; }
.chip-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.chip {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--navy);
  font-weight: 600; font-size: .9rem; transition: .2s;
}
.chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* Text links */
.text-link { font-weight: 700; font-size: .9rem; color: var(--blue); }
.text-link:hover { color: var(--orange); }

/* Guide cards */
.guide-card .card-body { padding: 22px; display: flex; flex-direction: column; }
.guide-card .guide-title { font-size: 1.1rem; line-height: 1.35; margin-bottom: 8px; }
.guide-card .text-link { margin-top: auto; padding-top: 10px; }

/* Article pages */
.article { max-width: 860px; margin: 0 auto; }
.article-prose { max-width: none; }
.article-prose > h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 14px 0 18px; }
.article-prose h2 { font-size: 1.35rem; margin-top: 38px; }
.article-prose h3 { font-size: 1.08rem; margin-top: 24px; }
.article-prose p, .article-prose li { line-height: 1.72; }
.article-prose .lead { font-size: 1.05rem; color: var(--ink); }
.article-prose table { margin: 22px 0; }

/* Product detail extra content */
.detail-extra { margin-top: 34px; max-width: none; }
.detail-extra h2 { font-size: 1.15rem; margin-top: 26px; }
.detail-extra h3 { font-size: 1rem; }
.detail-extra p, .detail-extra li { font-size: .95rem; line-height: 1.7; }

/* Responsive */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid, .product-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; padding: 12px 0 18px; }
  .nav.open { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 46px 0; }
  .hero { padding: 54px 0 60px; }
}
