/* ============================================
   DRIVERFILES.NET - UNIFIED STYLESHEET
   Version: 2.0 (Redesign 2025)
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg: #ffffff;
  --bg-alt: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-page: #f3f4f8;
  --border-soft: #e2e4ee;
  --border: #e5e7eb;
  --accent: #ffb400;
  --accent-soft: #ffcf4d;
  --accent-dark: #b45309;
  --anchor: #0f172a;
  --text: #111827;
  --text-soft: #6b7280;
  --text-muted: #9ca3af;
  --link: #2563eb;
  --link-hover: #1d4ed8;
  --danger: #ef4444;
  --tag-new: #22c55e;
  --tag-updated: #2563eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;
  --shadow-soft: 0 16px 36px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 10px 24px rgba(15, 23, 42, 0.06);
  --shadow-btn: 0 8px 20px rgba(234, 179, 8, 0.45);
  --shadow-btn-hover: 0 10px 26px rgba(234, 179, 8, 0.55);
  --max-width: 1120px;
  --transition: 0.18s ease-out;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, monospace;
  
  /* Outbyte affiliate green for CTAs */
  --cta-green: #04b35c;
  --cta-green-hover: #039454;
}

/* --- Reset & Base --- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg-page);
  color: var(--text);
  font-family: var(--font-main);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

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

p {
  margin: 0 0 1em;
}

ul, ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

/* --- Layout --- */
.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.main-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* --- Header --- */
header {
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffffff, #d4d7e0);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(148, 163, 184, 0.4),
    0 8px 18px rgba(148, 163, 184, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.logo-text-main {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 15px;
  text-transform: uppercase;
}

.logo-text-sub {
  font-size: 11px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  font-size: 13px;
  color: var(--text-soft);
}

.nav-link:hover {
  color: var(--link);
}

/* --- Header Search --- */
.header-search {
  flex: 1;
  max-width: 400px;
  display: flex;
  align-items: center;
  background: #f4f4f5;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: all 0.2s ease;
}

.header-search:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.1);
}

.header-search-input {
  flex: 1;
  padding: 8px 16px;
  font-size: 13px;
  border: none;
  background: transparent;
  outline: none;
}

.header-search-input::placeholder {
  color: var(--text-soft);
}

.header-search-btn {
  padding: 8px 14px;
  background: var(--yellow);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background 0.2s ease;
}

.header-search-btn:hover {
  background: var(--yellow-dark);
}

@media (max-width: 768px) {
  .header-search {
    display: none;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition), border-color var(--transition),
    color var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary,
.btn-cta {
  background: var(--cta-green);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(4, 179, 92, 0.45);
  border-color: var(--cta-green);
}

.btn-primary:hover,
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(3, 140, 72, 0.6);
  background: var(--cta-green-hover);
  color: #ffffff;
}

.btn-ghost {
  border-color: var(--border);
  background: var(--bg);
  color: var(--text-soft);
}

.btn-ghost:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  color: var(--text);
}

.btn-outline {
  border-color: #d1d5db;
  background: var(--bg);
  color: var(--text-soft);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: #f9fafb;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.breadcrumb a {
  color: var(--text-soft);
}

.breadcrumb a:hover {
  color: var(--link);
}

.breadcrumb-sep {
  color: var(--text-muted);
}

/* --- Sections --- */
.section {
  margin-top: 6px;
  background: var(--bg-alt);
  border-radius: var(--radius-xl);
  padding: 18px 18px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.section-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.section-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.chip {
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  padding: 3px 9px;
  font-size: 11px;
  color: var(--text-soft);
  background: #f9fafb;
}

/* --- Hero (Homepage) --- */
.hero {
  margin-top: 10px;
  padding: 24px 20px 26px;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at top left, rgba(226, 232, 240, 0.7), transparent 55%),
    var(--bg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1.6fr);
  gap: 24px;
}

