/* ==========================================================================
   ScreenProtectors.co.uk — storefront design system

   Deliberately unlike ScreenProtector.co.uk (dark hero, electric blue,
   gradient blobs, long-form review layout). This one reads as a shop:
   warm paper background, dense product grid, hard-edged cards, a saturated
   coral CTA, and a device finder in place of a marketing hero.
   ========================================================================== */

:root {
  /* Surfaces — warm neutrals, not cool slate */
  --paper: #f7f6f3;
  --card: #ffffff;
  --card-alt: #fbfaf8;
  --line: #e5e2db;
  --line-strong: #d3cec4;

  /* Ink */
  --ink: #16181d;
  --ink-2: #3d4149;
  --ink-3: #6b7078;
  --ink-4: #949aa3;

  /* Brand — deep protective green */
  --brand: #0e5c4a;
  --brand-dark: #0a4438;
  --brand-light: #e8f2ef;
  --brand-mid: #b9d8d0;

  /* Accent — CTA, price, sale */
  --accent: #ff5c35;
  --accent-dark: #e04520;
  --accent-light: #fff0ec;

  /* Status */
  --gold: #b8860b;
  --gold-light: #fdf6e3;
  --stock: #0e7c4a;
  --alert: #c2410c;

  /* Type */
  --display: 'Archivo', system-ui, -apple-system, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, sans-serif;

  /* Metrics */
  --max: 1320px;
  --gutter: 20px;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(22, 24, 29, 0.06);
  --shadow: 0 2px 8px rgba(22, 24, 29, 0.08);
  --shadow-lg: 0 12px 32px rgba(22, 24, 29, 0.12);
}

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

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

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Utility bar
   -------------------------------------------------------------------------- */
.utility {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  letter-spacing: 0.01em;
}
.utility .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 34px;
  flex-wrap: wrap;
}
.utility strong {
  color: #fff;
  font-weight: 600;
}
.utility-links {
  display: flex;
  gap: 18px;
}
.utility a {
  color: rgba(255, 255, 255, 0.72);
}
.utility a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.masthead {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.masthead-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--ink);
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--brand);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.brand-mark svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
}
.brand em {
  font-style: normal;
  color: var(--brand);
}
.brand-suffix {
  color: var(--ink-4);
  font-weight: 600;
}

/* Search */
.searchbar {
  position: relative;
  display: flex;
}
.searchbar input {
  width: 100%;
  font-family: var(--body);
  font-size: 0.94rem;
  padding: 11px 44px 11px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--card-alt);
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.searchbar input:focus {
  border-color: var(--brand);
  background: #fff;
}
.searchbar input::placeholder {
  color: var(--ink-4);
}
.searchbar button {
  position: absolute;
  right: 5px;
  top: 5px;
  bottom: 5px;
  width: 34px;
  border: 0;
  border-radius: var(--r-sm);
  background: var(--brand);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.searchbar button svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.2;
}

