/* --- CSS VARIABLES --- */
:root {
    --primary-blue: #0F4C81; /* Trust Blue */
    --accent-green: #28A745; /* Safety Green */
    --light-bg: #F8F9FA;
    --white: #ffffff;
    --text-dark: #2C3E50;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

/* --- HEADER --- */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 50px;
    width: auto;
}

nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

nav a:hover {
    color: var(--primary-blue);
}

/* --- HERO --- */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0a2e4d 100%);
    color: var(--white);
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.search-box {
    background: var(--white);
    padding: 8px;
    border-radius: 50px;
    display: flex;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    gap: 8px;
}

.category-select {
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 0.9rem;
    border-radius: 50px;
    background: #f8f9fa;
    color: var(--text-dark);
    cursor: pointer;
    font-weight: 600;
    min-width: 140px;
    flex-shrink: 0;
}

.category-select:hover {
    background: #e9ecef;
}

.search-box input {
    border: none;
    outline: none;
    padding: 12px 20px;
    flex-grow: 1;
    font-size: 1rem;
    border-radius: 50px;
    color: var(--text-dark);
}

.search-box button {
    background: var(--accent-green);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: background 0.2s;
}

.search-box button:hover {
    background: #218838;
}

/* --- FILTERS & TABLE --- */
.container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
    flex: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.last-updated {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* Filter Tabs */
.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 1px solid #ddd;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
    font-size: 0.95rem;
    position: relative;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Top category buttons - prominent style */
.filter-btn.top-category {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0a2e4d 100%);
    color: var(--white);
    border: 2px solid var(--primary-blue);
    font-weight: 700;
    padding: 12px 28px;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.3);
}

.filter-btn.top-category:hover,
.filter-btn.top-category.active {
    background: linear-gradient(135deg, var(--accent-green) 0%, #218838 100%);
    border-color: var(--accent-green);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4);
}

/* Separator between top categories and individual categories */
.filter-separator {
    width: 1px;
    background: #ddd;
    height: 30px;
    margin: 0 8px;
    display: inline-block;
    vertical-align: middle;
}

.table-wrapper {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow-x: auto;
    overflow-y: visible;
    margin-bottom: 50px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f1f5f9;
    padding: 18px 20px;
    text-align: left;
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
}

td {
    padding: 20px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

tr:hover {
    background: #f8f9fa;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.product-text {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.product-brand {
    font-size: 0.85rem;
    color: #888;
    display: block;
    margin-bottom: 4px;
}

.category-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    display: inline-block;
    padding: 4px 10px;
    background: #e2e8f0;
    border-radius: 6px;
    margin-top: 6px;
    font-weight: 600;
}

/* Status Colors */
.status-verified {
    color: var(--accent-green);
    font-weight: 700;
}

.status-warning {
    color: #d97706;
    font-weight: 700;
}

.status-danger {
    color: #dc2626;
    font-weight: 700;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
}

.bg-green {
    background: #dcfce7;
    color: #166534;
}

.bg-yellow {
    background: #fef9c3;
    color: #854d0e;
}

.bg-red {
    background: #fee2e2;
    color: #991b1b;
}

.bg-blue {
    background: #dbeafe;
    color: #1e40af;
}

/* Comparison Page Styles */
.page {
    display: none;
}

.page.active {
    display: block;
}

.category-selector-section {
    background: linear-gradient(135deg, var(--white) 0%, var(--light-bg) 100%);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.category-select-label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.category-select-large {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid #ddd;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    background: var(--white);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.category-select-large:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.1);
}

.category-select-large:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.2);
}

.comparison-container {
    margin-top: 2rem;
}

.comparison-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0a2e4d 100%);
    color: var(--white);
    border-radius: 1rem 1rem 0 0;
    margin-bottom: 0;
}

.comparison-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.category-description {
    font-size: 1.125rem;
    opacity: 0.95;
    margin: 0;
}

.comparison-table-wrapper {
    overflow-x: auto;
    background: var(--white);
    border-radius: 0 0 1rem 1rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0a2e4d 100%);
    color: var(--white);
}

.comparison-table th {
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    background: transparent;
}

.comparison-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.2s;
}