.hero-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-kicker {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.hero-title {
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
  color: var(--anchor);
}

.hero-sub {
  font-size: 14px;
  color: var(--text-soft);
  max-width: 520px;
}

.hero-search-link {
  font-size: 14px;
  color: var(--link);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.hero-search-link:hover {
  color: var(--yellow-dark);
  text-decoration: underline;
}

.hero-search-wrap {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-note {
  font-size: 12px;
  color: var(--text-soft);
}

/* --- Search Bar --- */
.search-bar {
  display: flex;
  align-items: stretch;
  background: #f9fafb;
  border-radius: var(--radius-full);
  padding: 3px;
  border: 1px solid #d1d5db;
}

.search-input {
  border: none;
  outline: none;
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-button {
  border: none;
  border-radius: var(--radius-full);
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  background: linear-gradient(to right, #e0f2fe, #bfdbfe);
  color: #0f172a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
  transition: transform var(--transition), box-shadow var(--transition),
    background var(--transition);
}

.search-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.45);
  background: linear-gradient(to right, #dbeafe, #bfdbfe);
}

/* --- Hero Side Panel --- */
.hero-side {
  border-radius: var(--radius-lg);
  background: #ffffff;
  border: 1px solid #d1fae5;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.hero-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(4, 179, 92, 0.06), transparent 55%);
  pointer-events: none;
}

.hero-side-inner {
  position: relative;
  z-index: 1;
}

.hero-side-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--anchor);
}

.hero-side-text {
  font-size: 13px;
  color: #1f2937;
  margin-bottom: 6px;
}

.hero-benefits {
  font-size: 12px;
  color: #374151;
  margin: 0 0 10px;
  padding-left: 16px;
}

.hero-benefits li {
  margin-bottom: 3px;
}

.hero-side-footnote {
  font-size: 11px;
  color: #4b5563;
  margin-top: 8px;
}

/* --- Device Grid --- */
.device-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.device-card {
  border-radius: var(--radius-md);
  background: #f9fafb;
  border: 1px solid var(--border);
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition);
  min-height: 64px;
  text-decoration: none;
  color: inherit;
}

.device-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  border-color: #d4d4d8;
  background: var(--bg);
  color: inherit;
}

.device-label {
  font-size: 13px;
  font-weight: 600;
}

.device-meta {
  font-size: 11px;
  color: var(--text-soft);
}

/* --- Driver List – GRID version --- */
.drivers-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.driver-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  min-height: 92px;
}

.driver-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.driver-name {
  font-size: 13px;
  font-weight: 600;
}

.driver-meta {
  font-size: 11px;
  color: var(--text-soft);
}

.driver-tags {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.driver-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* --- Tags (NEW / UPDATED) --- */
.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.tag-new {
  background: var(--tag-new);
  color: #ffffff;
}

.tag-updated {
  background: var(--tag-updated);
  color: #ffffff;
}

/* --- Brand Grid --- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.brand-card {
  border-radius: var(--radius-md);
  background: #f9fafb;
  border: 1px solid var(--border);
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition),
    color var(--transition);
  text-decoration: none;
  color: inherit;
}

.brand-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
  border-color: #facc15;
  background: var(--bg);
  color: var(--accent-dark);
}

.brand-logo {
  font-weight: 600;
}

.brand-meta {
  font-size: 11px;
  color: var(--text-soft);
}

/* --- CTA Wide Banner --- */
.cta-wide {
  margin-top: 6px;
  border-radius: var(--radius-lg);
  padding: 18px 18px 16px;
  background: linear-gradient(to right, #e8fff3, #d1fae5);
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1.4fr);
  gap: 18px;
  color: #1f2933;
  box-shadow: var(--shadow-soft);
  border: 1px solid #bbf7d0;
}

.cta-wide-text {
  font-size: 14px;
  color: #374151;
}

.cta-wide-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--anchor);
}

.cta-bullets {
  font-size: 12px;
  margin: 8px 0 10px;
  padding-left: 16px;
}

.cta-bullets li {
  margin-bottom: 2px;
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-full);
  padding: 4px 10px;
  font-size: 11px;
  background: rgba(209, 250, 229, 0.9);
}

