body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    color: #191c1d;
    line-height: 1.6;
}

.home-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

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

/* Background Blurs */
.bg-blur-1 {
    position: fixed;
    width: 600px;
    height: 600px;
    left: -200px;
    top: -100px;
    background: radial-gradient(circle, rgba(0, 89, 187, 0.08) 0%, rgba(0, 89, 187, 0) 70%);
    z-index: -1;
}

.bg-blur-2 {
    position: fixed;
    width: 600px;
    height: 600px;
    right: -200px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(64, 94, 150, 0.08) 0%, rgba(64, 94, 150, 0) 70%);
    z-index: -1;
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    letter-spacing: -0.02em;
    color: #191c1d;
}

/* Search Bar */
.search-bar-container {
    flex: 1;
    max-width: 500px;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    opacity: 0.5;
}

.search-input-wrapper input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    background: #f3f4f5;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
    outline: none;
}

.search-input-wrapper input:focus {
    background: #fff;
    border-color: #0059bb;
    box-shadow: 0 0 0 4px rgba(0, 89, 187, 0.08);
}

/* Profile Menu */
.user-profile-menu {
    position: relative;
}

.user-info-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 40px;
    cursor: pointer;
    transition: background 0.2s;
    user-select: none;
}

.user-info-trigger:hover {
    background: #f3f4f5;
}

.user-avatar-mini {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0059bb, #0070ea);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.user-details-text {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #191c1d;
    line-height: 1.2;
}

.user-email {
    font-size: 11px;
    color: #414754;
}

.dropdown-arrow {
    width: 12px;
    opacity: 0.4;
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px;
    display: none;
    z-index: 1001;
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: #414754;
    text-decoration: none;
    transition: background 0.2s;
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #0059bb;
}

.dropdown-item.logout-btn:hover {
    background: #fff1f2;
    color: #dc2626;
}

.item-icon {
    width: 16px;
    height: 16px;
    opacity: 0.7;
    object-fit: contain;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid #f3f4f5;
    margin: 8px 12px;
}

/* Components Grid */
.main-container {
    flex: 1;
    padding-top: 32px;
    padding-bottom: 64px;
}

/* Hero Section */
.hero-section {
    display: flex;
    align-items: center;
    gap: 48px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f7ff 100%);
    border-radius: 24px;
    padding: 48px;
    margin-bottom: 56px;
    border: 1px solid rgba(0, 89, 187, 0.08);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px -10px rgba(0, 89, 187, 0.06);
}

.hero-content {
    flex: 1.2;
    z-index: 2;
}

.hero-badge {
    display: inline-block;
    background: #ebf4ff;
    color: #0059bb;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.hero-description {
    font-size: 15px;
    color: #475569;
    margin-bottom: 24px;
    max-width: 520px;
    line-height: 1.6;
}

.hero-description strong {
    color: #1e293b;
}

.hero-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.hero-features span {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-features i {
    color: #10b981;
}

.hero-cta-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cta-note {
    font-size: 13px;
    font-style: italic;
    color: #64748b;
    border-left: 2px solid #cbd5e1;
    padding-left: 12px;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #0059bb;
    color: white;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    width: fit-content;
    box-shadow: 0 8px 20px rgba(0, 89, 187, 0.25), 0 0 0 0 rgba(0, 89, 187, 0.4);
    transition: all 0.3s;
    animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 8px 20px rgba(0, 89, 187, 0.25), 0 0 0 0 rgba(0, 89, 187, 0.4); }
    70% { box-shadow: 0 8px 20px rgba(0, 89, 187, 0.25), 0 0 0 10px rgba(0, 89, 187, 0); }
    100% { box-shadow: 0 8px 20px rgba(0, 89, 187, 0.25), 0 0 0 0 rgba(0, 89, 187, 0); }
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    background: #004da3;
}

.hero-visual {
    flex: 0.8;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    z-index: 2;
    transform: rotate(2deg);
    transition: transform 0.5s;
}

.hero-section:hover .hero-img {
    transform: rotate(0deg) scale(1.05);
}

.visual-glow {
    position: absolute;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(0, 89, 187, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

@media (max-width: 992px) {
    .hero-section { flex-direction: column; padding: 40px; text-align: center; }
    .hero-description { margin-left: auto; margin-right: auto; }
    .hero-cta-group { align-items: center; }
    .hero-btn-primary { width: 100%; justify-content: center; }
    .hero-features { align-items: center; }
}


.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

.components-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1; /* ENSURE SQUARE */
    box-sizing: border-box;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 89, 187, 0.1);
}

.cat-icon-container {
    width: 60%; /* Adaptive to square card */
    height: 60%;
    background: #f8f9fa;
    border-radius: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.category-card:hover .cat-icon-container {
    background: #fff;
    transform: scale(1.05);
}

.cat-icon-container img {
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.category-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 4px 0;
    text-transform: uppercase;
}

.category-card p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* Results Display */
.results-section {
    margin-top: 48px;
    background: white;
    border-radius: 20px;
    padding: 32px 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    animation: slideUp 0.4s ease-out;
    width: 100%;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.results-title-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.cat-search-wrapper {
    position: relative;
    width: 280px;
}

.cat-search-wrapper input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background: #f3f4f5;
    border: 1px solid transparent;
    border-radius: 20px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
}

.cat-search-wrapper input:focus {
    background: #fff;
    border-color: #0059bb;
    box-shadow: 0 0 0 3px rgba(0, 89, 187, 0.08);
}

.cat-search-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.5;
}

.results-header h2 {
    font-size: 20px;
    margin: 0;
    text-transform: uppercase;
    font-weight: 800;
    color: #0059bb;
}

.close-btn {
    background: #f8f9fa;
    border: none;
    font-size: 24px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.results-stats {
    margin-bottom: 12px;
    color: #6c757d;
    font-size: 14px;
    padding-bottom: 12px;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f3f4f5;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 160px;
}

.filter-group label {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-group select:focus {
    border-color: #0059bb;
    background: white;
}

.pagination {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.btn-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-circle:hover:not(:disabled) {
    border-color: #0059bb;
    color: #0059bb;
    transform: scale(1.05);
}

.btn-circle:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.parts-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.part-item {
    padding: 16px 20px;
    border: 1px solid #f1f2f3;
    border-radius: 16px;
    display: flex;
    align-items: center; /* Centered vertically for a fixed-look */
    gap: 20px;
    transition: all 0.2s;
    cursor: pointer;
    background: #fff;
    height: 96px; /* FIXED HEIGHT */
    box-sizing: border-box;
}

.part-item:hover {
    background: #f8f9fa;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.04);
}

.part-thumb {
    width: 60px; /* Slightly larger stable width */
    height: 60px;
    background: #f8f9fa;
    border-radius: 12px;
    object-fit: contain;
    flex-shrink: 0; /* Important: don't let it squash */
}

.part-info {
    flex: 1;
    min-width: 0; /* Enable ellipsis for flex children */
}

.part-info h4 {
    margin: 0 0 2px 0;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}

.part-info p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer */
.footer {
    padding: 32px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
}

.footer-container {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 89, 187, 0.1);
    border-radius: 50%;
    border-top-color: #0059bb;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
