/*
Theme Name: Yimugifts B2B Wooden Gifts
Theme URI: https://yimugifts.com/
Author: Yimugifts Factory Team
Description: 1:1 faithful implementation of the Wooden Gifts B2B Platform (Atelier Precision) Stitch design system for Cao County Qingtan Muyu Crafts Co., Ltd.
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: qingtan-muyu
*/

:root {
  --qm-canvas: #F8F9FA;
  --qm-surface: #FFFFFF;
  --qm-subtle: #F1F3F7;
  --qm-birch: #EAE4D9;
  --qm-walnut: #43281C;
  --qm-walnut-mid: #5C3D2E;
  --qm-oak: #946C43;
  --qm-olive: #336239;
  --qm-olive-tint: #EEF4EE;
  --qm-ink: #0F172A;
  --qm-ink-muted: #64748B;
  --qm-espresso: #201815;
  --qm-hairline: #E2E8F0;
  --qm-font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --qm-font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; }
body { margin: 0; padding: 0; overscroll-behavior: none; }
details summary::-webkit-details-marker { display: none; }
.qm-no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.qm-no-scrollbar::-webkit-scrollbar { display: none; }

/* Eye-catching breathing online indicator dot */
@keyframes qm-online-breathe {
  0%, 100% { transform: scale(1); opacity: 0.85; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75); }
  50% { transform: scale(1.18); opacity: 1; box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
}
@keyframes qm-online-ripple {
  0% { transform: scale(0.95); opacity: 0.75; }
  75%, 100% { transform: scale(2.15); opacity: 0; }
}
.qm-online-dot-wrap {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.qm-online-dot-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background-color: #10B981;
  animation: qm-online-ripple 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.qm-online-dot-core {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 9999px;
  background-color: #10B981;
  border: 2.5px solid #FFFFFF;
  animation: qm-online-breathe 2s ease-in-out infinite;
}

/* Form status feedback */
.qm-form-status { margin-top: 10px; padding: 12px 16px; border-radius: 8px; font-size: 0.9rem; display: none; }
.qm-form-status.is-success { display: block; background: #EDF6EE; border: 1px solid #B7D8BC; color: #1F4D29; }
.qm-form-status.is-error { display: block; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }

/* Subpage utility layout helpers (for WordPress archive/single/service templates) */
.qm-container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 28px; }
.qm-section { padding: 64px 0; }
.qm-bg-white { background: #FFFFFF; }
.qm-bg-subtle { background: rgba(241, 243, 247, 0.72); border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; }
.qm-bg-slate { background: rgba(241, 243, 247, 0.72); border-top: 1px solid #E2E8F0; border-bottom: 1px solid #E2E8F0; }
.qm-bg-espresso { background: #201815; color: #FFFFFF; }
.qm-muted { color: #64748B; }
.qm-small { font-size: 0.875rem; }
.qm-italic-oak { font-style: italic; color: #43281C; }
.qm-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #946C43; margin-bottom: 0.65rem; }
.qm-eyebrow::before { content: "•"; color: #946C43; font-size: 14px; }
.qm-grid { display: grid; gap: 22px; }
.qm-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qm-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qm-split-even { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.qm-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.qm-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.qm-hero-visual { border-radius: 16px; overflow: hidden; border: 1px solid #E2E8F0; box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08); background: #FFFFFF; }
.qm-hero-visual-img { aspect-ratio: 4 / 3; overflow: hidden; }
.qm-hero-visual-img img { width: 100%; height: 100%; object-fit: cover; }
.qm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; font-size: 0.9rem; font-weight: 600; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; }
.qm-btn-primary { background: #43281C; color: #FFFFFF; }
.qm-btn-primary:hover { background: #0F172A; color: #FFFFFF; }
.qm-btn-secondary { background: #FFFFFF; color: #0F172A; border-color: #CBD5E1; }
.qm-btn-secondary:hover { border-color: #43281C; color: #43281C; }
.qm-btn-whatsapp { background: #336239; color: #FFFFFF; }
.qm-btn-whatsapp:hover { background: #234930; color: #FFFFFF; }
.qm-btn-sm { padding: 8px 14px; font-size: 0.84rem; }
.qm-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; overflow: hidden; }
.qm-cat-card { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.qm-cat-thumb { display: block; height: 176px; border-radius: 8px; overflow: hidden; margin-bottom: 14px; background: #F8FAFC; }
.qm-cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qm-cat-title { font-size: 1.05rem; font-weight: 600; color: #0F172A; margin: 0 0 10px; }
.qm-cat-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid #F1F5F9; font-size: 12px; }
.qm-cat-meta { color: #64748B; }
.qm-cat-cta { font-weight: 600; color: #43281C; }
.qm-quick-facts { background: #FFFFFF; border: 1px solid #E2E8F0; border-left: 4px solid #43281C; border-radius: 10px; padding: 20px 24px; margin: 24px 0; }
.qm-quick-facts h2, .qm-quick-facts h3 { font-size: 1rem; font-weight: 700; margin: 0 0 12px; }
.qm-quick-facts dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 20px; margin: 0; }
.qm-quick-facts dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: #946C43; font-weight: 700; }
.qm-quick-facts dd { margin: 2px 0 0; font-size: 0.92rem; color: #0F172A; font-weight: 500; }
.qm-table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid #E2E8F0; border-radius: 10px; background: #FFFFFF; }
.qm-table, .qm-editorial table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.qm-table th, .qm-editorial th { background: #F8FAFC; color: #0F172A; font-weight: 600; text-align: left; padding: 12px 16px; border-bottom: 1px solid #E2E8F0; }
.qm-table td, .qm-editorial td { padding: 12px 16px; border-bottom: 1px solid #E2E8F0; color: #334155; vertical-align: top; }
.qm-breadcrumbs { font-size: 0.83rem; color: #64748B; padding: 18px 0 0; }
.qm-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0; }
.qm-breadcrumbs li::after { content: "/"; margin-left: 8px; color: #CBD5E1; }
.qm-breadcrumbs li:last-child::after { content: ""; margin: 0; }
.qm-tag-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.qm-tag { background: #F5F2EA; color: #43281C; font-size: 0.8rem; font-weight: 600; padding: 6px 11px; border-radius: 6px; }
.qm-inquiry-split { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 40px; align-items: start; }
.qm-dark-faq-list { display: grid; gap: 10px; margin-top: 20px; }
.qm-dark-faq { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 16px 20px; }
.qm-dark-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: #FFFFFF; font-weight: 600; font-size: 0.94rem; }
.qm-dark-faq-num { color: #FDE68A; font-size: 12px; margin-right: 10px; }
.qm-dark-faq p { margin: 10px 0 0; color: #D6D3D1; font-size: 0.88rem; }
.qm-faq-list { display: grid; gap: 12px; }
.qm-faq-item { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; padding: 18px 22px; }
.qm-faq-item summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; color: #0F172A; }
.qm-faq-item p { margin: 12px 0 0; color: #64748B; font-size: 0.93rem; }
.qm-media-card { border-radius: 14px; overflow: hidden; border: 1px solid #E2E8F0; background: #141210; }
.qm-media-card video { width: 100%; height: 280px; object-fit: cover; }
.qm-media-overlay-bar { display: flex; justify-content: space-between; padding: 10px 14px; background: #201815; color: #FFFFFF; font-size: 12px; }
.qm-editorial h2 { font-family: var(--qm-font-serif); font-size: 1.85rem; margin: 2rem 0 0.75rem; color: #0F172A; }
.qm-editorial p { margin-bottom: 1.05rem; color: #334155; line-height: 1.75; }
.qm-editorial ul, .qm-editorial ol { margin-bottom: 1.25rem; padding-left: 1.4rem; color: #334155; }
.qm-editorial a { color: #43281C; text-decoration: underline; text-underline-offset: 3px; }
.qm-summary-box { background: #FFFFFF; border: 1px solid #E2E8F0; border-left: 4px solid #336239; border-radius: 10px; padding: 20px 24px; margin: 24px 0; }

@media (max-width: 1024px) {
  .qm-hero-grid, .qm-split-even, .qm-inquiry-split { grid-template-columns: 1fr; }
  .qm-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .qm-grid-2, .qm-grid-3, .qm-grid-4 { grid-template-columns: 1fr; }
}

/* Smooth hide-on-scroll-down / expand-on-scroll-up top header & catalog filter bar */
#qm-site-header,
#qm-catalog-subbar {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
  will-change: transform;
}
html.qm-chrome-hidden #qm-site-header {
  transform: translateY(-105%);
}
html.qm-chrome-hidden #qm-catalog-subbar {
  transform: translateY(calc(-100% - 124px));
  opacity: 0;
  pointer-events: none;
}
