/*
Theme Name: Printer Support Base
Theme URI: https://example.invalid/
Author: Site Operations
Description: SSR-first parent theme for the exclusive printer model catalogs.
Version: 0.1.0
Requires PHP: 7.4
Text Domain: printer-support-base
*/

:root {
  --pcp-bg: #f4f7fb;
  --pcp-surface: #ffffff;
  --pcp-surface-soft: #edf4ff;
  --pcp-text: #172033;
  --pcp-muted: #5a6880;
  --pcp-line: #dbe3ef;
  --pcp-accent: #1268d6;
  --pcp-accent-strong: #0a4fae;
  --pcp-accent-soft: #e6f0ff;
  --pcp-success: #147a52;
  --pcp-warning: #9a5b00;
  --pcp-radius: 16px;
  --pcp-shadow: 0 14px 36px rgba(24, 45, 78, .08);
  --pcp-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--pcp-text);
  background: var(--pcp-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pcp-accent-strong); text-underline-offset: 3px; }
a:hover { color: var(--pcp-accent); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--pcp-accent) 35%, transparent);
  outline-offset: 3px;
}
img { max-width: 100%; height: auto; }
button, input { font: inherit; }
.pcp-wrap { width: min(calc(100% - 32px), var(--pcp-width)); margin-inline: auto; }
.pcp-skip {
  position: fixed; left: 16px; top: -80px; z-index: 1000;
  padding: 10px 16px; color: #fff; background: var(--pcp-accent-strong); border-radius: 8px;
}
.pcp-skip:focus { top: 16px; }

.pcp-site-header {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid color-mix(in srgb, var(--pcp-line) 85%, transparent);
  background: color-mix(in srgb, var(--pcp-surface) 92%, transparent);
  backdrop-filter: blur(14px);
}
.pcp-header-row { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.pcp-brand { color: var(--pcp-text); font-size: 1.08rem; font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.pcp-brand-mark {
  display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px;
  color: #fff; background: var(--pcp-accent); border-radius: 10px; box-shadow: 0 7px 18px color-mix(in srgb, var(--pcp-accent) 28%, transparent);
}
.pcp-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.pcp-nav a { color: var(--pcp-muted); font-size: .94rem; font-weight: 650; text-decoration: none; }
.pcp-nav a:hover { color: var(--pcp-accent-strong); }
.pcp-menu-toggle { display: none; margin-left: auto; border: 1px solid var(--pcp-line); background: var(--pcp-surface); border-radius: 10px; padding: 8px 12px; color: var(--pcp-text); }

.pcp-main { min-height: 65vh; }
.pcp-hero { padding: 72px 0 54px; background: linear-gradient(145deg, var(--pcp-surface-soft), var(--pcp-bg) 70%); border-bottom: 1px solid var(--pcp-line); }
.pcp-eyebrow { margin: 0 0 10px; color: var(--pcp-accent-strong); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.pcp-hero h1, .pcp-model-title { margin: 0; max-width: 850px; font-size: clamp(2.2rem, 5vw, 4.6rem); line-height: 1.04; letter-spacing: -.052em; }
.pcp-hero-copy { max-width: 720px; margin: 20px 0 0; color: var(--pcp-muted); font-size: 1.08rem; }
.pcp-search { display: flex; max-width: 720px; margin-top: 30px; padding: 7px; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: 14px; box-shadow: var(--pcp-shadow); }
.pcp-search input { min-width: 0; flex: 1; border: 0; padding: 12px 14px; color: var(--pcp-text); background: transparent; outline: 0; }
.pcp-button, .pcp-search button, .pcp-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; color: #fff; background: var(--pcp-accent);
  border: 0; border-radius: 10px; font-weight: 750; text-decoration: none; cursor: pointer;
}
.pcp-button:hover, .pcp-search button:hover, .pcp-download:hover { color: #fff; background: var(--pcp-accent-strong); }
.pcp-button.is-secondary { color: var(--pcp-accent-strong); background: var(--pcp-accent-soft); }

.pcp-section { padding: 54px 0; }
.pcp-section + .pcp-section { border-top: 1px solid var(--pcp-line); }
.pcp-section-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 22px; }
.pcp-section h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.15rem); line-height: 1.18; letter-spacing: -.035em; }
.pcp-section-intro { margin: 8px 0 0; max-width: 720px; color: var(--pcp-muted); }
.pcp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pcp-grid.is-brands { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.pcp-card { display: block; min-width: 0; padding: 22px; color: inherit; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: var(--pcp-radius); box-shadow: 0 6px 20px rgba(24, 45, 78, .04); text-decoration: none; }
.pcp-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--pcp-accent) 45%, var(--pcp-line)); box-shadow: var(--pcp-shadow); }
.pcp-card h3 { margin: 0 0 6px; font-size: 1.03rem; line-height: 1.3; }
.pcp-card p { margin: 0; color: var(--pcp-muted); font-size: .92rem; }
.pcp-count { display: block; margin-top: 14px; color: var(--pcp-accent-strong); font-weight: 800; }
.pcp-empty { padding: 28px; color: var(--pcp-muted); background: var(--pcp-surface); border: 1px dashed var(--pcp-line); border-radius: var(--pcp-radius); }

