/* ==========================================================================
   Feimengsi WordPress layer
   Loaded after the original site bundle. Only new, prefixed classes are used
   so the mirrored header/footer and imported page bodies stay untouched.
   ========================================================================== */

:root {
	--fm-ink: #1c1f23;
	--fm-muted: #6b7280;
	--fm-line: #e6e8eb;
	--fm-accent: #b81c22;
	--fm-accent-dark: #8f1419;
	--fm-soft: #f6f7f9;
}

.fm-main { min-height: 60vh; }

.fm-wp-view {
	box-sizing: border-box;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 40px 24px 64px;
	font-family: Arial, "Helvetica Neue", Helvetica, "Microsoft YaHei", sans-serif;
	color: var(--fm-ink);
	line-height: 1.65;
}

.fm-wp-view *,
.fm-wp-view *::before,
.fm-wp-view *::after { box-sizing: border-box; }

.fm-wp-view a { color: var(--fm-ink); text-decoration: none; }
.fm-wp-view a:hover { color: var(--fm-accent); }
.fm-wp-view img { max-width: 100%; height: auto; display: block; }
.fm-wp-view h1, .fm-wp-view h2, .fm-wp-view h3 { line-height: 1.25; margin: 0 0 14px; }
.fm-wp-view p { margin: 0 0 14px; }

/* View header ------------------------------------------------------------ */
.fm-view-head { margin-bottom: 28px; }
.fm-view-title {
	font-size: clamp(26px, 3.4vw, 40px);
	font-weight: 700;
	letter-spacing: -.02em;
	margin: 0 0 10px;
}
.fm-view-desc { color: var(--fm-muted); font-size: 16px; max-width: 760px; margin: 0; }

/* Breadcrumbs ------------------------------------------------------------ */
.fm-breadcrumbs { margin: 0 0 18px; font-size: 13px; color: var(--fm-muted); }
.fm-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.fm-breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.fm-breadcrumbs li + li::before { content: "/"; color: #c2c6cc; }
.fm-breadcrumbs a { color: var(--fm-muted); }
.fm-breadcrumbs a:hover { color: var(--fm-accent); }
.fm-breadcrumbs [aria-current="page"] { color: var(--fm-ink); }

/* Category navigation ---------------------------------------------------- */
.fm-category-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0 0 32px;
	padding-bottom: 22px;
	border-bottom: 1px solid var(--fm-line);
}
.fm-category-nav a {
	display: inline-block;
	padding: 8px 16px;
	border: 1px solid var(--fm-line);
	border-radius: 999px;
	font-size: 14px;
	color: var(--fm-muted);
	background: #fff;
	transition: all .18s ease;
}
.fm-category-nav a:hover,
.fm-category-nav a.is-active {
	border-color: var(--fm-accent);
	background: var(--fm-accent);
	color: #fff;
}

