/*
Theme Name: FilterPartFinder
Description: Theme for filterpartfinder.com. Requires the FilterPartFinder Core plugin.
Version: 0.2.6
Requires at least: 6.4
Requires PHP: 8.1
Author: Yavuz Yasin Çetinkaya
Text Domain: fpf-theme
*/

:root {
	--bg: #F7F8F6;
	--surface: #FFFFFF;
	--ink: #111827;
	--ink-2: #374151;
	--muted: #4B5563;
	--line: #E5E7EB;
	--line-2: #D1D5DB;
	--soft: #EEF2F0;
	--accent: #0F766E;
	--accent-dark: #0B5A54;
	--accent-soft: #E6F4F1;
	--warn-soft: #FEF3C7;
	--warn-ink: #78350F;
	--radius: 6px;
	--max: 1160px;
	--display: 'IBM Plex Sans', system-ui, sans-serif;
	--mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
	--body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--display); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(28px, 4vw, 38px); }
h2 { font-size: 24px; }
h3 { font-size: 17px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 14px; background: var(--surface); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--ink); text-decoration: none; }
.logo span { color: var(--accent); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; }
.main-nav a { color: var(--ink-2); text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item > a { color: var(--accent); }
.site-header .fpf-finder { margin-left: auto; flex: 1 1 260px; max-width: 380px; }

/* Finder */
.fpf-finder { position: relative; display: flex; gap: 8px; }
.fpf-finder input[type=search] { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 8px; font: inherit; font-size: 15px; background: var(--surface); }
.fpf-finder button { height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fpf-finder button:hover { background: var(--accent-dark); }
.fpf-finder__results { position: absolute; z-index: 30; top: 50px; left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(17,24,39,.12); }
.fpf-finder__results a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.fpf-finder__results li.is-active a, .fpf-finder__results a:hover { background: var(--accent-soft); }
.fpf-finder__title { font-weight: 600; font-size: 15px; }
.fpf-finder__meta, .fpf-finder__empty { font-size: 13px; color: var(--muted); }
.fpf-finder__empty { padding: 8px 10px; }

/* Layout */
.site-main { padding: 28px 0 64px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section { margin-top: 40px; }
.section > p.lead { margin: -4px 0 18px; color: var(--muted); font-size: 14px; }
.two-col { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 40px; }
.two-col > .main { flex: 999 1 520px; min-width: 0; }
.two-col > .side { flex: 1 1 300px; }

/* Hero (device / filter) */
.hero { display: flex; flex-wrap: wrap; gap: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.hero__img { flex: 0 0 220px; height: 220px; background: var(--soft); border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; overflow: hidden; }
.hero__img img { width: 100%; height: 100%; object-fit: contain; }
.hero__body { flex: 999 1 420px; min-width: 0; }
.hero__body > p { color: var(--muted); max-width: 640px; margin: 0 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.chip { background: #F3F4F6; color: var(--ink-2); padding: 4px 10px; border-radius: 99px; text-decoration: none; }
.chip--accent { background: var(--accent-soft); color: var(--accent-dark); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 0; }
.facts div { background: var(--bg); border-radius: 10px; padding: 12px; }
.facts dt { font-size: 12px; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-weight: 700; }

/* Cards */
.fpf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.fpf-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.fpf-card__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fpf-card__type { margin-left: auto; font-size: 12px; color: var(--muted); }
.fpf-badge { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.fpf-badge--oem { background: var(--accent-soft); color: var(--accent-dark); }
.fpf-badge--alt { background: var(--warn-soft); color: var(--warn-ink); }
.fpf-verified { font-size: 12px; color: var(--accent-dark); font-weight: 600; }
.fpf-card__img { height: 140px; background: var(--soft); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; text-decoration: none; overflow: hidden; }
.fpf-card__img img { max-height: 100%; width: auto; object-fit: contain; }
.fpf-card__title { margin: 0; font-size: 17px; }
.fpf-card__title a { color: var(--ink); text-decoration: none; }
.fpf-card__title a:hover { color: var(--accent); }
.fpf-card__meta { margin: 0; font-size: 13px; color: var(--muted); }
.fpf-card__meta b { color: var(--ink); }
.fpf-btn { display: block; margin-top: auto; text-align: center; padding: 12px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; }
.fpf-btn:hover { background: var(--accent-dark); color: #fff; }
.fpf-btn--ghost { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.fpf-btn--ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* Table */
.fpf-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin: 1.5em 0; }
.fpf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fpf-table caption { text-align: left; padding: 14px 16px 0; font-weight: 600; }
.fpf-table th, .fpf-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.fpf-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fpf-table tbody tr:last-child > * { border-bottom: 0; }

/* Steps, FAQ, lists */
.steps { margin: 0; padding-left: 22px; color: var(--ink-2); line-height: 1.8; }
.faq h3 { font-size: 16px; margin: 18px 0 4px; font-family: var(--body); }
.faq p { margin: 0; color: var(--muted); }
.device-list, .fpf-device-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.device-list a, .fpf-device-list a { display: block; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.device-list a:hover, .fpf-device-list a:hover { border-color: var(--accent); color: var(--accent); }
.device-list small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.brand-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.brand-pills a { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 14px; }
.brand-pills a:hover, .brand-pills .is-current a { border-color: var(--accent); color: var(--accent); }

/* Dark aside */
.aside-dark { background: var(--ink); color: #F9FAFB; border-radius: var(--radius); padding: 24px; }
.aside-dark h2 { font-size: 20px; }
.aside-dark p { color: #D1D5DB; font-size: 14px; }

/* Home */
.home-hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 56px 0 48px; }
.home-hero h1 { font-size: clamp(30px, 5vw, 46px); max-width: 760px; }
.home-hero p { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0 0 24px; }
.home-hero .fpf-finder { max-width: 620px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.cat-grid a { display: block; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.cat-grid a:hover { border-color: var(--accent); }
.cat-grid strong { display: block; font-family: var(--display); font-size: 19px; }
.cat-grid span { font-size: 14px; color: var(--muted); }

/* Guides / posts */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post-card a { color: var(--ink); text-decoration: none; }
.post-card__body { padding: 18px 20px 20px; }
.post-card__body h2, .post-card__body h3 { font-size: 18px; margin: 0 0 6px; }
.post-card__body p { margin: 0; font-size: 14px; color: var(--muted); }
.entry { max-width: 760px; }
.entry-content { font-size: 17px; line-height: 1.75; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content img { border-radius: 10px; }
.entry-meta { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.disclosure { font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; margin-bottom: 24px; }
.fpf-guide-block { margin-top: 40px; }
.pagination { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--surface); text-decoration: none; color: var(--ink-2); }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--muted); }

@media (max-width: 640px) {
	.site-header .fpf-finder { max-width: none; flex-basis: 100%; margin-left: 0; }
	.hero { padding: 20px; }
	.hero__img { flex-basis: 100%; height: 180px; }
}

.entry-hero { margin: 0 0 28px; }
.entry-hero img { width: 100%; height: auto; border-radius: 14px; }


/* ==========================================================
   v0.2 — parts-catalog look: no pills, flat stamps, spec sheet
   ========================================================== */
h1, h2, h3 { letter-spacing: -0.01em; font-weight: 600; }
.logo { font-family: var(--mono); font-weight: 600; letter-spacing: -0.02em; }

/* Eyebrow line replaces pill chips */
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.eyebrow a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.eyebrow a:hover { color: var(--accent); border-color: var(--accent); }

/* Part stamps replace pastel badges */
.tag, .fpf-badge { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; padding: 3px 7px; border-radius: 2px; line-height: 1.3; background: none; }
.tag--oem, .fpf-badge--oem { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.tag--alt, .fpf-badge--alt { color: var(--ink); border: 1px dashed var(--ink-2); }
.fpf-verified { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--accent-dark); font-weight: 500; }
.fpf-verified::before { content: "✓ "; }
.fpf-card__type { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }

/* Spec sheet replaces fact cards */
.hero { border-radius: var(--radius); }
.facts { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; gap: 0 32px; border-top: 2px solid var(--ink); margin-top: 6px; }
.facts div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; background: none; border-radius: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 13px; color: var(--muted); white-space: nowrap; }
.facts dd { margin: 0; font-family: var(--mono); font-weight: 500; font-size: 14px; text-align: right; }
@media (max-width: 640px) { .facts { grid-template-columns: 1fr; } }

/* Flatter cards */
.fpf-card { border-radius: var(--radius); padding: 18px; }
.fpf-card__img { border-radius: 2px; }
.fpf-card__meta b { font-family: var(--mono); font-weight: 500; }
.fpf-btn { border-radius: 3px; }
.panel, .fpf-table-wrap, .device-list a, .cat-grid a, .post-card, .aside-dark { border-radius: var(--radius); }
.fpf-table td, .fpf-table th[scope=row] { font-size: 14px; }
.fpf-table thead th { font-family: var(--mono); font-weight: 500; }

/* Article + sidebar */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.article-layout .entry { max-width: 760px; }
.article-aside { position: relative; height: 100%; }
.aside-sticky { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 28px; }
.aside-block { border-top: 2px solid var(--ink); padding-top: 12px; }
.aside-label { margin: 0 0 10px; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.4; }
.toc li::before { content: counter(toc, decimal-leading-zero); font-family: var(--mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent); }
.parts-mini { width: 100%; border-collapse: collapse; font-size: 14px; }
.parts-mini th, .parts-mini td { padding: 8px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.parts-mini th a { font-family: var(--mono); font-weight: 500; color: var(--ink); text-decoration: none; }
.parts-mini th a:hover { color: var(--accent); }
.parts-mini td { text-align: right; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.article-aside .fpf-finder { flex-direction: column; }
.article-aside .fpf-finder button { width: 100%; }
.entry-content h2 { scroll-margin-top: 24px; }
@media (max-width: 960px) {
	.article-layout { grid-template-columns: 1fr; gap: 32px; }
	.aside-sticky { position: static; }
	.toc { display: none; }
}

/* Device grid (category, brand, home) */
.device-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0; }
.device-tile { background: var(--surface); border: 1px solid var(--line); margin: 0 -1px -1px 0; }
.device-tile a { display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none; }
.device-tile a:hover { background: var(--bg); }
.device-tile a:hover .device-tile__name { color: var(--accent); }
.device-tile__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: var(--soft); overflow: hidden; }
.device-tile__img img { width: 78%; height: 78%; object-fit: contain; }
.device-tile__noimg { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.device-tile__body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.device-tile__brand { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.device-tile__name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.device-tile__meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.device-tile__meta code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); background: none; }

/* Brand filter: flat text links with an underline for the current one */
.brand-pills { gap: 4px 20px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.brand-pills a { padding: 4px 0; border: 0; border-radius: 0; background: none; font-size: 14px; color: var(--ink-2); }
.brand-pills a:hover, .brand-pills .is-current a { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }


/* Home hero: search + category tiles side by side (0.2.4) */
.home-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); gap: 56px; align-items: center; }
.home-hero__main h1 { max-width: none; }
.hero-cats h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-family: inherit; font-weight: 600; }
.hero-cats .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hero-cats .cat-grid a { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; background: var(--bg); }
.hero-cats .cat-grid a:hover { background: var(--accent-soft); }
.hero-cats .cat-grid strong { font-size: 17px; }
.hero-cats .cat-grid span:not(.cat-icon) { display: none; }
.cat-icon { display: block; width: 44px; height: 44px; background: center / contain no-repeat; }
.cat-icon--air-purifier { background-image: url(/wp-content/uploads/2026/11/image-3.png); }
.cat-icon--robot-vacuum { background-image: url(/wp-content/uploads/2026/11/image-2.png); }
.cat-icon--vacuum { background-image: url(/wp-content/uploads/2026/11/image.png); }
.cat-icon--wet-dry-vac { background-image: url(/wp-content/uploads/2026/11/image-1.png); }
@media (max-width: 960px) {
  .home-hero__grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Fill the row when there are only a few cards (0.2.5) */
.device-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fpf-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.post-list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.device-tile__img { aspect-ratio: 4 / 3; }

/* Tables inside guide content (0.2.6) */
.entry-content table { width: 100%; border-collapse: collapse; margin: 24px 0 28px; font-size: 15px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.entry-content thead th { background: var(--soft); font-family: var(--display); font-weight: 600; color: var(--ink); }
.entry-content tbody td:first-child { font-weight: 600; color: var(--ink-2); width: 26%; }
.entry-content tbody tr:last-child td { border-bottom: 0; }
.entry-content tbody tr:nth-child(even) td { background: var(--bg); }
@media (max-width: 640px) {
  .entry-content table { display: block; overflow-x: auto; white-space: nowrap; }
}
