/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1e293b; background: #fff; line-height: 1.6; }
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ── Typography ────────────────────────────────────────────── */
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin-bottom: .5rem; }
h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: .5rem; }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: .4rem; }
p  { margin-bottom: 1rem; }
.text-muted { color: #64748b; font-size: .875rem; }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 720px; }
main { min-height: 60vh; }

/* ── Header ────────────────────────────────────────────────── */
.site-header { background: #fff; border-bottom: 1px solid #e2e8f0; position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.site-logo { font-size: 1.2rem; font-weight: 800; color: #1e293b; text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 20px; font-size: .875rem; }
.site-nav a { color: #374151; }
.site-nav a:hover { color: #2563eb; text-decoration: none; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%); color: #fff; padding: 80px 0; text-align: center; }
.hero h1 { font-size: 2.6rem; max-width: 700px; margin: 0 auto .75rem; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.8); max-width: 560px; margin: 0 auto 28px; }
.hero-search { display: flex; gap: 8px; max-width: 540px; margin: 0 auto 16px; }
.hero-search input { flex: 1; padding: 13px 16px; border: none; border-radius: 8px; font-size: 1rem; }
.hero-search input:focus { outline: none; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.btn--outline { border: 2px solid rgba(255,255,255,.6); color: #fff; padding: 10px 24px; border-radius: 8px; font-size: .875rem; }
.btn--outline:hover { background: rgba(255,255,255,.15); text-decoration: none; }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: 60px 0; }
.section--gray { background: #f8fafc; }
.section--cta { background: #1e3a5f; color: #fff; text-align: center; padding: 60px 0; }
.section--cta h2 { color: #fff; margin-bottom: .5rem; }
.section--cta p { color: rgba(255,255,255,.75); margin-bottom: 24px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { margin-bottom: 0; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; border-radius: 8px; font-size: .875rem; font-weight: 600; cursor: pointer; border: none; transition: all .15s; text-decoration: none !important; }
.btn--primary { background: #2563eb; color: #fff; }
.btn--primary:hover { background: #1d4ed8; }
.btn--secondary { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; }
.btn--secondary:hover { background: #e2e8f0; }
.btn--sm { padding: 6px 14px; font-size: .8125rem; }

/* ── Badges ────────────────────────────────────────────────── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: .75rem; font-weight: 500; }
.badge--green { background: #dcfce7; color: #16a34a; }
.badge--blue  { background: #dbeafe; color: #1d4ed8; }
.badge--yellow{ background: #fef9c3; color: #854d0e; }
.badge--gray  { background: #f1f5f9; color: #475569; }
.badge--red   { background: #fee2e2; color: #dc2626; }

/* ── Category Grid ─────────────────────────────────────────── */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cat-card { display: block; padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; text-decoration: none !important; transition: box-shadow .15s, border-color .15s; }
.cat-card:hover { border-color: #93c5fd; box-shadow: 0 4px 16px rgba(37,99,235,.1); }
.cat-card__name { font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.cat-card__count { font-size: .8125rem; color: #64748b; }

/* ── Machine Grid ──────────────────────────────────────────── */
.machine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.machine-card { display: block; padding: 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; text-decoration: none !important; transition: box-shadow .15s, border-color .15s; }
.machine-card:hover { border-color: #93c5fd; box-shadow: 0 4px 16px rgba(37,99,235,.1); }
.machine-card__brand { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; margin-bottom: 4px; }
.machine-card__name { font-size: 1rem; font-weight: 600; color: #1e293b; margin-bottom: 6px; }
.machine-card__desc { font-size: .8125rem; color: #64748b; margin-bottom: 10px; }
.machine-card__footer { display: flex; align-items: center; justify-content: space-between; font-size: .8125rem; }
.price { font-weight: 700; color: #16a34a; }
.price--request { font-weight: 600; color: #64748b; }
.score { color: #ca8a04; font-weight: 600; }

/* ── Supplier Grid ─────────────────────────────────────────── */
.supplier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.supplier-card { display: block; padding: 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; text-decoration: none !important; transition: box-shadow .15s; }
.supplier-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.supplier-card__name { font-weight: 600; color: #1e293b; margin-bottom: 4px; }
.supplier-card__meta { font-size: .8125rem; color: #64748b; }

/* ── Guides Grid ───────────────────────────────────────────── */
.guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-card { display: block; padding: 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; text-decoration: none !important; transition: box-shadow .15s; }
.guide-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.guide-card__category { font-size: .75rem; text-transform: uppercase; color: #2563eb; font-weight: 600; margin-bottom: 6px; }
.guide-card__title { font-weight: 600; color: #1e293b; margin-bottom: 6px; }
.guide-card__excerpt { font-size: .8125rem; color: #64748b; }
.guide-card__date { font-size: .75rem; color: #94a3b8; margin-top: 10px; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb { font-size: .8125rem; color: #64748b; padding: 16px 0; }
.breadcrumb a { color: #64748b; }
.breadcrumb a:hover { color: #2563eb; }

/* ── Page Header ───────────────────────────────────────────── */
.page-header { padding: 24px 0 20px; border-bottom: 1px solid #f1f5f9; margin-bottom: 24px; }

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; flex-wrap: wrap; }
.filter-bar select { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 7px; font-size: .875rem; }
.filter-brands { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.brand-pill { padding: 5px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 99px; font-size: .8125rem; color: #374151; }
.brand-pill:hover { background: #dbeafe; border-color: #93c5fd; text-decoration: none; }

/* ── Machine Detail ────────────────────────────────────────── */
.machine-detail { display: grid; grid-template-columns: 1fr 320px; gap: 32px; margin: 24px 0; }
.machine-detail__main {}
.machine-detail__sidebar {}
.machine-images { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.machine-images img { width: 220px; height: 165px; object-fit: cover; border-radius: 8px; border: 1px solid #e2e8f0; }
.machine-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 20px; }
.score-section { background: #f8fafc; border-radius: 10px; padding: 16px; margin: 20px 0; }
.score-overall { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.score-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-size: .875rem; }
.score-row span:first-child { width: 110px; color: #64748b; }
.score-bar { flex: 1; height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.score-fill { height: 100%; background: linear-gradient(90deg, #22c55e, #2563eb); border-radius: 99px; }
.score-label { font-weight: 600; font-size: .8125rem; min-width: 28px; }
.machine-body { margin: 20px 0; line-height: 1.8; }
.spec-group { margin: 20px 0; }
.spec-group h3 { font-size: 1rem; color: #475569; text-transform: uppercase; letter-spacing: .04em; font-size: .8125rem; margin-bottom: 10px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.spec-table th, .spec-table td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; }
.spec-table th { width: 40%; color: #64748b; font-weight: 500; background: #f8fafc; }
.rfq-cta { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.rfq-cta h3 { margin-bottom: 8px; }
.rfq-cta p { font-size: .875rem; color: #475569; margin-bottom: 16px; }
.supplier-mini { display: block; padding: 10px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 8px; text-decoration: none !important; }
.supplier-mini:hover { border-color: #93c5fd; }
.supplier-mini__name { font-weight: 600; color: #1e293b; font-size: .875rem; }
.supplier-mini__meta { font-size: .75rem; color: #64748b; }
.docs-section { margin: 24px 0; }
.doc-link { display: inline-block; padding: 8px 14px; border: 1px solid #e2e8f0; border-radius: 7px; margin: 4px 4px 4px 0; font-size: .8125rem; color: #374151; }
.doc-link:hover { border-color: #93c5fd; text-decoration: none; }
.related-section { margin: 40px 0; }

/* ── Supplier Detail ───────────────────────────────────────── */
.supplier-detail { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin: 24px 0; }
.supplier-bio { margin: 16px 0; }
.sidebar-section { background: #f8fafc; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.sidebar-section h4 { font-size: .8125rem; text-transform: uppercase; color: #94a3b8; margin-bottom: 8px; }
.tag { display: inline-block; padding: 3px 10px; background: #e2e8f0; border-radius: 99px; font-size: .75rem; margin: 2px; }
.review-card { padding: 14px; border: 1px solid #e2e8f0; border-radius: 8px; margin-bottom: 10px; }
.review-meta { font-size: .8125rem; color: #64748b; margin-bottom: 4px; }

/* ── Article ───────────────────────────────────────────────── */
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 40px; margin: 24px 0; }
.article-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; }
.article-lead { font-size: 1.1rem; color: #475569; margin-bottom: 24px; }
.article-body { line-height: 1.8; }
.article-body h2 { margin: 28px 0 12px; }
.article-body h3 { margin: 20px 0 10px; }
.article-sidebar {}

/* ── Compare Table ─────────────────────────────────────────── */
.compare-table-wrap { overflow-x: auto; margin: 24px 0; }
.compare-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.compare-table th { background: #f8fafc; padding: 12px 16px; text-align: left; border-bottom: 2px solid #e2e8f0; }
.compare-table td { padding: 10px 16px; border-bottom: 1px solid #f1f5f9; }

/* ── Rankings ──────────────────────────────────────────────── */
.ranking-list { list-style: none; margin: 24px 0; }
.ranking-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border: 1px solid #e2e8f0; border-radius: 10px; margin-bottom: 10px; }
.ranking-pos { width: 36px; height: 36px; background: #2563eb; color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.ranking-name { font-weight: 600; font-size: 1rem; color: #1e293b; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 28px; margin-top: 20px; }
.form-group { margin-bottom: 16px; }
label { display: block; font-size: .875rem; font-weight: 500; color: #374151; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=password], input[type=tel], select, textarea {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: .9375rem; color: #1e293b; background: #fff; transition: border .15s; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: #dc2626; font-size: .8125rem; margin-top: 4px; }
.form-hint { font-size: .8125rem; color: #94a3b8; margin-top: 4px; }
.rfq-machine-banner { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: .9rem; }

/* ── Alerts & Flash ────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .875rem; }
.alert--success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert--error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert--info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; padding: 24px 0; flex-wrap: wrap; }
.pagination a { padding: 7px 12px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: .8125rem; color: #374151; }
.pagination a:hover, .pagination a.pagination__item--active { background: #2563eb; color: #fff; border-color: #2563eb; text-decoration: none; }

/* ── Brand Grid ────────────────────────────────────────────── */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.brand-card { display: block; padding: 16px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; text-align: center; text-decoration: none !important; }
.brand-card:hover { border-color: #93c5fd; }
.brand-card img { max-height: 48px; width: auto; margin: 0 auto 8px; }
.brand-card__name { font-weight: 600; font-size: .875rem; color: #1e293b; }
.brand-card__count { font-size: .75rem; color: #64748b; }

/* ── Stat Grid (public) ────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; }
.stat-card__label { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin-bottom: 6px; }
.stat-card__value { font-size: 2rem; font-weight: 800; color: #1e293b; }

/* ── Search Form ───────────────────────────────────────────── */
.search-form { display: flex; gap: 8px; margin: 20px 0 32px; }
.search-form input { flex: 1; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px; color: #94a3b8; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: #0f172a; color: #94a3b8; padding: 48px 0 24px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-grid strong { color: #f8fafc; display: block; margin-bottom: 8px; }
.footer-grid p { font-size: .875rem; color: #64748b; }
.footer-grid h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: #475569; margin-bottom: 12px; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 6px; }
.footer-grid ul a { color: #64748b; font-size: .875rem; }
.footer-grid ul a:hover { color: #f8fafc; text-decoration: none; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 20px; font-size: .8125rem; color: #475569; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    h1 { font-size: 1.6rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero-search { flex-direction: column; }
    .machine-detail, .supplier-detail, .article-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .site-nav { gap: 12px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Country / Category Switcher Bar ───────────────────────── */
.country-switcher-bar{background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:14px 0}
.switcher-wrap{display:flex;flex-direction:column;gap:12px}
.switcher-group{display:flex;align-items:flex-start;gap:12px}
.switcher-group label{font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#64748b;white-space:nowrap;padding-top:6px;min-width:70px}
.switcher-pills{display:flex;flex-wrap:wrap;gap:6px}
.pill{padding:4px 12px;border-radius:99px;font-size:.8125rem;border:1px solid #e2e8f0;background:#fff;color:#374151;text-decoration:none!important;transition:all .15s;white-space:nowrap}
.pill:hover{border-color:#93c5fd;background:#eff6ff;color:#2563eb}
.pill--active{background:#2563eb;color:#fff!important;border-color:#2563eb}
@media(max-width:768px){.switcher-group{flex-direction:column;gap:6px}.switcher-group label{min-width:auto}}

/* ── Country Selector Dropdown ──────────────────────────────── */
.country-selector-wrap{position:relative;display:inline-block}
.country-selector-btn{cursor:pointer}
.country-dropdown{display:none;position:absolute;top:calc(100% + 6px);right:0;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 8px 32px rgba(0,0,0,.12);min-width:200px;max-height:360px;overflow-y:auto;z-index:999;padding:6px 0}
.country-dropdown.open{display:block}
.country-dropdown__item{display:block;padding:8px 16px;font-size:.875rem;color:#374151;text-decoration:none!important;transition:background .1s}
.country-dropdown__item:hover{background:#eff6ff;color:#2563eb}

/* ── Header nav dropdowns ──────────────────────────────────── */
.header-inner{display:flex;align-items:center;justify-content:space-between}
.site-nav{display:flex;align-items:center;gap:18px}
.nav-link{color:#374151;text-decoration:none;font-size:.9rem;background:none;border:none;cursor:pointer;font-family:inherit;padding:0}
.nav-link:hover{color:#2563eb}
.nav-dropdown-wrap{position:relative;display:inline-block}
.nav-dropdown-btn{display:inline-flex;align-items:center}
.nav-dropdown{display:none;position:absolute;top:calc(100% + 10px);left:0;background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 10px 40px rgba(0,0,0,.12);min-width:220px;max-height:420px;overflow-y:auto;z-index:9999;padding:6px 0}
.nav-dropdown--wide{min-width:560px;display:none;column-count:3;column-gap:0;padding:10px 0}
.nav-dropdown.open{display:block}
.nav-dropdown__item{display:block;padding:7px 18px;font-size:.85rem;color:#374151;text-decoration:none;break-inside:avoid}
.nav-dropdown__item:hover{background:#eff6ff;color:#2563eb}
@media(max-width:768px){.nav-dropdown--wide{min-width:240px;column-count:1}.site-nav{gap:10px;flex-wrap:wrap}}