/* Cards / grids ---------------------------------------------------------- */
.fm-product-grid,
.fm-post-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.fm-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--fm-line);
	border-radius: 10px;
	overflow: hidden;
	transition: box-shadow .2s ease, transform .2s ease;
}
.fm-card:hover { box-shadow: 0 12px 32px rgba(17, 24, 39, .10); transform: translateY(-2px); }
.fm-card-media {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--fm-soft);
	overflow: hidden;
}
.fm-card-media img { width: 100%; height: 100%; object-fit: cover; }
.fm-card-placeholder { display: block; width: 100%; height: 100%; background: var(--fm-soft); }
.fm-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.fm-card-cat {
	display: inline-block;
	font-size: 11px;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--fm-accent);
	margin-bottom: 8px;
}
.fm-card-title { font-size: 16px; font-weight: 700; line-height: 1.45; margin: 0 0 10px; }
.fm-card-title a { color: var(--fm-ink); }
.fm-card-title a:hover { color: var(--fm-accent); }
.fm-card-excerpt { font-size: 13px; color: var(--fm-muted); margin: 0 0 16px; flex: 1; }
.fm-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--fm-line); padding-top: 14px; }
.fm-card-link { font-size: 13px; font-weight: 600; }
.fm-card-inquiry {
	font-size: 12px;
	font-weight: 700;
	color: #fff;
	background: var(--fm-accent);
	padding: 7px 14px;
	border-radius: 4px;
}
.fm-card-inquiry:hover { background: var(--fm-accent-dark); color: #fff; }

/* Inquiry form ----------------------------------------------------------- */
.fm-inquiry-wrap {
	box-sizing: border-box;
	max-width: 860px;
	margin: 32px auto;
	padding: 32px;
	background: var(--fm-soft);
	border: 1px solid var(--fm-line);
	border-radius: 12px;
	font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
	color: var(--fm-ink);
}
.fm-inquiry-wrap *, .fm-inquiry-wrap *::before, .fm-inquiry-wrap *::after { box-sizing: border-box; }
.fm-inquiry-title { font-size: 26px; font-weight: 700; margin: 0 0 8px; }
.fm-inquiry-intro { color: var(--fm-muted); font-size: 14px; margin: 0 0 22px; }
.fm-inquiry-intro a { color: var(--fm-accent); }
.fm-inquiry-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.fm-form-row { display: flex; flex-direction: column; gap: 6px; }
.fm-form-row-full,
.fm-form-consent { grid-column: 1 / -1; }
.fm-inquiry-form label { font-size: 13px; font-weight: 600; }
.fm-inquiry-form label span { color: var(--fm-accent); }
.fm-inquiry-form input[type="text"],
.fm-inquiry-form input[type="email"],
.fm-inquiry-form input[type="tel"],
.fm-inquiry-form textarea {
	width: 100%;
	padding: 11px 13px;
	border: 1px solid #d6d9de;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: var(--fm-ink);
	font-family: inherit;
}
.fm-inquiry-form input:focus,
.fm-inquiry-form textarea:focus { outline: 2px solid rgba(184, 28, 34, .25); border-color: var(--fm-accent); }
.fm-inquiry-form textarea { resize: vertical; min-height: 110px; }
.fm-form-consent label { display: flex; align-items: center; gap: 8px; font-weight: 400; color: var(--fm-muted); }
.fm-hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.fm-submit-btn {
	display: inline-block;
	grid-column: 1 / -1;
	justify-self: start;
	padding: 12px 30px;
	border: 0;
	border-radius: 6px;
	background: var(--fm-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	text-decoration: none;
}
.fm-submit-btn:hover { background: var(--fm-accent-dark); color: #fff; }
.fm-submit-btn-ghost { background: transparent; border: 1px solid var(--fm-line); color: var(--fm-ink); }
.fm-notice { padding: 12px 16px; border-radius: 6px; margin: 0 0 18px; font-size: 14px; }
.fm-notice-success { background: #e8f6ec; color: #146c2e; border: 1px solid #b9e2c6; }
.fm-notice-error { background: #fdecec; color: #9d1c1c; border: 1px solid #f3c2c2; }

/* Fluent Forms wrapper: keep plugin styling but align widths */
.fm-inquiry-wrap .ff_form_wrap,
.fm-inquiry-wrap .fluentform { max-width: 100%; }
.fm-inquiry-wrap .ff-btn-submit { background: var(--fm-accent) !important; }

/* Pagination ------------------------------------------------------------- */
.fm-pagination { margin-top: 40px; display: flex; justify-content: center; }
.fm-pagination ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; flex-wrap: wrap; }
.fm-pagination li a,
.fm-pagination li span { display: block; padding: 8px 14px; border: 1px solid var(--fm-line); border-radius: 6px; font-size: 14px; }
.fm-pagination li .current { background: var(--fm-accent); color: #fff; border-color: var(--fm-accent); }

/* CTA / empty state ------------------------------------------------------ */
.fm-archive-cta {
	margin-top: 56px;
	padding: 36px;
	border-radius: 12px;
	background: #1c1f23;
	color: #fff;
	text-align: center;
}
.fm-archive-cta h2 { margin: 0 0 8px; font-size: 24px; }
.fm-archive-cta p { color: #c9ced6; margin: 0 0 20px; }
.fm-archive-cta .fm-submit-btn { justify-self: auto; }
.fm-empty-state { text-align: center; padding-top: 80px; padding-bottom: 90px; }
.fm-empty-state h2 { font-size: 24px; }
.fm-empty-state p { color: var(--fm-muted); }
.fm-empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Related ---------------------------------------------------------------- */
.fm-related h2 { font-size: 24px; margin: 0 0 22px; }
.fm-related { border-top: 1px solid var(--fm-line); margin-top: 24px; padding-top: 40px; }

/* Search ----------------------------------------------------------------- */
.fm-search-form { display: flex; gap: 10px; max-width: 520px; margin-top: 20px; }
.fm-search-form input { flex: 1; padding: 11px 14px; border: 1px solid #d6d9de; border-radius: 6px; font-size: 14px; }
.fm-search-form button { padding: 11px 22px; border: 0; border-radius: 6px; background: var(--fm-accent); color: #fff; font-weight: 700; cursor: pointer; }

.fm-footer-note { max-width: 1240px; margin: 0 auto; padding: 0 24px 20px; font-size: 13px; color: var(--fm-muted); text-align: center; }

/* Imported content safety ------------------------------------------------ */
.fm-main img { max-width: 100%; height: auto; }
.fm-main .fm-wp-view img[data-lazy], .fm-main img[lazy] { min-height: 1px; }

/* Responsive ------------------------------------------------------------- */
@media (max-width: 1024px) {
	.fm-product-grid, .fm-post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.fm-wp-view { padding: 28px 16px 44px; }
	.fm-product-grid, .fm-post-grid { grid-template-columns: 1fr; }
	.fm-inquiry-wrap { padding: 22px 18px; margin: 24px 16px; }
	.fm-inquiry-form { grid-template-columns: 1fr; }
	.fm-form-row-full, .fm-form-consent { grid-column: auto; }
	.fm-search-form { flex-direction: column; }
}