.comparison-table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table tbody tr.top-product {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.05) 100%);
    border-left: 4px solid var(--accent-green);
}

.comparison-table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--white);
    box-shadow: var(--shadow);
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
}

.rank-badge.rank-4,
.rank-badge.rank-5,
.rank-badge.rank-6,
.rank-badge.rank-7,
.rank-badge.rank-8,
.rank-badge.rank-9,
.rank-badge.rank-10 {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #0a2e4d 100%);
}

.product-desc {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
    margin-top: 4px;
}

.score-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow);
}

.score-badge.score-high {
    background: linear-gradient(135deg, var(--accent-green) 0%, #218838 100%);
    color: var(--white);
}

.score-badge.score-medium {
    background: linear-gradient(135deg, #ffc107 0%, #d97706 100%);
    color: var(--white);
}

.score-badge.score-low {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: var(--white);
}

.label-tag {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
    color: #1e40af;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 2px;
}

/* Loading & Error */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.125rem;
}

.error {
    text-align: center;
    padding: 3rem;
    color: #dc2626;
    font-size: 1.125rem;
    background: #fee2e2;
    border-radius: 0.5rem;
    border: 2px solid #dc2626;
}

/* --- FOOTER --- */
footer {
    background: var(--text-dark);
    color: #ccc;
    padding: 60px 20px;
    margin-top: 80px;
    text-align: center;
}

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

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}

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

