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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f4f6f8;
    color: #333;
    line-height: 1.6;
}

a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

a:hover {
    color: #1d4ed8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header */
.site-header {
    background: #1e293b;
    color: #fff;
    padding: 12px 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.logo span {
    color: #3b82f6;
}

.logo:hover {
    color: #fff;
    text-decoration: none;
}

.search-form {
    display: flex;
    position: relative;
    width: 100%;
    max-width: 480px;
    gap: 0;
}

.search-form input {
    width: 100%;
    padding: 11px 48px 11px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    font-size: 15px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
    transition: all .25s ease;
    font-family: inherit;
    -webkit-appearance: none;
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.55);
}

.search-form input:focus {
    border-color: #60a5fa;
    background: rgba(255,255,255,0.18);
    box-shadow: 0 0 0 3px rgba(96,165,250,0.3);
}

.search-form button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
    flex-shrink: 0;
}

.search-form button:hover {
    background: #2563eb;
    transform: scale(1.05);
}

.search-form button:active {
    transform: scale(0.95);
}

.search-form button .btn-label {
    display: none;
}

@media (min-width: 600px) {
    .search-form {
        gap: 8px;
    }

    .search-form button {
        position: static;
        width: auto;
        height: auto;
        border-radius: 50px;
        padding: 0 22px;
        gap: 6px;
        transform: none;
    }

    .search-form button .btn-label {
        display: inline;
    }

    .search-form input {
        padding-right: 18px;
    }
}

/* Mobile header search - full width, cleaner look */
@media (max-width: 599px) {
    .search-form input {
        padding: 13px 50px 13px 18px;
        font-size: 16px;
        background: rgba(255,255,255,0.15);
        border-color: rgba(255,255,255,0.1);
    }

    .search-form input:focus {
        background: rgba(255,255,255,0.22);
    }

    .search-form button {
        width: 43px;
        height: 36px;
        right: 2px;
    }
}

/* Filter search on category page */
.filter-search {
    margin-bottom: 16px;
    display: flex;
    width: 100%;
}

.filter-row {
    display: flex;
    width: 100%;
    gap: 3px;
}

.filter-row input {
    flex: 1;
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    min-width: 0;
}

.filter-row select {
    padding: 8px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: inherit;
    cursor: pointer;
    max-width: 260px;
}

.filter-row select:focus {
    border-color: #3b82f6;
    outline: none;
}

.filter-row button {
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    white-space: nowrap;
}

.filter-row button:hover {
    background: #1d4ed8;
}

.filter-clear {
    padding: 8px 16px;
    background: #e2e8f0;
    color: #475569;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    white-space: nowrap;
    text-decoration: none;
}

.filter-clear:hover {
    background: #cbd5e1;
    text-decoration: none;
}

/* Nav */
.nav-bar {
    background: #334155;
}

.nav-bar ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.nav-bar li a {
    display: block;
    padding: 10px 20px;
    color: #cbd5e1;
    font-size: 14px;
    text-decoration: none;
}

.nav-bar li a:hover {
    background: #475569;
    color: #fff;
    text-decoration: none;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    padding-top: 24px;
    padding-bottom: 40px;
}

.main-layout.full-width {
    grid-template-columns: 1fr;
}

/* Sidebar */
.sidebar-section {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.sidebar-section + .sidebar-section {
    margin-top: 16px;
}

.sidebar-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.category-list {
    list-style: none;
}

.category-list li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
}

.category-list li a:hover {
    color: #2563eb;
    text-decoration: none;
}

.category-list li a .count {
    margin-left: auto;
    font-size: 12px;
    color: #64748b;
}

/* Screen-reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Skip to content */
.skip-link {
    position: absolute;
    top: -100%;
    left: 8px;
    z-index: 1000;
    padding: 8px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 0 0 6px 6px;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.1s;
}
.skip-link:focus {
    top: 0;
    color: #fff;
    text-decoration: none;
}

/* Content */
.content {
    min-height: 400px;
}



/* Hero */
.hero {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #fff;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.hero p {
    color: #cbd5e1;
    font-size: 16px;
}

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

.category-card {
    background: #fff;
    padding: 24px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.15s, box-shadow 0.15s;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    text-decoration: none;
}

.category-card .icon {
    font-size: 32px;
    color: #3b82f6;
    margin-bottom: 8px;
}

.category-card h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.category-card .count {
    font-size: 13px;
    color: #475569;
}

