/* Shared design for all techsites. Mobile first; each site sets --primary and --accent
   inline from its admin settings. No framework, nothing to update. */

:root {
  --primary: #1f4e79;
  --accent: #c75b12;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c2228;
  --muted: #5b6570;
  --line: #e1e4e8;
  --radius: 10px;
  --wrap: 1120px;
  --measure: 70ch;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 var(--font);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-underline-offset: 0.15em; }
a:hover { color: var(--accent); }

h1, h2, h3 { line-height: 1.25; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.4rem); margin-top: 0.6em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
h3 { font-size: 1.1rem; }

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

/* Header and navigation ------------------------------------------------------- */

.site-header { background: var(--primary); color: #fff; }
.header-inner { display: flex; align-items: center; min-height: 60px; }
.brand { color: #fff; font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.brand:hover { color: #fff; }

/* On phones the menu scrolls sideways instead of hiding behind a button. */
.site-nav { background: rgba(0, 0, 0, 0.15); }
.site-nav ul {
  display: flex; gap: 0.25rem; margin: 0 auto; list-style: none;
  overflow-x: auto; scrollbar-width: none;
}
.site-nav ul::-webkit-scrollbar { display: none; }
.site-nav a {
  display: block; padding: 0.7rem 0.75rem; color: #fff; text-decoration: none;
  white-space: nowrap; font-size: 0.95rem;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* Page content ---------------------------------------------------------------- */

main { padding-bottom: 3rem; }

.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 1rem 0 0; padding: 0; font-size: 0.875rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 0.3rem; }
.breadcrumbs a { color: var(--muted); }

.lead { font-size: 1.15rem; color: var(--muted); }
.page { max-width: 760px; }

.prose { max-width: var(--measure); }
.prose img { border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; }

.label { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }

.button {
  display: inline-block; padding: 0.55rem 1rem; border-radius: 6px;
  background: var(--accent); color: #fff; font-weight: 600; text-decoration: none;
}
.button:hover { color: #fff; filter: brightness(1.08); }

/* Cards ----------------------------------------------------------------------- */

.cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards { grid-template-columns: repeat(3, 1fr); } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.card[hidden] { display: none; }
.card a { display: block; height: 100%; color: inherit; text-decoration: none; }
.card a:hover h3 { color: var(--accent); }
/* Product photos are cut-outs on white: show them whole, not cropped. */
.product-card img, .card-placeholder { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; padding: 0.75rem; }
.card-placeholder { background: linear-gradient(135deg, var(--primary), var(--accent)); opacity: 0.2; }
.card-body { padding: 0.8rem 1rem 1rem; }
.card-body h3 { margin: 0.2rem 0 0.4rem; }
.card-body p { margin: 0 0 0.4rem; color: var(--muted); font-size: 0.95rem; }
.card-body .price { color: var(--text); }

.brand-list { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; list-style: none; padding: 0; }

/* Overview filters ------------------------------------------------------------ */

.filters {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.75rem 1rem; margin-bottom: 1.25rem;
}
/* Fieldsets default to min-width: min-content, which pushes the page wider than a phone. */
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; max-width: 100%; }
.filters legend { font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 0.2rem; }
.filters label { display: inline-block; font-size: 0.9rem; margin-right: 0.3rem; white-space: nowrap; }
.filters select { font: inherit; font-size: 0.95rem; padding: 0.25rem 0.4rem; max-width: 100%; }
.filter-count { flex-basis: 100%; margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Product page ---------------------------------------------------------------- */

.product-top { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 800px) { .product-top { grid-template-columns: minmax(0, 1fr) 360px; } }
.product-image { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; width: 100%; }
.offers { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; }
.offers h2 { margin-top: 0; font-size: 1.15rem; }
.offers ul { list-style: none; margin: 0; padding: 0; }
.offers li { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-top: 1px solid var(--line); }
.offers li:first-child { border-top: 0; }
.offers .shop { flex: 1; }
.offers .note { font-size: 0.8rem; color: var(--muted); margin: 0.75rem 0 0; }

.specs dl { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0; margin: 0; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.specs dt, .specs dd { margin: 0; padding: 0.45rem 0.8rem; border-top: 1px solid var(--line); }
.specs dt:first-of-type, .specs dd:first-of-type { border-top: 0; }
.specs dt { color: var(--muted); }

.product-box { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); }
.product-box p { margin: 0.3rem 0; }
.product-box-title { font-weight: 700; }

.related { margin-top: 2.5rem; }

/* Footer ---------------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; padding: 1.5rem 0; }
.site-footer p { margin: 0 0 0.5rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; list-style: none; margin: 0 0 0.5rem; padding: 0; }
.footer-links a { color: var(--muted); }

/* Keyboard use: a skip link and a focus ring that is visible on every background. */
.skip-link {
  position: absolute; left: 0.5rem; top: -4rem; z-index: 10;
  padding: 0.5rem 0.9rem; background: var(--surface); color: var(--text);
  border-radius: var(--radius); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.skip-link:focus { top: 0.5rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.site-header :focus-visible { outline-color: #fff; }
main:focus { outline: none; }