.cta-wide-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.cta-wide-panel {
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #bbf7d0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: #374151;
  max-width: 260px;
}

.cta-wide-panel span {
  font-weight: 600;
}

/* --- Pagination --- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 13px;
}

.page-link {
  padding: 5px 9px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-soft);
  cursor: pointer;
  min-width: 30px;
  text-align: center;
  text-decoration: none;
}

.page-link.active {
  border-color: var(--link);
  color: var(--link);
  font-weight: 600;
  background: #eff6ff;
}

.page-link:hover {
  border-color: var(--text-muted);
}

/* --- Category List --- */
.category-list {
  columns: 2;
  column-gap: 28px;
}

.category-item {
  break-inside: avoid;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text-soft);
}

.category-item a {
  color: var(--text-soft);
}

.category-item a:hover {
  color: var(--link);
}

/* --- SEO Block --- */
.seo-block {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
  margin-top: 4px;
}

.seo-more {
  display: none;
  margin-top: 6px;
}

.seo-toggle {
  margin-top: 10px;
  font-size: 12px;
  color: var(--link);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --- Category Description --- */
.category-description {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* --- Content Box (static pages) --- */
.content-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 32px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-soft);
}

.content-box h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 12px 0;
}

.content-box h2:first-child {
  margin-top: 0;
}

.content-box p {
  margin: 0 0 16px 0;
}

.content-box p:last-child {
  margin-bottom: 0;
}

.content-box a {
  color: var(--link);
  text-decoration: none;
}

.content-box a:hover {
  text-decoration: underline;
}

/* --- Manufacturer Grid (4 columns, 16 items) --- */
.manufacturer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.manufacturer-card {
  border-radius: var(--radius-md);
  background: #f9fafb;
  border: 1px solid var(--border);
  padding: 10px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition), background var(--transition);
  text-decoration: none;
  color: inherit;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.manufacturer-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  border-color: #d4d4d8;
  background: var(--bg);
  color: inherit;
}

@media (max-width: 880px) {
  .manufacturer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .manufacturer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }
  
  .manufacturer-card {
    padding: 6px 4px;
    font-size: 11px;
  }
}

/* --- Related Blocks --- */
.related-block {
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 20px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.related-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--accent-dark);
}

.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.link-list a {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid var(--border);
  font-size: 13px;
  color: #374151;
  transition: 0.15s;
  text-decoration: none;
}

.link-list a:hover {
  background: var(--bg);
  border-color: #d4d4d8;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* --- Download Buttons --- */
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

/* --- Ad Placeholder --- */
.ad-placeholder {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px dashed #d1d5db;
  padding: 10px;
  text-align: center;
  font-size: 11px;
  color: var(--text-soft);
  background: #f9fafb;
}

/* --- Contact Page --- */
.contact-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: 0 8px 20px rgba(15,23,42,0.05);
  margin-bottom: 24px;
}

.contact-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--accent-dark);
}

.contact-sub {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.contact-list li {
  margin-bottom: 8px;
  font-size: 14px;
  color: #374151;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid #d1d5db;
  font-size: 14px;
  background: #f9fafb;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--text-muted);
  background: var(--bg);
}

.contact-form textarea {
  height: 140px;
  resize: vertical;
}

.faq-item {
  margin-bottom: 16px;
}

.faq-question {
  font-weight: 600;
  margin-bottom: 4px;
  color: #374151;
}

.faq-answer {
  font-size: 14px;
  color: var(--text-soft);
}

/* --- Manufacturer Hero --- */
.manu-hero {
  margin-top: 6px;
  padding: 22px 20px 20px;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(circle at top left, rgba(191, 219, 254, 0.4), transparent 60%),
    var(--bg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: minmax(0, 2.4fr) minmax(260px, 1.6fr);
  gap: 20px;
}

.manu-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manu-kicker {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--link);
}

.manu-title {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0;
}

.manu-sub {
  font-size: 14px;
  color: var(--text-soft);
  max-width: 480px;
}

.manu-side {
  border-radius: var(--radius-lg);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.manu-side::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.2), transparent 55%);
  opacity: 0.7;
  pointer-events: none;
}