/* Sections */
.home-lists {
    display: grid;
    content-visibility: auto;
    contain-intrinsic-size: 500px;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

.popular-vendors,
.popular-notebooks {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.popular-vendors h2,
.popular-notebooks h2 {
    font-size: 18px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.popular-vendors ul,
.popular-notebooks ul {
    list-style: none;
}

.popular-vendors li,
.popular-notebooks li {
    padding: 6px 0;
    font-size: 14px;
}

.popular-vendors li a,
.popular-notebooks li a {
    display: block;
}

/* Page heading */
.content h1 {
    line-height: 1.3;
    margin-bottom: 10px;
    font-size: 30px;
}

/* Page description */
.page-description {
    margin-bottom: 24px;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 16px;
    font-size: 14px;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.breadcrumb li + li::before {
    content: ' / ';
    color: #94a3b8;
    padding: 0 4px;
}

.breadcrumb li span {
    color: #485465;
}

/* Notebook page filters */
.notebook-filters {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.notebook-filters h2 {
    margin: 0;
    font-size: 17px;
    min-width: 0;
}

.filter-controls {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.filter-controls select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
}

.filter-controls select:focus {
    border-color: #3b82f6;
    outline: none;
}

/* Driver Table */
.driver-table {
    overflow-x: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

tbody tr:hover {
    background: #f8fafc;
}

.th-download {
    width: 50px;
    text-align: center;
}

.td-download {
    text-align: center;
    vertical-align: middle;
}

.driver-name,
.driver-name-btn {
    cursor: pointer;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: 0;
}

.driver-name:hover,
.driver-name-btn:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

.driver-name i,
.driver-name-btn i {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.15s;
}

.driver-name-btn {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: inherit;
    line-height: inherit;
    color: #2563eb;
    text-align: left;
    width: 100%;
}

.driver-name-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 2px;
}

.btn-download-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    border: 0;
    outline: 0;
    cursor: pointer;
    font-size: 15px;
    padding: 0;
    line-height: 1;
}

.btn-download-sm:hover {
    background: #1d4ed8;
    color: #fff;
}

.btn-download-sm:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Promo Card */
.promo-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: 20px 24px;
    margin: 20px 0;
}

.promo-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #2563eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

h2 {
    word-break: break-all;
}

.promo-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    word-break: break-all;
}

.promo-body p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
}

.btn-promo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.15s;
}

.btn-promo:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.driver-details {
    display: none;
}

.driver-details.visible {
    display: table-row;
}

.driver-details td {
    padding: 4px 16px 16px 16px;
    background: #f8fafc;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 32px;
    padding: 16px 20px;
    border-left: 2px solid #2563eb;
    background: #fff;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 4px 0;
}

.detail-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-label::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: #2563eb;
    width: 14px;
    content: "\f02e";
}

.detail-item:nth-child(1) .detail-label::before { content: "\f02e"; }
.detail-item:nth-child(2) .detail-label::before { content: "\f067"; }
.detail-item:nth-child(3) .detail-label::before { content: "\f2bb"; }
.detail-item:nth-child(4) .detail-label::before { content: "\f15c"; }
.detail-item:nth-child(5) .detail-label::before { content: "\f109"; }
.detail-item:nth-child(6) .detail-label::before { content: "\f2db"; }

.detail-value {
    font-size: 14px;
    color: #1e293b;
    padding-left: 19px;
}

.detail-value a {
    color: #2563eb;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.detail-value a.device-link {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
}

.detail-value a code {
    color: inherit;
    background: #dbeafe;
}

