/* ============================================================
   Yihuale Design System — Noir & Gold Atelier
   Source: 官网设计包/视觉设计规范.md v1.0
   ============================================================ */

:root {
  --yh-ink-950: #0E1116;
  --yh-ink-900: #171C23;
  --yh-ink-800: #232A33;
  --yh-gold-300: #E3C990;
  --yh-gold-500: #C6A15B;
  --yh-gold-600: #A9833F;
  --yh-ivory-50: #FAF7F1;
  --yh-ivory-100: #F2EDE2;
  --yh-stone-300: #DFD8CA;
  --yh-white: #FFFFFF;
  --yh-charcoal-900: #20262E;
  --yh-charcoal-600: #5C626B;
  --yh-muted: #8A857B;
  --yh-success: #2E7D4F;
  --yh-danger: #B3403A;
  --yh-font-display: "Playfair Display", "Noto Serif SC", "Songti SC", Georgia, serif;
  --yh-font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body.yh-theme {
  font-family: var(--yh-font-body);
  color: var(--yh-charcoal-900);
  background: var(--yh-ivory-50);
  font-size: 1rem;
  line-height: 1.7;
}

h1, h2, h3, .yh-display {
  font-family: var(--yh-font-display);
  font-weight: 600;
  line-height: 1.25;
}
h4, h5, h6 { font-family: var(--yh-font-display); }

/* ---------- Layout helpers ---------- */
.yh-container { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 768px) { .yh-container { padding: 0 20px; } }

.yh-section { padding: 96px 0; }
@media (max-width: 768px) { .yh-section { padding: 48px 0; } }

.yh-dark  { background: var(--yh-ink-950); color: #F4F1EA; }
.yh-light { background: var(--yh-ivory-50); color: var(--yh-charcoal-900); }
.yh-ivory { background: var(--yh-ivory-100); }

.yh-dark h1, .yh-dark h2, .yh-dark h3, .yh-dark .yh-display { color: #F4F1EA; }
.yh-dark p.lead, .yh-dark .yh-sub { color: #9AA0A8; }

.yh-eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--yh-gold-500);
  margin: 0 0 12px;
}
.yh-dark .yh-eyebrow { color: var(--yh-gold-300); }

.yh-h2 { font-size: clamp(2rem, 1.2rem + 2vw, 2.75rem); margin: 0 0 20px; }
.yh-lead { font-size: 1.125rem; line-height: 1.6; max-width: 72ch; color: var(--yh-charcoal-600); }
.yh-dark .yh-lead { color: #9AA0A8; }

/* ---------- Buttons ---------- */
.yh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px; border-radius: 2px;
  font-family: var(--yh-font-body); font-size: 0.9375rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
  transition: all .2s ease-out; white-space: normal; text-align: center;
}
.yh-btn-gold { background: var(--yh-gold-500); color: var(--yh-ink-950) !important; }
.yh-btn-gold:hover { background: var(--yh-gold-600); transform: translateY(-2px); }
.yh-btn-outline { background: transparent; border-color: var(--yh-gold-500); color: var(--yh-gold-500) !important; }
.yh-btn-outline:hover { background: rgba(198,161,91,.1); }
.yh-dark .yh-btn-outline { color: var(--yh-gold-300) !important; border-color: var(--yh-gold-300); }
.yh-btn-lg { height: 56px; padding: 0 36px; font-size: 1rem; }
.yh-btn-ivory { background: var(--yh-ivory-50); color: var(--yh-ink-950) !important; }
.yh-btn-ivory:hover { background: var(--yh-gold-300); }

/* ---------- Hero ---------- */
.yh-hero {
  background: linear-gradient(120deg, #0B0E13 0%, var(--yh-ink-900) 60%, #1A2028 100%);
  color: #F4F1EA; padding: 128px 0 112px; position: relative; overflow: hidden;
}
.yh-hero .yh-display {
  font-size: clamp(2.5rem, 1.4rem + 3.2vw, 4.5rem);
  line-height: 1.1; max-width: 16ch; margin: 0 0 24px;
}
.yh-hero .yh-sub { font-size: 1.125rem; color: #9AA0A8; max-width: 60ch; margin: 0 0 36px; line-height: 1.7; }
.yh-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.yh-hero img.yh-hero-img { border-radius: 4px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.yh-trust-line { margin-top: 48px; padding-top: 28px; border-top: 1px solid #2E3640; display: flex; flex-wrap: wrap; gap: 32px; }
.yh-trust-line .yh-stat { font-size: 1.125rem; font-weight: 600; color: var(--yh-gold-300); }
.yh-trust-line .yh-stat span { display: block; font-size: 0.8125rem; font-weight: 400; color: #9AA0A8; }

/* ---------- Data strip ---------- */
.yh-data-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 32px; }
.yh-data-strip .yh-num { font-family: var(--yh-font-display); font-size: clamp(2rem, 1.2rem + 2vw, 3rem); font-weight: 700; color: var(--yh-gold-500); font-feature-settings: "tnum"; }
.yh-data-strip .yh-cap { font-size: 0.875rem; color: var(--yh-charcoal-600); }
.yh-dark .yh-data-strip .yh-cap { color: #9AA0A8; }

/* ---------- Category / product cards ---------- */
.yh-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.yh-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1024px) { .yh-grid-4 { grid-template-columns: repeat(2, 1fr); } .yh-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .yh-grid-4, .yh-grid-3 { grid-template-columns: 1fr; } }

.yh-card {
  background: var(--yh-white); border: 1px solid var(--yh-stone-300); border-radius: 6px;
  overflow: hidden; box-shadow: 0 2px 10px rgba(14,17,22,.06);
  transition: transform .3s ease-out, box-shadow .3s ease-out;
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.yh-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(14,17,22,.12); }
.yh-card .yh-card-media { aspect-ratio: 4/3; background: var(--yh-ivory-100); overflow: hidden; position: relative; }
.yh-card .yh-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease-out; }
.yh-card:hover .yh-card-media img { transform: scale(1.03); }
.yh-card .yh-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.yh-card .yh-card-eyebrow { font-size: 0.6875rem; letter-spacing: .12em; text-transform: uppercase; color: var(--yh-gold-600); font-weight: 600; }
.yh-card h3 { margin: 0; font-size: 1.25rem; line-height: 1.4; }
.yh-card p { margin: 0; color: var(--yh-charcoal-600); font-size: 0.9375rem; }
.yh-card .yh-card-more { margin-top: auto; padding-top: 12px; color: var(--yh-gold-600); font-weight: 600; font-size: 0.9375rem; }

/* ---------- Trust / feature cards ---------- */
.yh-feature { display: flex; gap: 16px; align-items: flex-start; }
.yh-feature .yh-f-icon { width: 40px; height: 40px; flex: none; border: 1px solid var(--yh-gold-500); border-radius: 2px; display: flex; align-items: center; justify-content: center; color: var(--yh-gold-500); font-size: 1.25rem; }
.yh-feature h3 { margin: 0 0 4px; font-size: 1.125rem; }
.yh-feature p { margin: 0; font-size: 0.9375rem; color: var(--yh-charcoal-600); }
.yh-dark .yh-feature p { color: #9AA0A8; }

/* ---------- Certification strip ---------- */
.yh-cert-strip { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.yh-cert-item {
  border: 1px solid #2E3640; border-radius: 2px; padding: 10px 20px;
  font-size: 0.9375rem; font-weight: 600; letter-spacing: .06em; color: #F4F1EA; background: var(--yh-ink-900);
}
.yh-cert-item .yh-cert-gold { color: var(--yh-gold-300); }

/* ---------- CTA band ---------- */
.yh-cta-band {
  background: linear-gradient(135deg, var(--yh-ink-950), #141a22);
  border: 1px solid var(--yh-gold-600); border-radius: 6px;
  padding: 64px; text-align: center; color: #F4F1EA;
}
.yh-cta-band h2 { margin: 0 0 12px; font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); }
.yh-cta-band p { color: #9AA0A8; max-width: 56ch; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.yh-footer { background: var(--yh-ink-950); color: #9AA0A8; padding: 72px 0 32px; }
.yh-footer h4 { color: #F4F1EA; font-size: 1rem; margin: 0 0 16px; }
.yh-footer a { color: #9AA0A8; text-decoration: none; }
.yh-footer a:hover { color: var(--yh-gold-300); }
.yh-footer .yh-fcol { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; }
@media (max-width: 768px) { .yh-footer .yh-fcol { grid-template-columns: 1fr 1fr; } }
.yh-footer .yh-fbottom { border-top: 1px solid #232A33; margin-top: 48px; padding-top: 24px; font-size: 0.8125rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- WooCommerce overrides ---------- */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--yh-gold-500) !important; color: var(--yh-ink-950) !important;
  border-radius: 2px !important; font-weight: 600 !important;
}
.woocommerce a.button.alt, .woocommerce button.button.alt {
  background: var(--yh-ink-950) !important; color: #F4F1EA !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--yh-gold-600) !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--yh-font-display); font-size: 1.05rem; color: var(--yh-charcoal-900); }
.woocommerce div.product .product_title { font-family: var(--yh-font-display); font-size: 2rem; }
.woocommerce .price { color: var(--yh-charcoal-900) !important; font-weight: 600; font-feature-settings: "tnum"; }
.woocommerce .quantity .qty { border-radius: 2px !important; border: 1px solid var(--yh-stone-300) !important; }
.woocommerce div.product form.cart .button { border-radius: 2px; }
/* Product card hover top gold bar */
.woocommerce ul.products li.product { border: 1px solid var(--yh-stone-300); border-radius: 6px; overflow: hidden; background: #fff; transition: all .3s ease-out; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(14,17,22,.12); }
.woocommerce ul.products li.product a img { margin-bottom: 0; }

/* ---------- Forms ---------- */
.yh-form input[type=text], .yh-form input[type=email], .yh-form input[type=tel],
.yh-form textarea, .yh-form select,
.wpcf7-form input, .wpcf7-form textarea, .wpcf7-form select {
  width: 100%; height: 48px; border: 1px solid var(--yh-stone-300); border-radius: 2px;
  background: #fff; padding: 0 14px; font-family: var(--yh-font-body); font-size: 1rem;
}
.yh-form textarea, .wpcf7-form textarea { height: auto; padding: 12px 14px; }
.yh-form input:focus, .wpcf7-form input:focus, .yh-form textarea:focus, .wpcf7-form textarea:focus {
  outline: none; border-color: var(--yh-gold-500); box-shadow: 0 0 0 3px rgba(198,161,91,.18);
}
.yh-form label, .wpcf7-form label { font-size: 0.875rem; font-weight: 600; display: block; margin: 0 0 6px; }
.wpcf7-not-valid-tip { color: var(--yh-danger); font-size: 0.8125rem; }
.wpcf7 form .wpcf7-response-output { border-color: var(--yh-success); color: var(--yh-success); }

/* ---------- Misc ---------- */
.yh-quote-bar { display: flex; gap: 16px; align-items: center; background: var(--yh-ivory-100); border: 1px solid var(--yh-stone-300); border-radius: 6px; padding: 24px 32px; flex-wrap: wrap; }
.yh-rule { width: 64px; height: 2px; background: var(--yh-gold-500); border: 0; margin: 0 0 24px; }
.yh-center { text-align: center; }
.yh-mt-1 { margin-top: 16px; } .yh-mt-2 { margin-top: 32px; } .yh-mt-3 { margin-top: 48px; }
.yh-gold-text { color: var(--yh-gold-600); }
.yh-dark .yh-gold-text { color: var(--yh-gold-300); }

/* Language switcher pill */
.pll-switcher-select, .polylang_langswitcher a { font-size: 0.875rem; }

/* Mobile quote/cart bottom bar handled by theme/plugin defaults */

@media (max-width: 768px) {
  .yh-hero { padding: 80px 0 64px; }
  .yh-cta-band { padding: 40px 24px; }
}

/* Hero text color fix */
.yh-hero h1, .yh-hero h2, .yh-hero h3, .yh-hero .yh-display { color: #F4F1EA !important; }
.yh-hero .yh-sub { color: #9AA0A8 !important; }
.yh-hero .yh-eyebrow { color: var(--yh-gold-300) !important; }