/* Live search results panel */
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  z-index: 120;
  overflow: hidden;
  max-height: 340px;
  overflow-y: auto;
}
.search-results a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.search-results a:last-child {
  border-bottom: 0;
}
.search-results a:hover {
  background: var(--brand-light);
  text-decoration: none;
}
.search-results em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  white-space: nowrap;
}
.search-empty {
  padding: 13px 14px;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.masthead-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Vertical nav — the primary axis: what are you shopping for? */
.vertnav {
  background: var(--brand);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  /* Three verticals plus News exceed 375px. Without containment the whole
     document scrolled sideways by 168px on a phone — the nav must scroll
     within itself, exactly as .catnav does. */
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.vertnav::-webkit-scrollbar {
  display: none;
}
.vertnav .wrap {
  display: flex;
  gap: 2px;
  align-items: center;
  min-width: max-content;
}
.vertnav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.vertnav a:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
}
.vertnav a[aria-current='page'] {
  color: #fff;
  border-bottom-color: var(--accent);
  background: rgba(0, 0, 0, 0.12);
}
.vertnav svg {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
}
.vertnav-news {
  margin-left: auto;
  font-weight: 600 !important;
  font-size: 0.86rem !important;
}

/* Category nav */
.catnav {
  border-top: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.catnav::-webkit-scrollbar {
  display: none;
}
.catnav .wrap {
  display: flex;
  gap: 4px;
  align-items: center;
}
.catnav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.catnav a:hover {
  color: var(--brand);
  border-bottom-color: var(--brand-mid);
  text-decoration: none;
}
.catnav a[aria-current='page'] {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.catnav svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
.catnav .catnav-deal {
  color: var(--accent);
  margin-left: auto;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 10px 18px;
  border-radius: var(--r);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: center;
}
.btn:hover {
  text-decoration: none;
}
.btn:active {
  transform: translateY(1px);
}
.btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.btn-buy {
  background: var(--accent);
  color: #fff;
  width: 100%;
}
.btn-buy:hover {
  background: var(--accent-dark);
  color: #fff;
}
.btn-brand {
  background: var(--brand);
  color: #fff;
}
.btn-brand:hover {
  background: var(--brand-dark);
  color: #fff;
}
.btn-ghost {
  background: var(--card);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--ink-3);
  color: var(--ink);
}
.btn-sm {
  padding: 7px 13px;
  font-size: 0.8rem;
}

/* --------------------------------------------------------------------------
   Device finder — this replaces the marketing hero
   -------------------------------------------------------------------------- */
.finder {
  background: linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
  padding-block: 40px 34px;
}
.finder h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.55rem);
  max-width: 20ch;
  margin-bottom: 10px;
}
.finder h1 em {
  font-style: normal;
  color: var(--brand);
}
.finder-lede {
  font-size: 1.02rem;
  color: var(--ink-3);
  max-width: 62ch;
  margin-bottom: 26px;
}
.finder-box {
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  max-width: 780px;
}
.finder-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 12px;
  display: block;
}
.finder-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}
.finder select {
  font-family: var(--body);
  font-size: 0.92rem;
  padding: 11px 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--card-alt);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7078' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px;
  padding-right: 34px;
}
.finder select:focus {
  border-color: var(--brand);
}
.finder-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.finder-quick span {
  font-size: 0.78rem;
  color: var(--ink-4);
  font-weight: 600;
  align-self: center;
  margin-right: 3px;
}
.chip-link {
  font-size: 0.79rem;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 100px;
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid transparent;
}
.chip-link:hover {
  border-color: var(--brand-mid);
  text-decoration: none;
}

/* Trust strip */
.trustbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.trustbar .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding-block: 16px;
}
.trust-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.trust-item svg {
  width: 19px;
  height: 19px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.9;
  flex-shrink: 0;
  margin-top: 2px;
}
.trust-item strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
  font-weight: 700;
}
.trust-item span {
  font-size: 0.78rem;
  color: var(--ink-3);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section {
  padding-block: 42px;
}
.section-tight {
  padding-block: 28px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.65rem);
}
.section-head p {
  font-size: 0.92rem;
  color: var(--ink-3);
  margin-top: 5px;
  max-width: 70ch;
}
.section-head .more {
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Category tiles
   -------------------------------------------------------------------------- */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 18px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: block;
}
.tile:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  text-decoration: none;
}
.tile-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r);
  background: var(--brand-light);
  display: grid;
  place-items: center;
  margin-bottom: 13px;
}
.tile-icon svg {
  width: 21px;
  height: 21px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.8;
}
.tile h3 {
  font-size: 1rem;
  margin-bottom: 5px;
}
.tile p {
  font-size: 0.83rem;
  color: var(--ink-3);
  line-height: 1.5;
}
.tile-count {
  display: inline-block;
  margin-top: 11px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Product grid + cards
   -------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.product-grid.cols-4 {
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  aspect-ratio: 1 / 1;
  /* Amazon's product shots are white-background JPEGs, and the products
     themselves are clear or matte film — so on a pure white tile they vanish
     entirely (verified: Tesla matte films rendered as blank squares). A light
     tint reveals the photo's boundary and gives pale products an edge.
     Do NOT add mix-blend-mode here — multiply against this tint erases them
     again, which is the failure this replaced. */
  background: #e9e5dd;
  display: grid;
  place-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  /* aspect-ratio alone doesn't constrain an oversized child — a portrait
     product shot would stretch the box and misalign the grid. */
  overflow: hidden;
}
.card-media img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  /* Many listings are near-white photos of clear film with almost no visible
     detail — an iPad protector shot flat is a transparent rectangle on a white
     backdrop. Against a pale tile those read as a rendering fault. Giving the
     photo an explicit white plate on a tinted tile makes every card resolve as
     a product shot, however faint its contents. */
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(22, 24, 29, 0.07);
}
.card-media .placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--ink-4);
}
.card-media .placeholder svg {
  width: 52px;
  height: 52px;
  stroke: var(--line-strong);
  fill: none;
  stroke-width: 1.2;
}

