﻿/* BluonExplorer.css */
.bluon-explorer-page {
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 0.75rem 0;
}

/* Page Header Styles */
.page-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
}

.header-title p {
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Compact View Styles */
.page-header.compact {
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
}

.compact-bar {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    gap: 1rem;
    height: 2.5rem;
}

.compact-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.compact-icon {
    font-size: 1.25rem;
}

.compact-title {
    font-size: 1.25rem;
    font-weight: 500;
    white-space: nowrap;
}

.compact-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stat-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

    .stat-bubble.primary {
        background: rgba(30, 60, 114, 0.3);
    }

    .stat-bubble.success {
        background: rgba(86, 171, 47, 0.3);
    }

    .stat-bubble.info {
        background: rgba(79, 172, 254, 0.3);
    }

    .stat-bubble.warning {
        background: rgba(242, 153, 74, 0.3);
    }

.bubble-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.bubble-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.compact-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.compact-btn {
    padding: 0.25rem 0.75rem;
}

/* Project Bar */
.project-bar {
    background: white;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-label {
    color: #6c757d;
    font-size: 0.875rem;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.breadcrumb-item a {
    color: #1e3c72;
    text-decoration: none;
    transition: color 0.2s;
}

    .breadcrumb-item a:hover {
        color: #2a5298;
        text-decoration: underline;
    }

.breadcrumb-item.active {
    color: #495057;
    font-weight: 500;
}

/* Main Content Area */
.main-content {
    margin-top: 1rem;
}

/* Model Details Container */
.model-details-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.model-info-card {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

    .model-info-card h4 {
        margin: 0 0 0.5rem 0;
        color: #1e3c72;
    }

.model-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Tabs */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    padding: 0 1.5rem;
}

    .nav-tabs .nav-link {
        color: #6c757d;
        border: none;
        border-bottom: 3px solid transparent;
        padding: 0.75rem 1.5rem;
        transition: all 0.2s;
    }

        .nav-tabs .nav-link:hover {
            color: #1e3c72;
            border-bottom-color: #e9ecef;
        }

        .nav-tabs .nav-link.active {
            color: #1e3c72;
            font-weight: 600;
            border-bottom-color: #1e3c72;
            background: none;
        }

.tab-content {
    padding: 1.5rem;
}

/* Brand Grid */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.brand-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

    .brand-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-color: #1e3c72;
    }

    .brand-card img {
        max-height: 60px;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .brand-card h6 {
        margin: 0;
        color: #495057;
    }

/* Series and Model Cards */
.series-grid,
.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.series-card,
.model-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

    .series-card:hover,
    .model-card:hover {
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        border-color: #1e3c72;
    }

.model-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

    .model-card-header h6 {
        margin: 0;
        color: #1e3c72;
    }

.model-card-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.model-card-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Part Cards */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1rem;
}

.part-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

    .part-card:hover {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

.part-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.part-number {
    font-weight: 600;
    color: #1e3c72;
    font-family: monospace;
}

.part-description {
    color: #495057;
    margin-bottom: 0.5rem;
}

.part-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.part-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Alternative Parts Table */
.alternatives-table {
    margin: 0;
}

    .alternatives-table th {
        background-color: #f8f9fa;
        font-weight: 600;
        white-space: nowrap;
    }

    .alternatives-table .score-badge {
        display: inline-block;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-weight: 600;
        font-size: 0.875rem;
    }

        .alternatives-table .score-badge.high {
            background-color: #d4edda;
            color: #155724;
        }

        .alternatives-table .score-badge.medium {
            background-color: #fff3cd;
            color: #856404;
        }

        .alternatives-table .score-badge.low {
            background-color: #f8d7da;
            color: #721c24;
        }

/* Manuals Grid */
.manuals-grid {
    display: grid;
    gap: 1.5rem;
}

.manual-category {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.manual-category-header {
    background-color: #f8f9fa;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

    .manual-category-header h6 {
        margin: 0;
        color: #495057;
    }

.manual-list {
    padding: 1rem;
}

.manual-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

    .manual-item:hover {
        background-color: #f8f9fa;
    }

    .manual-item a {
        color: #1e3c72;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

        .manual-item a:hover {
            text-decoration: underline;
        }

/* Specifications Viewer */
.specs-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.specs-grid {
    display: grid;
    gap: 1rem;
}

.spec-category {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
}

.spec-category-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
}

    .spec-category-header:hover {
        background-color: #e9ecef;
    }

.spec-list {
    padding: 1rem;
}

.spec-item {
    display: grid;
    grid-template-columns: minmax(200px, 1fr) 2fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

    .spec-item:last-child {
        border-bottom: none;
    }

.spec-label {
    font-weight: 500;
    color: #6c757d;
}

.spec-value {
    color: #212529;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.empty-state-icon {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h5 {
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    padding: 2rem;
}

/* Search and Filter Section */
.search-filter-section {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-input {
    position: relative;
}

    .search-input .form-control {
        padding-left: 2.5rem;
    }

    .search-input .search-icon {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: #6c757d;
    }

/* Home Container Styles */
.home-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

.search-card {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.search-card h3 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.search-card .text-muted {
    font-size: 0.9rem;
}

.search-form {
    margin-top: 1.5rem;
}

    .search-form .input-group {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border-radius: 0.375rem;
        overflow: hidden;
    }

    .search-form .form-control {
        border: none;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .search-form .btn {
        border: none;
        padding: 0.75rem 1.5rem;
        font-weight: 500;
    }

/* Divider */
.divider-or {
    text-align: center;
    margin: 3rem 0;
    position: relative;
}

    .divider-or::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 1px;
        background: #dee2e6;
        transform: translateY(-50%);
    }

    .divider-or span {
        background: #f8f9fa;
        padding: 0 1rem;
        position: relative;
        color: #6c757d;
        font-weight: 500;
    }

/* Browse Section */
.browse-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

    .browse-section h3 {
        color: #1e3c72;
        margin-bottom: 0.5rem;
    }

/* Search Results */
.search-results-container {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-results-header {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

    .search-results-header h4 {
        color: #1e3c72;
        margin-bottom: 0.5rem;
    }

/* Mobile Responsive */
@media (max-width: 768px) {
    .home-container {
        padding: 1rem 0;
    }

    .search-card {
        padding: 1.5rem;
    }

    .search-form {
        margin-top: 1.5rem;
    }

    .divider-or {
        margin: 2rem 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bluon-explorer-page {
        padding: 0.5rem 0;
    }

    .page-header {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-title h1 {
        font-size: 1.5rem;
    }

    .compact-bar {
        grid-template-columns: auto 1fr auto;
        gap: 0.5rem;
    }

    .compact-title {
        display: none;
    }

    .stat-bubble {
        padding: 0.2rem 0.5rem;
        font-size: 0.875rem;
    }

    .bubble-label {
        display: none;
    }

    .project-bar {
        flex-direction: column;
        text-align: center;
    }

    .brand-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .series-grid,
    .model-grid,
    .parts-grid {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        padding: 0 0.5rem;
    }

        .nav-tabs .nav-link {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }

    .spec-item {
        grid-template-columns: 1fr;
    }

    .alternatives-table {
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .header-actions {
        flex-direction: column;
        width: 100%;
    }

        .header-actions .btn {
            width: 100%;
        }

    /* Force compact view on mobile */
    .page-header:not(.compact) {
        display: none;
    }

    .compact-bar {
        height: auto;
        padding: 0.5rem;
    }

    .compact-center {
        flex-direction: column;
        gap: 0.25rem;
    }

    .model-card-meta,
    .part-meta {
        font-size: 0.75rem;
    }

    .part-actions .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 991px) {
    .home-container .row {
        margin: 0;
    }

    .search-card {
        margin-bottom: 1rem;
    }
}