/* Flight It & Computers. All colours, fonts and sizes are set here as variables,
   so a redesign only needs this file. */
:root {
  --brand: #0b5cad;
  --brand-dark: #08457f;
  --accent: #1a9e4b;          /* WhatsApp / in stock */
  --warn: #b26a00;
  --danger: #b3261e;
  --text: #1c1f23;
  --muted: #5b6470;
  --line: #dde2e8;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --radius: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --page-width: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.6em 0; }
h2 { font-size: 1.25rem; margin: 1.4em 0 0.6em; }
.wrap { max-width: var(--page-width); margin: 0 auto; padding: 0 16px; }
.small { font-size: 0.875rem; color: var(--muted); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 12px; padding-bottom: 12px; }
.logo { text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.2rem; }
.logo img { height: 40px; width: auto; display: block; } /* without this, the general img rule shows the logo full size */
.search { display: flex; flex: 1 1 260px; }
.search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); font: inherit; }
.search button { border-radius: 0 var(--radius) var(--radius) 0; }
.cat-nav { background: var(--bg-soft); border-top: 1px solid var(--line); }
.cat-nav ul { display: flex; gap: 4px; list-style: none; margin: 0 auto; padding-top: 4px; padding-bottom: 4px; overflow-x: auto; white-space: nowrap; }
.cat-nav a { display: block; padding: 8px 10px; text-decoration: none; color: var(--text); border-radius: var(--radius); }
.cat-nav a:hover { background: var(--line); }

/* Buttons and forms */
button, .button { display: inline-block; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius); padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
button:hover, .button:hover { background: var(--brand-dark); }
.button.primary { background: var(--accent); width: 100%; padding: 14px; font-size: 1.05rem; }
.button.secondary { background: var(--bg); color: var(--brand); border: 1px solid var(--brand); }
input, select { font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); }