.card-rank {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  z-index: 2;
}
.card-flag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 100px;
  z-index: 2;
}
.flag-best {
  background: var(--gold-light);
  color: var(--gold);
  border: 1px solid #eddba5;
}
.flag-value {
  background: var(--brand-light);
  color: var(--brand);
  border: 1px solid var(--brand-mid);
}
.flag-sale {
  background: var(--accent);
  color: #fff;
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 9px;
}
.card-brand {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.card-title {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-title a {
  color: inherit;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.chip {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--card-alt);
  border: 1px solid var(--line);
  color: var(--ink-3);
  white-space: nowrap;
}
.chip-glass {
  background: #eef4fb;
  border-color: #cfe0f2;
  color: #1c5385;
}
.chip-privacy {
  background: #f4f0fa;
  border-color: #ddd2ee;
  color: #5b3f8c;
}
.chip-matte {
  background: #fdf4ea;
  border-color: #f0dcc0;
  color: #8a5a1c;
}
.chip-paper {
  background: #f6f3ea;
  border-color: #e3dcc6;
  color: #6f6231;
}
.chip-film {
  background: #edf7f2;
  border-color: #c8e5d8;
  color: #1f6b4d;
}

.card-meta {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.price {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.price-was {
  font-size: 0.82rem;
  color: var(--ink-4);
  text-decoration: line-through;
}
.price-off {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--accent);
}
.price-none {
  font-size: 0.85rem;
  color: var(--ink-3);
  font-weight: 600;
}
.price-stamp {
  font-size: 0.68rem;
  color: var(--ink-4);
}

.rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--ink-3);
}
.stars {
  color: var(--gold);
  letter-spacing: 0.05em;
  font-size: 0.82rem;
}
.prime-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand);
}

/* --------------------------------------------------------------------------
   Rails — horizontal scroll shelves
   -------------------------------------------------------------------------- */
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.rail > * {
  scroll-snap-align: start;
}
@media (min-width: 1100px) {
  .rail {
    grid-auto-columns: minmax(0, 1fr);
    grid-template-columns: repeat(5, 1fr);
    grid-auto-flow: row;
    overflow: visible;
  }
}

/* --------------------------------------------------------------------------
   Layout with sidebar (category + device pages)
   -------------------------------------------------------------------------- */
.shop-layout {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: 132px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.sidebar-block {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
}
.sidebar-block:last-child {
  border-bottom: 0;
}
.sidebar-block h3,
.sidebar-block .sidebar-heading {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 11px;
}
.sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 0.855rem;
  color: var(--ink-2);
  padding: 6px 8px;
  margin-inline: -8px;
  border-radius: var(--r-sm);
  font-weight: 500;
}
.sidebar-list a:hover {
  background: var(--brand-light);
  color: var(--brand);
  text-decoration: none;
}
.sidebar-list a[aria-current='page'] {
  background: var(--brand-light);
  color: var(--brand);
  font-weight: 700;
}
.sidebar-list .n {
  font-size: 0.74rem;
  color: var(--ink-4);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   Breadcrumb
   -------------------------------------------------------------------------- */
.crumbs {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}
.crumbs .wrap {
  padding-block: 10px;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--ink-4);
}
.crumbs a {
  color: var(--ink-3);
}
.crumbs a:hover {
  color: var(--brand);
}
.crumbs [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Page header (category / device)
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: 30px 22px;
}
.page-head h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.15rem);
  margin-bottom: 9px;
}
.page-head .lede {
  font-size: 1rem;
  color: var(--ink-3);
  max-width: 74ch;
}
.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.spec {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 6px 11px;
  border-radius: 100px;
}
.spec svg {
  width: 13px;
  height: 13px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2;
}

