/* ============================================================
   Good Scents R&D Platform - Modern Responsive Design
   ============================================================ */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;
    --secondary: #0ea5e9;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --font: 'Inter', -apple-system, sans-serif;
    --font-ar: 'Noto Kufi Arabic', 'Inter', sans-serif;
}

[data-lang="ar"] { --font: 'Noto Kufi Arabic', 'Inter', sans-serif; }

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

[dir="rtl"] body { font-family: var(--font-ar); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-brand i { font-size: 1.5rem; }

.nav-links {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: white;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

.nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    transition: all 0.2s;
}

.lang-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, var(--secondary) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Search */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 0.25rem;
    box-shadow: var(--shadow-xl);
}

.search-icon {
    color: var(--text-light);
    padding: 0 0.75rem 0 1rem;
    font-size: 1.1rem;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.75rem 0.5rem;
    font-family: var(--font);
    color: var(--text);
    background: transparent;
}

[dir="rtl"] .search-input { font-family: var(--font-ar); }

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
    display: none;
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
}

.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.autocomplete-item:hover { background: #f1f5f9; }

.ac-cas { font-family: monospace; color: var(--secondary); font-size: 0.85rem; }
.ac-odor { color: var(--text-light); font-size: 0.8rem; font-style: italic; }

/* ============================================================
   STATS
   ============================================================ */
.stats-section { padding: 2rem 0; margin-top: -1.5rem; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-clickable {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stat-clickable:hover .stat-icon {
    transform: scale(1.1);
}

.stat-clickable:hover .stat-number {
    color: var(--primary);
}

.stat-icon { transition: transform 0.2s; }

.stat-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: white;
    font-size: 1.25rem;
}

.stat-number { font-size: 1.75rem; font-weight: 700; color: var(--text); }
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 0.25rem; }

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-section { padding: 2rem 0; }

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.category-card {
    background: white;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
    border-left: 3px solid var(--primary);
}

[dir="rtl"] .category-card { border-left: none; border-right: 3px solid var(--primary); }

.category-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.category-name { font-weight: 500; font-size: 0.9rem; }

.category-count {
    background: var(--bg);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================================
   RESULTS TABLE
   ============================================================ */
.results-section { padding: 2rem 0; }

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-count { font-size: 0.9rem; color: var(--text-light); font-weight: 400; margin-left: 0.5rem; }

.results-table-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9rem;
}

.results-table thead { background: var(--bg); }

.results-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

[dir="rtl"] .results-table th { text-align: right; }

.results-table td {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.results-table tr:hover { background: #f8fafc; }

.result-name {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.result-name:hover { text-decoration: underline; }

.mono { font-family: 'SF Mono', Monaco, monospace; font-size: 0.85rem; }

.small-text { font-size: 0.75rem; word-break: break-all; }

.odor-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 20px;
    font-size: 0.8rem;
}

.btn-view {
    color: var(--primary);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.btn-view:hover { background: var(--primary); color: white; }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.page-btn, .page-link {
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.page-btn:hover, .page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: white; border-color: var(--primary); }

.page-info { font-size: 0.9rem; color: var(--text-light); padding: 0 0.5rem; }

/* ============================================================
   MATERIAL DETAIL
   ============================================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    font-size: 0.85rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

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

.material-header {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.material-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.material-name { font-size: 1.75rem; font-weight: 700; }

.material-alt-name { color: var(--text-light); font-style: italic; margin: 0.25rem 0 0.75rem; }

.material-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }

.info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-cas { background: #dbeafe; color: #1e40af; }
.tag-formula { background: #dcfce7; color: #166534; }
.tag-mw { background: #fef3c7; color: #92400e; }
.tag-odor { background: #fce7f3; color: #9d174d; }
.tag-flavor { background: #f3e8ff; color: #6b21a8; }

.categories-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }

.cat-tag {
    padding: 0.25rem 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}

.cat-tag:hover { border-color: var(--primary); color: var(--primary); }

/* Tabs */
.tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    transition: all 0.2s;
    font-family: inherit;
}

.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Info Cards */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 1rem; }

.info-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.info-card.full-width { grid-column: 1 / -1; }

.info-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
}

.prop-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }

.prop-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.prop-table td:first-child {
    font-weight: 500;
    color: var(--text-light);
    width: 40%;
    white-space: nowrap;
}

/* Suppliers Grid */
.suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.supplier-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.supplier-card:hover { transform: translateY(-2px); }
.supplier-card h4 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--primary); }
.supplier-card p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.75rem; }

.supplier-link, .supplier-email {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--secondary);
    text-decoration: none;
    margin-right: 1rem;
}

/* Uses Tags */
.uses-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.use-tag {
    padding: 0.3rem 0.7rem;
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 20px;
    font-size: 0.8rem;
}

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

/* Synonyms */
.synonyms-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.synonym-item {
    padding: 0.25rem 0.6rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: monospace;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }

/* ============================================================
   GC CHART
   ============================================================ */