.pcp-crumbs { padding: 22px 0; color: var(--pcp-muted); font-size: .88rem; }
.pcp-crumbs ol { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.pcp-crumbs li:not(:last-child)::after { content: "/"; margin-left: 7px; color: #9aa6b8; }
.pcp-crumbs a { color: var(--pcp-muted); text-decoration: none; }

.pcp-model-hero { display: grid; grid-template-columns: minmax(240px, 360px) minmax(0, 1fr); gap: 48px; align-items: center; padding: 20px 0 54px; }
.pcp-model-image { display: grid; place-items: center; min-height: 310px; padding: 24px; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: 24px; box-shadow: var(--pcp-shadow); }
.pcp-model-image img { max-height: 290px; object-fit: contain; }
.pcp-model-title { font-size: clamp(2.1rem, 4.5vw, 3.9rem); }
.pcp-model-intro { max-width: 720px; margin: 18px 0; color: var(--pcp-muted); font-size: 1.05rem; }
.pcp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.pcp-badge { padding: 6px 10px; color: var(--pcp-accent-strong); background: var(--pcp-accent-soft); border-radius: 999px; font-size: .8rem; font-weight: 750; }
.pcp-badge.is-verified { color: var(--pcp-success); background: #e7f7ef; }

.pcp-table-wrap { overflow-x: auto; border: 1px solid var(--pcp-line); border-radius: var(--pcp-radius); background: var(--pcp-surface); }
.pcp-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.pcp-table th, .pcp-table td { padding: 15px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--pcp-line); }
.pcp-table th { color: var(--pcp-muted); background: color-mix(in srgb, var(--pcp-surface-soft) 65%, #fff); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.pcp-table tr:last-child td { border-bottom: 0; }
.pcp-package-name { display: block; font-weight: 780; }
.pcp-package-purpose { display: block; margin-top: 3px; color: var(--pcp-muted); font-size: .86rem; }
.pcp-source-link { font-weight: 700; }
.pcp-unavailable { color: var(--pcp-muted); font-size: .86rem; }
.pcp-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--pcp-line); border: 1px solid var(--pcp-line); border-radius: var(--pcp-radius); }
.pcp-fact { padding: 17px 19px; background: var(--pcp-surface); }
.pcp-fact dt { color: var(--pcp-muted); font-size: .8rem; font-weight: 750; }
.pcp-fact dd { margin: 4px 0 0; font-weight: 700; }
.pcp-source-box { padding: 24px; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-left: 4px solid var(--pcp-accent); border-radius: var(--pcp-radius); }
.pcp-source-box p { margin: 6px 0; }
.pcp-source-box .pcp-muted { color: var(--pcp-muted); }
.pcp-faq details { margin-bottom: 10px; padding: 16px 18px; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: 12px; }
.pcp-faq summary { cursor: pointer; font-weight: 760; }
.pcp-faq details div { padding-top: 10px; color: var(--pcp-muted); }

.pcp-legacy { padding: 30px 0 64px; }
.pcp-legacy article { padding: clamp(20px, 4vw, 46px); background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: var(--pcp-radius); box-shadow: var(--pcp-shadow); }
.pcp-legacy h1 { margin-top: 0; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.1; letter-spacing: -.04em; }
.pcp-legacy table { max-width: 100%; }
.pcp-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.pcp-pagination .page-numbers { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: 9px; text-decoration: none; }
.pcp-pagination .current { color: #fff; background: var(--pcp-accent); border-color: var(--pcp-accent); }

.pcp-site-footer { margin-top: 70px; padding: 48px 0 28px; color: #cbd4e2; background: #111a2b; }
.pcp-footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 34px; }
.pcp-site-footer h2, .pcp-site-footer h3 { color: #fff; }
.pcp-site-footer h2 { margin-top: 0; font-size: 1.15rem; }
.pcp-site-footer h3 { margin: 0 0 10px; font-size: .9rem; }
.pcp-site-footer p { color: #aeb9ca; font-size: .88rem; }
.pcp-site-footer ul { margin: 0; padding: 0; list-style: none; }
.pcp-site-footer li { margin: 7px 0; }
.pcp-site-footer a { color: #dce5f2; font-size: .88rem; text-decoration: none; }
.pcp-footer-bottom { margin-top: 34px; padding-top: 22px; border-top: 1px solid #2b3547; color: #96a4b8; font-size: .82rem; }

.pcp-download-message { position: fixed; right: 18px; bottom: 18px; z-index: 9999; max-width: 360px; padding: 13px 16px; color: #fff; background: #1e2b40; border-radius: 10px; box-shadow: var(--pcp-shadow); }
.pcp-download-message.is-error { background: #9f2633; }
.pcp-download-message.is-hidden { display: none; }

@media (max-width: 900px) {
  .pcp-menu-toggle { display: inline-flex; }
  .pcp-nav { display: none; position: absolute; left: 16px; right: 16px; top: 64px; flex-direction: column; align-items: stretch; gap: 0; padding: 10px; background: var(--pcp-surface); border: 1px solid var(--pcp-line); border-radius: 12px; box-shadow: var(--pcp-shadow); }
  .pcp-nav.is-open { display: flex; }
  .pcp-nav a { padding: 11px 12px; }
  .pcp-grid, .pcp-grid.is-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcp-model-hero { grid-template-columns: 1fr; gap: 28px; }
  .pcp-model-image { min-height: 240px; }
  .pcp-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 580px) {
  .pcp-wrap { width: min(calc(100% - 22px), var(--pcp-width)); }
  .pcp-hero { padding: 50px 0 40px; }
  .pcp-hero h1, .pcp-model-title { font-size: 2.35rem; }
  .pcp-search { display: block; }
  .pcp-search input, .pcp-search button { width: 100%; }
  .pcp-search button { margin-top: 4px; }
  .pcp-grid, .pcp-grid.is-brands, .pcp-facts, .pcp-footer-grid { grid-template-columns: 1fr; }
  .pcp-model-image { min-height: 220px; }
  .pcp-section { padding: 40px 0; }
}