/* --------------------------------------------------------------------------
   Cross-vertical link — protectors ⇄ cases for the same device
   -------------------------------------------------------------------------- */
.crosslink {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--brand-light);
  border: 1px solid var(--brand-mid);
  border-radius: var(--r);
  padding: 13px 16px;
  margin-bottom: 18px;
}
.crosslink svg {
  width: 19px;
  height: 19px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 1.9;
  flex-shrink: 0;
  margin-top: 1px;
}
.crosslink strong {
  display: block;
  font-family: var(--display);
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.crosslink span {
  font-size: 0.88rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.crosslink a {
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Fit advice callouts
   -------------------------------------------------------------------------- */
.advice {
  display: grid;
  gap: 10px;
  margin-block: 22px;
}
.advice-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r);
  padding: 13px 16px;
}
.advice-item strong {
  display: block;
  font-family: var(--display);
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 3px;
}
.advice-item p {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Prose / editorial
   -------------------------------------------------------------------------- */
.prose {
  max-width: 74ch;
}
.prose p {
  margin-bottom: 15px;
  font-size: 0.97rem;
  line-height: 1.72;
}
.prose h2 {
  font-size: 1.35rem;
  margin-block: 30px 12px;
}
.prose h3 {
  font-size: 1.08rem;
  margin-block: 22px 9px;
}
.prose ul,
.prose ol {
  margin-bottom: 15px;
  padding-left: 22px;
}
.prose li {
  margin-bottom: 7px;
  font-size: 0.96rem;
  line-height: 1.65;
}
.prose strong {
  color: var(--ink);
}

/* Comparison table */
.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
}
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 620px;
}
table.compare th,
table.compare td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.compare thead th {
  background: var(--card-alt);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
table.compare tbody tr:last-child td {
  border-bottom: 0;
}
table.compare tbody tr:hover {
  background: var(--card-alt);
}
table.compare td strong {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   FAQ / answers
   -------------------------------------------------------------------------- */
.faq {
  display: grid;
  gap: 9px;
  max-width: 82ch;
}
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.faq summary {
  cursor: pointer;
  padding: 13px 16px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--ink-4);
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
}
.faq details[open] summary::after {
  content: '−';
}
.faq details[open] summary {
  border-bottom: 1px solid var(--line);
  background: var(--card-alt);
}
.faq-answer {
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.68;
  color: var(--ink-2);
}
.faq-answer p + p {
  margin-top: 11px;
}

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.news-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 17px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.news-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.news-meta {
  display: flex;
  gap: 9px;
  align-items: center;
  font-size: 0.74rem;
  color: var(--ink-4);
  font-weight: 600;
}
.news-source {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.news-card h3 {
  font-size: 1rem;
  line-height: 1.35;
}
.news-card p {
  font-size: 0.875rem;
  color: var(--ink-3);
  line-height: 1.58;
}
.news-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 4px;
}

/* --------------------------------------------------------------------------
   Disclosure
   -------------------------------------------------------------------------- */
.disclosure {
  background: var(--gold-light);
  border: 1px solid #eddba5;
  border-radius: var(--r);
  padding: 12px 15px;
  font-size: 0.82rem;
  color: #6b5310;
  line-height: 1.55;
  display: flex;
  gap: 10px;
}
.disclosure svg {
  width: 16px;
  height: 16px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.62);
  margin-top: 50px;
  padding-block: 40px 26px;
  font-size: 0.86rem;
}
.footer-grid {
  display: grid;
  /* Six columns now the site has three verticals: the about block plus Shop,
     Screen protectors, Cases, Accessories and Help. */
  grid-template-columns: 1.7fr repeat(5, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.site-footer h4,
.site-footer .footer-heading {
  color: #fff;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 13px;
  font-weight: 700;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.62);
}
.site-footer a:hover {
  color: #fff;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}
.footer-about p {
  line-height: 1.65;
  margin-bottom: 14px;
  max-width: 44ch;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 800;
  color: #fff;
  font-size: 1.02rem;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}
.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.79rem;
  color: rgba(255, 255, 255, 0.45);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1000px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
  }
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-about {
    grid-column: 1 / -1;
  }
  .trustbar .wrap {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .masthead-main {
    grid-template-columns: 1fr auto;
    grid-template-areas: 'brand actions' 'search search';
    gap: 12px;
  }
  .brand {
    grid-area: brand;
  }
  .searchbar {
    grid-area: search;
  }
  .masthead-actions {
    grid-area: actions;
  }
  .finder-controls {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  .card-body {
    padding: 11px;
  }
  .utility-links {
    display: none;
  }
}

@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .trustbar .wrap {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media print {
  .masthead,
  .utility,
  .site-footer,
  .finder {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Author byline
   -------------------------------------------------------------------------- */
.byline {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  margin: 4px 0 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.byline-compact {
  border-top: 0;
  padding-top: 0;
}
.byline-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.byline-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.byline-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.byline-name a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--brand-mid);
  text-underline-offset: 2px;
}
.byline-name a:hover {
  color: var(--brand);
}
.byline-meta {
  font-size: 0.79rem;
  color: var(--ink-3);
}

/* Author page header */
.author-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 22px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.author-head .byline-avatar {
  width: 64px;
  height: 64px;
  font-size: 1.35rem;
}

/* --------------------------------------------------------------------------
   Answer key points — the scannable summary, and what a model tends to quote
   -------------------------------------------------------------------------- */
.keypoints {
  background: var(--brand-light);
  border: 1px solid var(--brand-mid);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  margin-bottom: 26px;
  max-width: 74ch;
}
.keypoints h2 {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.keypoints ul {
  margin: 0;
  padding-left: 20px;
}
.keypoints li {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-bottom: 7px;
}
.keypoints li:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Touch targets
   --------------------------------------------------------------------------
   WCAG 2.5.8 asks for 24x24 CSS pixels minimum; Apple's guidance is 44x44.
   Several inline links measured 17-22px high on a phone, which is too small
   to hit reliably. These raise the hit area without changing the visual size
   of the text. */
@media (max-width: 760px) {
  .vertnav-news {
    /* Sits inline once the bar scrolls — auto margin pushed it out of reach. */
    margin-left: 0;
  }
  .section-head .more,
  .tile-count {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .footer-links a,
  .utility-links a,
  .sidebar-list a {
    display: flex;
    align-items: center;
    min-height: 40px;
  }
  .crumbs .wrap a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
  .footer-bottom a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
  }
  /* Type-chips and card brand lines rendered at 11.2px, below the ~12px floor
     where small text becomes hard to read on a phone and starts drawing
     mobile-usability warnings. */
  .chip {
    font-size: 0.78rem;
    padding: 4px 9px;
  }
  .card-brand {
    font-size: 0.775rem;
  }
  .chip-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
  }
  /* Filter rows scroll rather than wrapping into a tall block. */
  .finder-quick {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .finder-quick::-webkit-scrollbar {
    display: none;
  }
  .finder-quick span {
    flex-shrink: 0;
  }
  .chip-link {
    flex-shrink: 0;
  }
}

/* --------------------------------------------------------------------------
   Decoded listing facts on product cards
   --------------------------------------------------------------------------
   Amazon titles are unreadable by design. These are the facts pulled out of
   the listing and presented in a comparable shape. */
.card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.card-facts li {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-2);
  background: var(--card-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  white-space: nowrap;
}
.card-warn {
  display: flex;
  gap: 7px;
  align-items: flex-start;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #8a4a1c;
  background: #fdf4ea;
  border: 1px solid #f0dcc0;
  border-radius: var(--r-sm);
  padding: 7px 9px;
}
.card-warn svg {
  width: 14px;
  height: 14px;
  stroke: var(--alert);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 1px;
}
.card-oos {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--alert);
}

/* Spec comparison table */
.cmp-specs th[scope='col'] {
  min-width: 130px;
  vertical-align: bottom;
}
.cmp-specs .cmp-corner {
  min-width: 150px;
}
.cmp-specs th[scope='row'] {
  background: var(--card-alt);
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-2);
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
  position: sticky;
  left: 0;
  z-index: 1;
}
.cmp-brand {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.cmp-name {
  display: block;
  font-size: 0.82rem;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.cmp-none {
  color: var(--ink-4);
  font-style: italic;
}
.cmp-buy td {
  padding-top: 12px;
}

/* --------------------------------------------------------------------------
   Product detail pages
   -------------------------------------------------------------------------- */
.product-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  margin-bottom: 8px;
}
.product-media {
  position: sticky;
  top: 150px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
}
.product-media img {
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 0 0 1px rgba(22, 24, 29, 0.07);
  margin-bottom: 14px;
}
.product-media .placeholder {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #e9e5dd;
  border-radius: var(--r);
  margin-bottom: 14px;
}
.product-media .placeholder svg {
  width: 56px;
  height: 56px;
  stroke: var(--line-strong);
  fill: none;
}
.product-asin {
  font-size: 0.74rem;
  color: var(--ink-4);
  margin-top: 10px;
  text-align: center;
}
.product-detail h2 {
  font-size: 1.15rem;
  margin: 26px 0 12px;
}
.product-detail h2:first-child {
  margin-top: 0;
}
.product-detail table.compare th[scope='row'] {
  background: var(--card-alt);
  font-family: var(--body);
  font-size: 0.84rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  width: 45%;
}
.claims {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
}
.claims li {
  font-size: 0.87rem;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 13px;
}
.claims-note {
  font-size: 0.78rem;
  color: var(--ink-4);
  margin-top: 9px;
  font-style: italic;
}
@media (max-width: 900px) {
  .product-layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .product-media {
    position: static;
  }
}

/* Secondary link from a card to its full specification page */
.card-specs {
  display: block;
  text-align: center;
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--brand);
  padding: 6px 0 2px;
}
@media (max-width: 760px) {
  .card-specs {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ---------------------------------------------------------------- plist
   The specifications index (/product/). Rows lead with the device, because
   the previous chip layout showed only brand and finish — "tempered glass ·
   2pk" repeated down the page with no way to tell which model it fitted.
   Specs sit on a second line below 640px rather than being truncated. */
.plist {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.plist-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.plist-row:hover {
  background: var(--card-alt);
}
.plist-main {
  flex: 1 1 auto;
  min-width: 0;
}
.plist-device {
  display: block;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.plist-row:hover .plist-device {
  color: var(--brand);
}
.plist-what {
  display: block;
  font-size: 0.86rem;
  color: var(--ink-3);
  line-height: 1.35;
}
.plist-specs {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem;
}
.plist-spec {
  font-size: 0.72rem;
  line-height: 1;
  padding: 0.28rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink-3);
  white-space: nowrap;
}
.plist-more {
  border-style: dashed;
  color: var(--ink-4);
}

@media (max-width: 640px) {
  .plist-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .plist-specs {
    justify-content: flex-start;
  }
}

/* ------------------------------------------------------------- pfilter
   Filter bar on /product/. Hidden until the script unhides it, so a
   no-JS visitor is never shown controls that do nothing. */
.pfilter {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.pfilter[hidden] {
  display: none;
}
.pfilter-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}
.pfilter-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.pfilter-field select {
  font: inherit;
  font-size: 0.88rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--card);
  color: var(--ink);
  max-width: 100%;
}
.pfilter-field select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}
.pfilter-count {
  margin: 0 0 0.42rem auto;
  font-size: 0.82rem;
  color: var(--ink-3);
}
.plist-empty {
  padding: 1.5rem 0;
  color: var(--ink-3);
}
.linklike {
  font: inherit;
  color: var(--brand);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 560px) {
  .pfilter-field {
    flex: 1 1 100%;
  }
  .pfilter-count {
    margin: 0;
    flex: 1 1 100%;
  }
}
