/* ==========================================================================
   Catalogue: homepage hero finder, product grid and cards, filters,
   category cards, brand tiles, products page. Needs css/style.css.
   ========================================================================== */

/* Dark bands (.band, .band-bg, .band-glow) and the page header (.page-band,
   .breadcrumb, .page-title) are shared with every page: see css/style.css. */

/* ---------- Homepage hero ---------- */
.hero { padding: 64px 0 72px; }
/* The photo the home page ships with. The owner replaces it from the admin
   panel (the home.hero site image), and js/site.js then writes his own over
   this one: the default lives here so a slow or failed request never leaves
   the hero empty. */
.hero-photo {
  position: absolute;
  inset: 0;
  background-image: url("https://images.unsplash.com/photo-1558981806-ec527fa84c39?ixlib=rb-4.0.3&auto=format&fit=crop&w=1600&q=80");
  background-position: center 40%;
  background-size: cover;
  opacity: 0.4;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(6, 8, 11, 0.96) 0%, rgba(6, 8, 11, 0.82) 42%, rgba(6, 8, 11, 0.45) 100%),
    linear-gradient(0deg, rgba(6, 8, 11, 0.9) 0%, rgba(6, 8, 11, 0) 45%);
}
.hero-title {
  max-width: 17ch;
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #fff;
  text-wrap: balance;
}
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  min-height: 24px;
  margin-top: 16px;
  color: var(--on-dark-2);
  font-size: var(--text-sm);
  font-weight: 500;
}
.hero-facts span { display: inline-flex; align-items: center; gap: 18px; }
.hero-facts span + span::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); }

/* Finder card */
.finder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.finder-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0 0 2px 6px;
}
.finder .finder-types { margin: 0; }
@media (max-width: 767px) {
  .finder-head { flex-flow: column nowrap; align-items: stretch; padding-left: 0; }
  .finder-head .finder-title { padding: 4px 6px 0; }
}
/* Phones: every type in view, without counts, instead of a clipped scrolling row. */
@media (max-width: 639px) {
  .finder-types { flex-wrap: wrap; gap: 6px; overflow: visible; }
  .finder-types .chip { justify-content: center; min-width: 48px; padding: 0 12px; }
  .finder-types .chip-count { display: none; }
}
.finder-title {
  font-size: var(--text-md);
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
}
.finder-search { grid-column: 1 / -1; }
.finder-search .input { min-height: 56px; padding-left: 46px; font-size: var(--text-base); }
.finder-search > svg { left: 16px; width: 20px; height: 20px; }
.finder .xs-trigger.has-caption { min-height: 56px; }
.finder-submit { grid-column: 1 / -1; min-height: 56px; }
@media (min-width: 1024px) {
  .finder { grid-template-columns: repeat(4, minmax(0, 1fr)) auto; }
  .finder-submit { grid-column: auto; min-width: 140px; }
}
@media (min-width: 1280px) {
  .finder { grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr)) auto; }
  .finder-search { grid-column: auto; }
}
@media (max-width: 639px) {
  .hero { padding: 36px 0 40px; }
  .finder { margin-top: 24px; padding: 10px; gap: 8px; border-radius: 14px; }
  .finder .xs-trigger.has-caption, .finder-search .input, .finder-submit { min-height: 52px; }
}


/* Filter panel (products page) */
.filters {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}
.filters-row { display: flex; gap: 10px; }
.filters-search { flex: 1; min-width: 0; }
.filters-search .input { min-height: 52px; padding-left: 44px; }
.filters-row .btn { min-height: 52px; }
.filters-toggle { display: none; position: relative; }
.filters-toggle .filters-toggle-count {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 700;
}
.filters-more {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.filters-more .xs-trigger.has-caption { min-height: 52px; }
@media (max-width: 1023px) {
  .filters-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .filters { margin-top: -44px; padding: 10px; }
  .filters-row { flex-wrap: wrap; gap: 8px; }
  .filters-toggle { display: inline-flex; flex: 1 0 100%; min-height: 48px !important; }
  .filters-more { margin-top: 8px; gap: 8px; }
  .filters-more.is-collapsed { display: none; }
  .filters-submit-label { display: none; }
  .filters-row .filters-submit { width: 52px; padding: 0; }
}
@media (max-width: 379px) {
  .filters-more { grid-template-columns: 1fr; }
}

/* ---------- Catalogue section ---------- */
.catalog { padding-top: var(--space-12); }
.catalog-head + .type-chips { margin-top: -4px; }
.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: var(--space-5);
}
.catalog-title { font-size: var(--text-2xl); }
.catalog-title .catalog-total { color: var(--text-3); font-weight: 600; }
.catalog-count { display: block; margin-top: 6px; font-size: var(--text-sm); font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.catalog-tools { display: flex; align-items: center; gap: 8px; }
.catalog-sort { width: 236px; }
.xs-inline .xs-trigger.has-caption { min-height: 44px; }
.xs-inline .xs-text { display: flex; align-items: center; gap: 6px; }
.xs-inline .xs-caption { font-size: var(--text-sm); font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-3); }
.xs-inline .xs-caption::after { content: ":"; content: ":" / ""; }
.xs-inline .xs-value { font-size: var(--text-sm); font-weight: 600; }
.view-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); }
.view-toggle button {
  display: grid;
  place-items: center;
  width: 38px; height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
}
.view-toggle button svg { width: 18px; height: 18px; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--ink-900); color: #fff; }
@media (pointer: coarse) { .view-toggle button { width: 44px; height: 42px; } }