.disclaimer {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE FIRST APPROACH
   ============================================ */

/* Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    /* Header & Navigation */
    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }

    .logo-img {
        height: 40px;
    }

    nav ul {
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        font-size: 0.85rem;
        padding: 8px 12px;
    }

    /* Hero Section */
    .hero {
        padding: 40px 15px;
    }

    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .search-box {
        flex-direction: column;
        border-radius: 12px;
        padding: 12px;
        max-width: 100%;
    }

    .search-box input {
        padding: 14px 16px;
        border-radius: 8px;
        margin-bottom: 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .search-box button {
        width: 100%;
        padding: 14px;
        border-radius: 8px;
        font-size: 1rem;
    }

    /* Container */
    .container {
        margin: 30px auto;
        padding: 0 15px;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .last-updated {
        font-size: 0.8rem;
    }

    /* Filters */
    .filters {
        gap: 8px;
        margin-bottom: 20px;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .filters::-webkit-scrollbar {
        height: 4px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .filter-btn.top-category {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    /* Table - Convert to Cards on Mobile */
    .table-wrapper {
        border-radius: 8px;
        overflow: visible;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }

    table {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
        width: 100%;
    }

    tbody tr {
        display: block;
        width: 100%;
        background: var(--white);
        margin-bottom: 15px;
        border-radius: 12px;
        box-shadow: var(--shadow);
        padding: 15px;
        border: 1px solid #e2e8f0;
        border-collapse: separate;
    }

    tbody tr:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    tbody tr td {
        display: block;
        width: 100% !important;
        padding: 12px 0 !important;
        border: none !important;
        text-align: left;
        position: relative;
        padding-left: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    tbody tr td:last-child {
        border-bottom: none !important;
    }

    tbody tr td:before {
        content: attr(data-label);
        display: block;
        font-weight: 700;
        color: var(--primary-blue);
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        margin-bottom: 6px;
        opacity: 0.8;
    }

    /* Special handling for product cell */
    tbody tr td:first-child:before {
        content: "Product";
        margin-bottom: 8px;
    }

    .product-name {
        display: block;
        margin-bottom: 4px;
    }

    .product-brand {
        display: block;
        margin-top: 4px;
    }

    .product-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-icon {
        width: 40px;
        height: 40px;
    }

    .category-tag {
        display: inline-block;
        margin-top: 6px;
    }

    .product-name {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .product-brand {
        font-size: 0.8rem;
    }

    /* Comparison Page */
    .category-selector-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .category-select-label {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .category-select-large {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .comparison-header {
        padding: 1.5rem 1rem;
    }

    .comparison-header h3 {
        font-size: 1.5rem;
    }

    .category-description {
        font-size: 0.95rem;
    }

    .comparison-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .comparison-table {
        min-width: 600px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .rank-badge {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
    }

    /* Footer */
    footer {
        padding: 40px 15px;
        margin-top: 50px;
    }

    .footer-links {
        gap: 15px;
        flex-direction: column;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    footer p {
        font-size: 0.85rem;
    }

    .disclaimer {
        font-size: 0.8rem;
        padding-top: 15px;
        margin-top: 15px;
    }
}

/* Tablet Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .nav-container {
        padding: 15px 20px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .search-box {
        max-width: 90%;
    }

    .container {
        padding: 0 20px;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 9px 20px;
        font-size: 0.9rem;
    }

    /* Table - Still use horizontal scroll but with better sizing */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--white);
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
    }

    table {
        min-width: 700px;
        font-size: 0.9rem;
        display: table;
    }

    thead {
        display: table-header-group;
    }

    tbody {
        display: table-row-group;
    }

    tbody tr {
        display: table-row;
    }

    tbody tr td {
        display: table-cell;
        padding: 14px 12px;
    }

    tbody tr td:before {
        display: none;
    }

    th, td {
        padding: 14px 12px;
    }

    .comparison-table {
        min-width: 700px;
    }

    .comparison-header h3 {
        font-size: 1.75rem;
    }

    footer {
        padding: 50px 20px;
    }
}

/* Small Desktop / Large Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 0 25px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    table {
        min-width: 800px;
        display: table;
    }

    thead {
        display: table-header-group;
    }

    tbody {
        display: table-row-group;
    }

    tbody tr {
        display: table-row;
    }

    tbody tr td {
        display: table-cell;
    }

    tbody tr td:before {
        display: none;
    }

    .comparison-table {
        min-width: 750px;
    }
}

/* Large Desktop (1025px+) */
@media (min-width: 1025px) {
    .container {
        max-width: 1200px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .filter-btn,
    .search-box button,
    nav a {
        min-height: 44px; /* iOS touch target minimum */
        min-width: 44px;
    }

    .filter-btn {
        padding: 12px 24px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
}

/* ============================================
   PRODUCT DETAIL MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: var(--white);
    margin: 2% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s;
}

.modal-close:hover {
    color: var(--text-dark);
    background: var(--white);
    transform: rotate(90deg);
}

#productDetailContent {
    padding: 40px;
}

.product-detail-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.product-detail-header h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    margin-bottom: 10px;
}

.product-detail-header .product-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.95rem;
}

.product-detail-header .product-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.parameters-section {
    margin-top: 30px;
}

.parameters-section h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-blue);
}

.parameter-card {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-blue);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.parameter-card:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.parameter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.parameter-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    flex: 1;
    min-width: 200px;
}

.parameter-value {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 6px;
    background: var(--white);
}

.parameter-value.pass {
    background: #dcfce7;
    color: #166534;
}

.parameter-value.fail {
    background: #fee2e2;
    color: #991b1b;
}

.parameter-value.warning {
    background: #fef9c3;
    color: #854d0e;
}

.parameter-explanation {
    margin-top: 15px;
}

.parameter-explanation h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.parameter-explanation p {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
}

.parameter-explanation .what-it-is {
    background: #e0f2fe;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #0ea5e9;
}

.parameter-explanation .why-it-matters {
    background: #fef3c7;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #f59e0b;
}

.data-not-found {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1rem;
}

.data-not-found-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Make table rows clickable */
tbody tr {
    cursor: pointer;
    transition: all 0.2s;
}

tbody tr:hover {
    background: #f0f7ff !important;
    transform: scale(1.01);
}

/* Responsive modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    #productDetailContent {
        padding: 20px;
    }

    .product-detail-header h2 {
        font-size: 1.5rem;
    }

    .parameter-card {
        padding: 15px;
    }

    .parameter-name {
        font-size: 1rem;
    }

    .parameter-value {
        font-size: 0.95rem;
        padding: 6px 12px;
    }
}

/* --- PAGINATION --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    padding: 10px 16px;
    border: 1px solid #ddd;
    background: var(--white);
    color: var(--text-dark);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 44px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.pagination-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 10px 8px;
    color: #999;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
    width: 100%;
}

@media (max-width: 768px) {
    .pagination {
        gap: 6px;
        margin: 20px 0;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
        min-width: 40px;
    }
    
    .pagination-info {
        font-size: 0.85rem;
    }
}