.detail-value code {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.pagination ul {
    list-style: none;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.pagination li a,
.pagination li span {
    display: block;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    min-height: 38px;
    line-height: 1.4;
}

.pagination li a:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.pagination li a:hover {
    background: #f1f5f9;
    text-decoration: none;
}

.pagination li span.current {
    background: #3b82f6;
    color: #fff;
    border-color: #3b82f6;
}

.pagination li span.ellipsis {
    border: none;
    padding: 8px 4px;
}

/* Vendor List */
.vendor-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.vendor-item,
.notebook-item {
    display: block;
    background: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    text-decoration: none;
    color: #333;
}

.vendor-item:hover,
.notebook-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    text-decoration: none;
}

.vendor-item .name,
.notebook-item .name {
    font-weight: 500;
}

.vendor-item .count {
    font-size: 13px;
    color: #64748b;
}

/* Notebook List */
.notebook-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Detail */
.driver-detail {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.driver-detail h1,
.device-page-h1 {
    font-size: 22px;
    margin-bottom: 16px;
    word-break: break-all;
}

.detail-table {
    margin-bottom: 20px;
}

.detail-table th {
    width: 180px;
    font-weight: 600;
    color: #475569;
    padding: 8px 16px 8px 0;
    vertical-align: top;
    text-align: left;
}

.detail-table td {
    padding: 8px 0;
}

code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.download-section {
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    border: 0;
    outline: 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    line-height: 1;
}

.btn-download:hover {
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
}

.btn-download:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.related-drivers {
    margin-top: 24px;
    margin-bottom: 24px;
}

.related-drivers h2 {
    font-size: 17px;
    margin: 0 0 10px;
}

.related-drivers ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.related-drivers li a {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #2563eb;
    text-decoration: none;
}

.related-drivers li a:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.download-note {
    margin-top: 8px;
    font-size: 13px;
    color: #64748b;
}

/* Filter */
.filter-class {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.filter-class h3 {
    font-size: 14px;
    margin-bottom: 8px;
}

.filter-class ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-class li a {
    display: inline-block;
    padding: 4px 12px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
}

.filter-class li a:hover {
    background: #e2e8f0;
    text-decoration: none;
}

.filter-class li a.active {
    background: #3b82f6;
    color: #fff;
}

/* Search Form Large */
.search-form-large {
    margin-bottom: 24px;
}

.search-row {
    display: flex;
    gap: 0;
}

.search-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
}

.search-row input:focus {
    outline: none;
    border-color: #3b82f6;
}

.search-row button {
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
}

.search-row button:hover {
    background: #2563eb;
}

/* Error */
.error-page {
    text-align: center;
    padding: 80px 20px;
}

.error-page h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.error-page p {
    font-size: 18px;
    color: #64748b;
    margin-bottom: 24px;
}

/* Footer */
.site-footer {
    background: #1e293b;
    color: #94a3b8; /* #94a3b8 on #1e293b = 5.1:1, passes AA */
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-copy {
    font-size: 13px;
}

/* Cookie notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #cbd5e1;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 9999;
    border-top: 1px solid #334155;
    font-size: 14px;
}

.cookie-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.cookie-text a {
    color: #60a5fa;
    text-decoration: underline;
}

.cookie-text a:hover {
    color: #93c5fd;
}

.cookie-btn {
    flex-shrink: 0;
    padding: 8px 20px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    min-height: 36px;
}

.cookie-btn:hover {
    background: #2563eb;
}

/* Static pages */
.static-page {
    background: #fff;
    padding: 28px 32px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    line-height: 1.8;
}

.static-page h2 {
    font-size: 18px;
    margin: 24px 0 12px;
    color: #1e293b;
}

.static-page p {
    margin-bottom: 16px;
    color: #475569;
}

.static-page ul {
    margin: 0 0 16px 24px;
    color: #475569;
}

.static-page li {
    margin-bottom: 8px;
}

.contact-email {
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 600px) {
    .static-page {
        padding: 20px;
    }

    .cookie-notice {
        flex-direction: column;
        padding: 12px 16px;
        gap: 10px;
    }

    .cookie-btn {
        width: 100%;
    }
}

/* Focus-visible for all interactive elements */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
select:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* Search page — hide sidebar earlier to prevent overflow */
@media (max-width: 1024px) {
    .main-layout:has(.search-table) .sidebar {
        display: none;
    }
    .main-layout:has(.search-table) {
        grid-template-columns: 1fr;
    }
}

/* Touch-friendly minimum heights */
select,
input,
button,
.pagination a,
.pagination span:not(.ellipsis),
.filter-clear {
    min-height: 44px;
}

.filter-controls select {
    min-height: 44px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .search-form input {
        min-width: 140px;
    }

    .home-lists {
        grid-template-columns: 1fr;
    }

    .grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .notebook-list {
        grid-template-columns: 1fr;
    }

    .vendor-list {
        grid-template-columns: 1fr;
    }

    .filter-row {
        flex-direction: column;
        gap: 6px;
    }

    .filter-row input,
    .filter-row select {
        max-width: 100%;
    }

    .filter-row button,
    .filter-clear {
        width: 100%;
        text-align: center;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .driver-detail {
        padding: 16px;
    }

    .detail-table,
    .detail-table tbody,
    .detail-table tr {
        display: block;
    }

    .detail-table th {
        width: 100%;
        display: block;
        padding: 8px 0 2px;
        font-size: 12px;
    }

    .detail-table td {
        display: block;
        padding: 2px 0 8px;
    }

    .driver-detail h1 {
        font-size: 18px;
    }

    .device-page-h1 {
        font-size: 18px;
    }

    .hero {
        padding: 24px 20px;
    }

    .hero h1 {
        font-size: 22px;
    }

    .pagination li a,
    .pagination li span {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .promo-card {
        flex-direction: column;
        padding: 16px;
    }

    .notebook-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-controls {
        margin-left: 0;
        width: 100%;
    }

    .filter-controls select {
        flex: 1;
        min-width: 0;
    }

    .content h1 {
        font-size: 20px;
    }

    .content {
        padding-top: 4px;
    }

    .td-download .btn-download-sm {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .error-page h1 {
        font-size: 32px;
    }

    .page-description {
        font-size: 14px;
    }

    .site-header .container {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        max-width: 100%;
    }

    .nav-bar ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-bar li a {
        white-space: nowrap;
        padding: 12px 16px;
    }

    /* Hide non-essential table columns on small screens */
    .cat-table .hide-mobile,
    .search-table .hide-mobile {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 20px 16px;
    }

    .category-card {
        padding: 16px 12px;
    }

    .category-card .icon {
        font-size: 28px;
    }

    .category-card h3 {
        font-size: 14px;
    }

    .vendor-item,
    .notebook-item {
        padding: 10px 14px;
    }

    .breadcrumb {
        font-size: 13px;
    }
}

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

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