.type-chips {
  display: flex;
  gap: 8px;
  min-width: 0;
  margin: 0 0 var(--space-4);
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.type-chips::-webkit-scrollbar { display: none; }
.type-chips .chip { flex: none; }

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--space-5); padding: 0; list-style: none; }

@media (max-width: 767px) {
  .catalog { padding-top: var(--space-8); }
  .catalog-head { align-items: center; }
  .catalog-tools { width: 100%; }
  .catalog-sort { flex: 1; width: auto; }
}

/* ---------- Product grid ---------- */
.pgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.pgrid > .state { grid-column: 1 / -1; }
@media (max-width: 1199px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 899px) { .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
@media (max-width: 559px) { .pgrid { gap: 10px; } }

.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.pcard:not(.is-skeleton):hover { border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pcard:has(.pcard-link:focus-visible) { outline: var(--focus-outline); outline-offset: 2px; }
.pcard-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line);
}
.pcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms var(--ease-out);
}
.pcard:hover .pcard-img { transform: scale(1.035); }
.pcard-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.95) 0 22%, rgba(255, 255, 255, 0) 60%),
    repeating-linear-gradient(135deg, #eef1f4 0 10px, #e8ecf0 10px 20px);
}
.pcard-ph-logo { object-fit: contain; }
.pcard-ph-icon { width: 36px; height: 36px; color: #9aa4b1; }
.pcard-flag { position: absolute; top: 10px; left: 10px; box-shadow: var(--shadow-sm); }

.pcard-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 14px 16px 16px; min-width: 0; }
.pcard-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  font: 600 var(--text-xs)/1 var(--font-body);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pcard-brand-logo { flex: none; object-fit: contain; }
.pcard-title {
  font: 600 var(--text-base)/1.3 var(--font-body);
  font-stretch: 100%;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.pcard-link { color: var(--text); }
.pcard-link:hover { color: var(--text); }
.pcard-link:focus-visible { outline: none; }
.pcard-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.pcard-meta { font-size: 13px; color: var(--text-3); overflow-wrap: anywhere; }
.pcard-types { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 0; padding: 0; list-style: none; }
.pcard-foot { display: grid; gap: 12px; margin-top: auto; padding-top: 12px; }
.pcard-price-wrap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.pcard-price {
  font: 700 1.25rem/1 var(--font-display);
  font-stretch: 105%;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}
.pcard-ref { font: 500 11px/1.2 var(--font-mono); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-actions { position: relative; z-index: 2; display: flex; gap: 8px; }
.pcard-buy { flex: 1; min-width: 0; }
/* Brand blue at rest, black on hover (the reverse of the dark button). */
.btn.pcard-buy:hover { --btn-bg-hover: var(--ink-900); --btn-fg: #fff; border-color: var(--ink-900); }
.pcard-add.is-added { --btn-bg: var(--success-bg); --btn-border: #b9e8cb; --btn-fg: var(--success); --btn-bg-hover: #dcf5e6; }
.pcard-actions .btn-sm { min-height: 40px; }
.pcard-actions .btn-icon.btn-sm { width: 40px; }
@media (pointer: coarse) {
  .pcard-actions .btn-sm { min-height: 44px; }
  .pcard-actions .btn-icon.btn-sm { width: 44px; }
}
.pcard.is-skeleton .pcard-media { border-bottom: 0; border-radius: 0; }
.pcard.is-skeleton .pcard-body { gap: 0; }

@media (max-width: 559px) {
  .pcard-body { gap: 4px; padding: 10px 10px 12px; }
  .pcard-brand { font-size: 10.5px; gap: 6px; }
  .pcard-title { font-size: 14px; }
  .pcard-meta { font-size: 12px; }
  .pcard-types .badge-file { height: 20px; padding: 0 5px; font-size: 10px; }
  .pcard-foot { gap: 10px; padding-top: 8px; }
  .pcard-price-wrap { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pcard-price { font-size: 1.0625rem; }
  .pcard-ref { font-size: 10px; max-width: 100%; }
  .pcard-actions { gap: 6px; }
  .pcard-buy { padding: 0 8px; font-size: 13.5px; }
}

/* List view */
.pgrid[data-view="list"] { grid-template-columns: 1fr; gap: 12px; }
.pgrid[data-view="list"] .pcard { flex-direction: row; }
.pgrid[data-view="list"] .pcard-media { flex: none; width: 240px; aspect-ratio: 4 / 3; border-bottom: 0; border-right: 1px solid var(--line); }
.pgrid[data-view="list"] .pcard-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto 1fr;
  column-gap: 24px;
  padding: 18px 20px;
}
.pgrid[data-view="list"] .pcard-brand, .pgrid[data-view="list"] .pcard-title,
.pgrid[data-view="list"] .pcard-meta, .pgrid[data-view="list"] .pcard-types { grid-column: 1; }
.pgrid[data-view="list"] .pcard-title { font-size: var(--text-md); }
.pgrid[data-view="list"] .pcard-foot {
  grid-column: 2;
  grid-row: 1 / -1;
  align-content: center;
  justify-items: end;
  margin: 0;
  padding: 0;
  min-width: 220px;
}
.pgrid[data-view="list"] .pcard-price-wrap { flex-direction: column; align-items: flex-end; gap: 6px; }
.pgrid[data-view="list"] .pcard-price { font-size: 1.5rem; }
.pgrid[data-view="list"] .pcard-actions { width: 100%; }
.pgrid[data-view="list"] .pcard.is-skeleton .pcard-body { display: flex; }
@media (max-width: 767px) {
  .pgrid[data-view="list"] .pcard-media { width: 116px; aspect-ratio: 1; }
  .pgrid[data-view="list"] .pcard-body { display: flex; padding: 12px; }
  .pgrid[data-view="list"] .pcard-foot { justify-items: stretch; min-width: 0; margin-top: auto; padding-top: 8px; }
  .pgrid[data-view="list"] .pcard-price-wrap { flex-direction: row; align-items: baseline; }
  .pgrid[data-view="list"] .pcard-price { font-size: 1.125rem; }
}

/* ---------- Browse by category ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(var(--cat-cols, 4), minmax(0, 1fr)); gap: 16px; }
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  color: var(--text);
  text-decoration: none;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.cat-card:hover { color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cat-card:focus-visible { outline: 3px solid var(--brand-600); outline-offset: 3px; }
.cat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cat-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--brand);
  color: var(--brand-ink);
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-arrow {
  display: grid;
  flex: none;
  place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-2);
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.cat-arrow svg { width: 16px; height: 16px; }
.cat-card:hover .cat-arrow { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: rotate(-45deg); }
.cat-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 4px; }
.cat-name { font: 700 var(--text-lg)/1.2 var(--font-display); font-stretch: var(--stretch-display); letter-spacing: -0.015em; }
.cat-line { font-size: var(--text-sm); line-height: 1.5; color: var(--text-2); }
.cat-count {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-top: auto;
  padding: 2px 10px;
  border-radius: var(--r-full);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.cat-line { padding-bottom: 10px; }
.cat-count .skeleton { background: var(--brand-100); }
@media (max-width: 1023px) { .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 559px) {
  .cat-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cat-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 32px;
    align-items: center;
    column-gap: 14px;
    padding: 16px;
  }
  .cat-top { display: contents; }
  .cat-icon { grid-area: 1 / 1; width: 44px; height: 44px; }
  .cat-body { grid-area: 1 / 2; }
  .cat-arrow { grid-area: 1 / 3; width: 32px; height: 32px; }
  .cat-name { font-size: var(--text-md); }
  .cat-line { padding-bottom: 6px; }
}

/* Phones: the section's "All ECU files" link becomes a round arrow, like the cards', so the title keeps one line. */
@media (max-width: 559px) {
  #categories .section-head { align-items: center; }
  .head-link { position: relative; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; background: var(--surface); }
  .head-link-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Supported brands ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.brand-tile {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  min-height: 150px;
  padding: 20px 12px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.brand-tile:hover { color: var(--text); border-color: var(--line-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.brand-tile-logo { display: grid; place-items: center; height: 58px; }
.brand-tile-logo img { object-fit: contain; }
.brand-tile-mono {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--ink-900);
  color: #fff;
  font: 800 18px/1 var(--font-display);
  font-stretch: 112%;
}
.brand-tile-name { font-weight: 600; font-size: var(--text-base); line-height: 1.2; }
.brand-tile-count { margin-top: -8px; font-size: var(--text-sm); color: var(--text-3); font-variant-numeric: tabular-nums; }
.brand-grid.is-loading .brand-tile { pointer-events: none; }
@media (min-width: 1100px) {
  .brand-grid:not(.is-loading) { grid-template-columns: repeat(var(--brand-cols, 6), minmax(0, 1fr)); }
}
@media (max-width: 559px) {
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .brand-tile { min-height: 116px; padding: 14px 6px 12px; gap: 8px; }
  .brand-tile-logo { height: 44px; }
  .brand-tile-name { font-size: var(--text-sm); }
  .brand-tile-count { margin-top: -6px; font-size: var(--text-xs); }
}

/* ---------- Why choose ----------
   Open columns under a rule, not cards: nothing here is clickable. */
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 0; padding: 0; list-style: none; }
.why-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 24px;
  border-top: 1px solid var(--line-2);
}
.why-item::before { content: ""; position: absolute; top: -1px; left: 0; width: 48px; height: 2px; background: var(--brand); }
.why-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 48px; height: 48px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3da5ee 0%, #0f74bd 100%);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(15, 116, 189, 0.55);
}
.why-icon svg { width: 24px; height: 24px; }
.why-title { font-size: var(--text-md); line-height: 1.3; letter-spacing: -0.01em; }
.why-text { font-size: var(--text-sm); line-height: 1.55; color: var(--text-2); }
@media (max-width: 1023px) { .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; } }
@media (max-width: 559px) {
  .why-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .why-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
    column-gap: 14px;
    row-gap: 2px;
    padding: 18px 0;
  }
  .why-item:last-child { padding-bottom: 0; }
  .why-icon { grid-row: 1 / span 2; width: 44px; height: 44px; margin: 0; }
  .why-title { align-self: end; }
}

/* ==========================================================================
   Homepage: the owner's original look for section titles and category cards
   ========================================================================== */
.legacy-title {
  position: relative;
  display: inline-block;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Tahoma, Geneva, Verdana, sans-serif;
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 800;
  font-stretch: 100%;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: #111827;
}
.legacy-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 40px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, #3da5ee, rgba(0, 0, 0, 0));
  transform: translateX(-20px);
}
.old-cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; }
.old-cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 260px;
  padding: 30px 18px 22px;
  border-left: 4px solid rgba(15, 102, 208, 0.22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(230, 240, 249, 0.8), rgba(249, 251, 252, 0.96));
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-left-color 0.22s ease, background 0.22s ease;
}
.old-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(15, 102, 208, 0.12);
  border-left-color: rgba(15, 102, 208, 0.48);
  background: linear-gradient(180deg, rgba(15, 102, 208, 0.07), rgba(255, 255, 255, 0.98));
}
.old-cat-card h3 {
  margin: 0 0 10px;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0b223b;
}
.old-cat-card p { flex: 1; margin: 0 0 20px; font-size: 1.02rem; line-height: 1.5; color: #3d536a; }
.old-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0e7ae6, #0a5fc5);
  color: #fff;
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(14, 122, 230, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.old-cat-btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 24px rgba(14, 122, 230, 0.28); filter: brightness(1.04); }
.old-cat-btn:focus-visible { outline: var(--focus-outline); outline-offset: 3px; }
@media (max-width: 1023px) { .old-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; } }
@media (max-width: 599px) {
  .old-cat-grid { grid-template-columns: 1fr; gap: 14px; }
  .old-cat-card { min-height: 0; padding: 24px 16px 20px; }
}
/* Phones: the finder title and the file types are centred. */
@media (max-width: 767px) {
  .finder-head { align-items: center; text-align: center; }
  .finder-head .finder-types { justify-content: center; }
}