.manu-side-inner {
  position: relative;
  z-index: 1;
}

.manu-side-title {
  font-size: 14px;
  font-weight: 600;
}

.manu-side-text {
  font-size: 13px;
  color: #1e40af;
  margin-bottom: 6px;
}

.manu-side-meta {
  font-size: 11px;
  color: #3b82f6;
  margin-top: 8px;
}

/* --- Footer --- */
footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 18px 0 20px;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: var(--text-soft);
}

.footer-links a:hover {
  color: var(--link);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--cta-green);
  cursor: pointer;
}

.footer-cta span {
  font-size: 12px;
}

/* --- Utility Classes --- */
.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

.read-more {
  cursor: pointer;
  color: var(--link);
  font-size: 13px;
}

/* --- Responsive --- */
@media (max-width: 880px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .manu-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .cta-wide {
    grid-template-columns: minmax(0, 1fr);
  }
  .drivers-list {
    grid-template-columns: repeat(2, 1fr);
  }
  .driver-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .drivers-list {
    grid-template-columns: 1fr;
  }
  .nav {
    padding-inline: 14px;
  }
  .hero {
    padding: 20px 16px 20px;
  }
  .section {
    padding: 16px 14px 12px;
  }
  .cta-wide {
    padding: 16px 14px 14px;
  }
  .category-list {
    columns: 1;
  }
  .hero-title {
    font-size: 22px;
  }
  .hero-sub {
    font-size: 13px;
  }
  .nav-cta {
    gap: 8px;
  }
  .search-bar {
    flex-direction: column;
    padding: 4px;
    border-radius: var(--radius-lg);
  }
  .search-button {
    width: 100%;
    justify-content: center;
  }
  .device-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   ADDITIONAL STYLES FOR FIXED TEMPLATES
   ============================================ */

/* Category list with 4 columns */
.category-list-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 16px;
}

@media (max-width: 880px) {
  .category-list-4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Pagination styles */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  justify-content: center;
}

.pagination .page-link {
  padding: 8px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.18s ease-out;
}

.pagination .page-link:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}

.pagination .page-current {
  padding: 8px 12px;
  background: var(--yellow);
  border: 1px solid var(--yellow);
  border-radius: 8px;
  color: var(--dark);
  font-weight: 600;
  font-size: 14px;
}

.pagination .page-ellipsis {
  padding: 8px 4px;
  color: var(--text-soft);
}

/* Alert styles */
.alert {
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.alert-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}

/* Trademark note */
.trademark-note {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 16px;
}

/* No results */
.no-results {
  text-align: center;
  padding: 40px 20px;
}

.no-results-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.no-results-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.no-results-text {
  color: var(--text-soft);
  margin-bottom: 12px;
}

.no-results-tips {
  text-align: left;
  display: inline-block;
  color: var(--text-soft);
  font-size: 14px;
}

.no-results-tips li {
  margin-bottom: 4px;
}

/* Form groups */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out;
}

.form-input:focus {
  outline: none;
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.15);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

/* Contact note */
.contact-note {
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 12px;
  margin-bottom: 20px;
  color: #92400e;
  font-size: 14px;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 8px;
}

.tag-new {
  background: #dcfce7;
  color: #166534;
}

.tag-updated {
  background: #dbeafe;
  color: #1e40af;
}

.tag-featured {
  background: #fef3c7;
  color: #92400e;
}

/* Text center utility */
.text-center {
  text-align: center;
}

/* Driver info grid for driver.show.tpl */
.driver-info-grid {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.driver-info-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.driver-info-row:last-child {
  border-bottom: none;
}

.driver-info-label {
  width: 160px;
  font-weight: 500;
  color: var(--text-soft);
}

.driver-info-value {
  flex: 1;
  word-break: break-word;
}

.driver-info-value a {
  color: var(--text);
  text-decoration: none;
}

.driver-info-value a:hover {
  color: var(--yellow-dark);
}

/* Download form wrap */
.download-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
}