/* Listing */
.crumbs { font-size: 0.875rem; color: var(--muted); margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.chips a { display: inline-block; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--text); font-size: 0.9rem; }
.chips a[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
.chips span { color: var(--muted); }
.chips a[aria-current] span { color: #dfe9f5; }
.filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; padding: 12px; background: var(--bg-soft); border-radius: var(--radius); margin: 12px 0; }
.filters label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--muted); gap: 2px; }
.filters label.check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
.filters input[type=number] { width: 7em; }
.filters .clear { align-self: center; font-size: 0.9rem; }
.count { color: var(--muted); font-size: 0.9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.card a { text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 8px; }
.card img { aspect-ratio: 1; object-fit: contain; width: 100%; background: #fff; }
.card-name { font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.price { font-weight: 700; font-size: 1.05rem; }
.price s { color: var(--muted); font-weight: 400; font-size: 0.85em; }
.price.big { font-size: 1.8rem; margin: 0.3em 0; }
.price .vat { font-size: 0.85rem; font-weight: 400; color: var(--muted); margin-left: 6px; }
.badge { background: var(--danger); color: #fff; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; vertical-align: middle; }
.stock { font-size: 0.85rem; font-weight: 600; }
.stock.in { color: var(--accent); }
.stock.eta { color: var(--warn); }
.stock.out { color: var(--muted); }
.pages { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.pages a, .pages span { padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pages span[aria-current] { background: var(--brand); color: #fff; border-color: var(--brand); }
.empty { padding: 40px 0; color: var(--muted); }

/* Home */
.hero { padding: 16px 0 0; }
.cat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; list-style: none; padding: 0; }
.cat-tiles a { display: flex; flex-direction: column; padding: 16px; background: var(--bg-soft); border-radius: var(--radius); text-decoration: none; color: var(--text); }
.cat-tiles span { color: var(--muted); font-size: 0.85rem; }

/* Product page */
.product { display: grid; gap: 24px; margin-top: 8px; }
.gallery .main-image { width: 100%; aspect-ratio: 1; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.thumbs button { padding: 2px; background: #fff; border: 1px solid var(--line); }
.thumbs img { width: 64px; height: 64px; object-fit: contain; display: block; }
.brand { color: var(--muted); margin: 0; }
.tool-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.description { overflow-wrap: anywhere; }
.description table, .specs { border-collapse: collapse; width: 100%; max-width: 760px; }
.specs th, .specs td, .description td, .description th { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { width: 40%; color: var(--muted); font-weight: 600; }
@media (min-width: 800px) {
  .product { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.9rem; }
}

/* Info pages */
.prose { max-width: 760px; }
.tools li { margin-bottom: 12px; }

/* Footer and chat button */
.site-footer { margin-top: 48px; padding: 24px 0 90px; background: var(--bg-soft); border-top: 1px solid var(--line); font-size: 0.9rem; }
.footer-grid { display: grid; gap: 16px; }
.footer-links { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-links li { margin-bottom: 6px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 2fr 1fr; } }
.chat-button { position: fixed; right: 16px; bottom: 16px; background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.2); z-index: 5; }
.chat-button:hover { filter: brightness(0.95); }

/* ---------- Our tools: "Good for" badges, Compare, PC Builder ---------- */
:root {
  --pill-bg: #e8f0fa;
  --pill-text: #0b3f78;
  --ok: var(--accent);
  --problem: var(--danger);
  --unknown: var(--muted);
  --diff-bg: #fff7e0;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.good-for { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 4px 0; }
.pill { display: inline-block; background: var(--pill-bg); color: var(--pill-text); font-size: 0.78rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.pill-note { font-size: 0.8rem; color: var(--muted); width: 100%; }
.compare-tick { font-size: 0.85rem; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.compare-tick[hidden] { display: none; }
.tool-buttons .compare-tick { padding: 8px 4px; }
.compare-float { position: fixed; left: 16px; bottom: 16px; background: var(--brand); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(0,0,0,.2); z-index: 5; }
.compare-float[hidden] { display: none; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 76px; width: max-content; max-width: min(92vw, 480px); background: var(--text); color: #fff; padding: 10px 14px; border-radius: var(--radius); z-index: 20; font-size: 0.9rem; }
.toast[hidden] { display: none; }
.notice { background: var(--diff-bg); border: 1px solid #f0d58a; padding: 10px 12px; border-radius: var(--radius); }
.small-button { padding: 6px 10px; font-size: 0.85rem; }
.secondary-button { background: var(--bg); color: var(--brand); border: 1px solid var(--brand); }
.secondary-button:hover { background: var(--bg-soft); }
.link-button { background: none; color: var(--brand); padding: 6px 4px; text-decoration: underline; font-weight: 400; }
.link-button:hover { background: none; color: var(--brand-dark); }
button[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Tools page */
.tool-cards { display: grid; gap: 12px; list-style: none; padding: 0; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool-cards a { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); height: 100%; }
.tool-cards a:hover { border-color: var(--brand); }
.tool-cards strong { color: var(--brand); font-size: 1.1rem; }
.good-for-help { max-width: 760px; }
.good-for-help dt { font-weight: 700; margin-top: 10px; }
.good-for-help dd { margin: 2px 0 0; color: var(--muted); }

/* Compare */
.compare-scroll { overflow-x: auto; margin: 12px 0; }
.compare-table { border-collapse: collapse; min-width: 100%; }
.compare-table th, .compare-table td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 150px; }
.compare-table thead th { font-weight: 400; }
.compare-table thead a { display: flex; flex-direction: column; gap: 6px; color: var(--text); text-decoration: none; font-size: 0.9rem; }
.compare-table thead img { width: 120px; height: 120px; object-fit: contain; }
.compare-table tbody th { color: var(--muted); font-weight: 600; min-width: 110px; position: sticky; left: 0; background: var(--bg); }
.compare-table tr.diff td, .compare-table tr.diff th { background: var(--diff-bg); }
.compare-table td.na { color: var(--muted); font-style: italic; }
.compare-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; align-items: flex-start; }
.compare-actions .wa { background: var(--accent); }
.compare-actions .remove { font-size: 0.85rem; }

/* PC Builder */
.builder-grid { display: grid; gap: 20px; }
.step { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; scroll-margin-top: 12px; }
.step.done { border-color: #bfe3cc; }
.step.open { border-color: var(--brand); }
.step-head { padding: 12px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.step-head h2 { margin: 0; font-size: 1.1rem; flex: 1 1 200px; }
.step-no { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--bg-soft); font-size: 0.9rem; margin-right: 4px; }
.step.done .step-no { background: var(--accent); color: #fff; }
.step-hint { font-size: 0.85rem; color: var(--muted); width: 100%; }
.step-choice { margin: 0; width: 100%; font-size: 0.95rem; }
.step-buttons { display: flex; gap: 6px; align-items: center; }
.step-body { padding: 0 12px 12px; }
.step-filters { margin-top: 0; }
.step-filters input[type=search] { width: 12em; }
.part-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.part { display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); align-items: start; }
.part img { width: 56px; height: 56px; object-fit: contain; }
.part-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.part-info > a { color: var(--text); font-size: 0.92rem; overflow-wrap: anywhere; }
.part-buy { grid-column: 2; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.part.chosen { border-color: var(--accent); background: #f2fbf5; }
.part.oos { opacity: 0.6; }
.part.fit-no { background: #fdf3f2; }
.chosen-label { color: var(--accent); font-weight: 700; }
.fit { font-size: 0.85rem; font-weight: 600; }
.fit .why { font-weight: 400; color: var(--muted); display: block; }
.fit.yes { color: var(--ok); }
.fit.no { color: var(--problem); }
.fit.unknown { color: var(--unknown); }
.build-summary { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: var(--bg-soft); align-self: start; scroll-margin-top: 12px; }
.build-summary h2 { margin-top: 0.3em; }
.build-summary h3 { font-size: 1rem; margin: 1em 0 0.4em; }
.build-list { list-style: none; padding: 0; margin: 0; }
.build-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.build-list li span:first-child { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; }
.build-total { display: flex; justify-content: space-between; font-size: 1.15rem; margin: 10px 0; }
.build-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 0.92rem; }
.build-checks .icon { display: inline-grid; place-items: center; width: 1.4em; height: 1.4em; border-radius: 50%; color: #fff; font-weight: 700; font-size: 0.85rem; }
.check-ok .icon { background: var(--ok); }
.check-problem .icon { background: var(--problem); }
.check-unknown .icon { background: var(--unknown); }
.check-problem strong { color: var(--problem); }
.build-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.build-bar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.08); z-index: 6; }
body.has-bar .chat-button { bottom: 76px; padding: 8px 12px; font-size: 0.85rem; }
body.has-bar .compare-float { display: none; } /* the builder has its own bottom bar */
body.has-bar .site-footer { padding-bottom: 150px; }
@media (min-width: 900px) {
  .builder-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .build-summary { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
  .build-bar { display: none; }
  body.has-bar .chat-button { bottom: 16px; padding: 12px 18px; font-size: 1rem; }
  .part { grid-template-columns: 72px 1fr auto; }
  .part img { width: 72px; height: 72px; }
  .part-buy { grid-column: auto; flex-direction: column; align-items: flex-end; }
}