.chart-container {
    background: white;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.gc-component-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gc-bar {
    height: 8px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    min-width: 2px;
}

/* ============================================================
   GC CARDS
   ============================================================ */
.gc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gc-card {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
    border-left: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

[dir="rtl"] .gc-card { border-left: none; border-right: 4px solid var(--primary); }

.gc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.gc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-type-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gc-type-badge.es { background: #dcfce7; color: #166534; }
.gc-type-badge.ab { background: #fce7f3; color: #9d174d; }
.gc-type-badge.co { background: #fef3c7; color: #92400e; }
.gc-type-badge.ex { background: #e0f2fe; color: #0369a1; }
.gc-type-badge.ol { background: #f3e8ff; color: #6b21a8; }
.gc-type-badge.fo { background: #fef9c3; color: #854d0e; }
.gc-type-badge { background: #f1f5f9; color: #475569; }

.gc-id-badge {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-light);
    background: var(--bg);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.gc-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.3;
    text-transform: capitalize;
}

.gc-card-stats {
    display: flex;
    gap: 0.5rem;
}

.gc-comp-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.gc-card-ref {
    font-size: 0.75rem;
    color: var(--text-light);
    line-height: 1.4;
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: auto;
}

.gc-card-ref i { color: var(--secondary); margin-right: 0.25rem; }

@media (max-width: 480px) {
    .gc-grid { grid-template-columns: 1fr; }
}

/* GC References */
.gc-references { }

.ref-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

[dir="rtl"] .ref-item { border-left: none; border-right: 3px solid var(--secondary); }

.ref-text {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
    flex: 1;
}

.ref-icon { color: var(--secondary); margin-top: 0.15rem; flex-shrink: 0; }

.ref-links {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.ref-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.ref-link:hover { border-color: var(--primary); color: var(--primary); background: #f0f0ff; }

@media (max-width: 768px) {
    .ref-item { flex-direction: column; }
    .ref-links { align-self: flex-end; }
}

/* ============================================================
   COMPARE
   ============================================================ */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.compare-search {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.compare-material {
    background: white;
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.compare-section-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    padding: 0.75rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin: 1rem 0 0.5rem;
    grid-column: 1 / -1;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    margin-top: auto;
    background: white;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.main-content { flex: 1; }

/* ============================================================
   RESPONSIVE - TABLET
   ============================================================ */
@media (max-width: 768px) {
    .nav-toggle { display: block; }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 0.5rem;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border);
    }

    .nav-links.open { display: flex; }

    .hero-title { font-size: 1.75rem; flex-direction: column; gap: 0.25rem; }
    .hero-subtitle { font-size: 0.95rem; }
    .hero { padding: 2rem 0; }

    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .stat-number { font-size: 1.25rem; }
    .stat-icon { width: 40px; height: 40px; font-size: 1rem; }

    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    .info-grid { grid-template-columns: 1fr; }
    .compare-grid { grid-template-columns: 1fr; }

    .material-title-row { flex-direction: column; }
    .material-name { font-size: 1.35rem; }

    .tabs { gap: 0; }
    .tab { padding: 0.6rem 0.75rem; font-size: 0.8rem; }

    .prop-table td:first-child { width: auto; white-space: normal; }

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

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 480px) {
    .container { padding: 0 0.75rem; }

    .nav-brand span { display: none; }
    .nav-brand i { font-size: 1.75rem; }

    .hero-title { font-size: 1.35rem; }
    .search-input { font-size: 0.9rem; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .stat-card { padding: 0.75rem; }
    .stat-number { font-size: 1.1rem; }
    .stat-label { font-size: 0.75rem; }

    .categories-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; }

    .results-table { font-size: 0.8rem; }
    .results-table th, .results-table td { padding: 0.5rem 0.5rem; }

    .material-header { padding: 1rem; }
    .material-name { font-size: 1.15rem; }

    .info-tags { gap: 0.3rem; }
    .tag { font-size: 0.75rem; padding: 0.25rem 0.5rem; }

    .tab { padding: 0.5rem 0.6rem; font-size: 0.75rem; }
    .tab i { display: none; }
}

/* ============================================================
   RTL SUPPORT
   ============================================================ */
[dir="rtl"] .nav-links { flex-direction: row; }
[dir="rtl"] .search-icon { padding: 0 1rem 0 0.75rem; }
[dir="rtl"] .results-table th { text-align: right; }
[dir="rtl"] .breadcrumb { direction: rtl; }
[dir="rtl"] .category-card { border-left: none; border-right: 3px solid var(--primary); }
[dir="rtl"] .supplier-link { margin-right: 0; margin-left: 1rem; }

@media (max-width: 768px) {
    [dir="rtl"] .nav-links { flex-direction: column; }
}

/* ============================================================
   SPECIALTY TAGS
   ============================================================ */
.specialty-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background: #e0f2fe;
    color: #0369a1;
    border-radius: 4px;
    font-size: 0.75rem;
    margin: 0.15rem;
}

/* ============================================================
   SUPPLIER LOGOS
   ============================================================ */
.supplier-logo {
    text-align: center;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.supplier-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

.supplier-detail-logo {
    max-width: 180px;
    max-height: 80px;
    object-fit: contain;
    padding: 0.5rem;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.supplier-slogan {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 0.5rem;
}

/* Supplier desc in material page */
.supplier-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.supplier-products-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0.5rem 0;
}

/* ============================================================
   SUPPLIER PRODUCTS
   ============================================================ */
.supplier-products-cell { display: flex; flex-direction: column; gap: 0.25rem; }

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--secondary);
    text-decoration: none;
    padding: 0.15rem 0.4rem;
    background: #f0f9ff;
    border-radius: 4px;
    transition: background 0.2s;
}

.product-link:hover { background: #e0f2fe; text-decoration: underline; }

.product-text {
    font-size: 0.8rem;
    color: var(--text-light);
    padding: 0.15rem 0.4rem;
    background: var(--bg);
    border-radius: 4px;
}

.more-products {
    font-size: 0.75rem;
    color: var(--text-light);
    font-style: italic;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-card, .category-card, .supplier-card, .info-card {
    animation: fadeIn 0.3s ease-out;
}

/* Print */
@media print {
    .navbar, .footer, .search-container, .tabs, .material-actions { display: none !important; }
    .tab-content { display: block !important; }
    .material-header { box-shadow: none; border: 1px solid #ddd; }
}