.captcha-section {
  max-width: 300px;
}

.captcha-label {
  font-weight: 500;
  margin-bottom: 12px;
}

.captcha-image {
  margin-bottom: 12px;
}

.captcha-input {
  margin-bottom: 16px;
}

.captcha-input label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.captcha-input input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
}

/* Driver content */
.driver-content {
  line-height: 1.7;
}

.driver-content p {
  margin-bottom: 12px;
}

/* Feedback popup */
.feedback-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feedback-popup-inner {
  background: var(--white);
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.feedback-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.feedback-note {
  font-size: 14px;
  color: var(--text-soft);
  margin-bottom: 16px;
}

.feedback-close {
  text-align: center;
  margin-top: 16px;
}

.feedback-close a {
  color: var(--text-soft);
  font-size: 14px;
}

/* ============================================
   DRIVER LIST LINKS
   ============================================ */

/* Driver name links */
.driver-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.18s ease-out;
}

.driver-link:hover {
  color: var(--yellow-dark);
  text-decoration: underline;
}

/* Meta links (device type, etc.) */
.meta-link {
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.18s ease-out;
}

.meta-link:hover {
  color: var(--yellow-dark);
  text-decoration: underline;
}

/* ============================================
   DEVICE GRID - 8 COLUMNS (ONE ROW)
   ============================================ */

.device-grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.device-grid-8 .device-card {
  padding: 16px 12px;
  text-align: center;
}

.device-grid-8 .device-label {
  font-size: 13px;
}

@media (max-width: 1024px) {
  .device-grid-8 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .device-grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   CATEGORY GRID (for manufacturer pages)
   ============================================ */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.18s ease-out;
  text-align: center;
}

.category-card:hover {
  border-color: var(--yellow);
  background: #fffbeb;
  transform: translateY(-2px);
}

.category-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}

.category-count {
  font-size: 12px;
  color: var(--text-soft);
}

/* Breadcrumb */
.breadcrumb {
  padding: 12px 20px;
  font-size: 13px;
  color: var(--text-soft);
  background: #f9fafb;
  border-bottom: 1px solid var(--border);
}

.breadcrumb a {
  color: var(--text-soft);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--yellow-dark);
  text-decoration: underline;
}

/* About text */
.about-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}

.about-text p {
  margin-bottom: 12px;
}

.about-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Related Drivers Grid - Fixed */
.related-drivers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .related-drivers-grid {
    grid-template-columns: 1fr;
  }
}

.related-driver-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  overflow: hidden;
}

.related-driver-title {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.related-driver-title a {
  text-decoration: none;
}

.related-driver-title a:hover {
  text-decoration: underline;
}

.related-driver-meta {
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 12px;
  line-height: 1.4;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.related-driver-action {
  margin-top: auto;
}

/* =============================================
   DRIVER FEEDBACK SECTION
   ============================================= */
.feedback-card {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
}

.feedback-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.feedback-question {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.feedback-actions {
  display: flex;
  gap: 10px;
}

.feedback-btn-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.feedback-btn-new:hover {
  border-color: var(--accent);
  background: #fffbf5;
}

.feedback-btn-new.feedback-yes:hover {
  border-color: #22c55e;
  background: #f0fdf4;
  color: #16a34a;
}

.feedback-btn-new.feedback-no:hover {
  border-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}

.feedback-btn-new svg {
  flex-shrink: 0;
}

.feedback-num {
  background: #e2e8f0;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  min-width: 20px;
  text-align: center;
}

.feedback-num:empty {
  display: none;
}

.feedback-thanks {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #22c55e;
  font-weight: 500;
  font-size: 14px;
}

.feedback-voted {
  color: #64748b;
  font-size: 14px;
  font-style: italic;
}

@media (max-width: 600px) {
  .feedback-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .feedback-actions {
    width: 100%;
  }
  
  .feedback-btn-new {
    flex: 1;
    justify-content: center;
  }
}
