/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --gray-color: #95a5a6;
    --light-gray: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f5f5f5;
    line-height: 1.6;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Header Styles */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: var(--light-color) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    font-weight: 600;
}

.card-footer {
    background-color: white;
    border-top: none;
}

.part-image {
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 10px;
}

/* Category Cards */
.category-card .card {
    transition: all 0.3s ease;
}

.category-card .card:hover {
    background-color: var(--light-color);
    transform: scale(1.05);
}

.category-card .card-body {
    padding: 1.5rem 0.5rem;
}

.category-card i {
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    border-radius: 0.25rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-outline-primary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Forms */
.form-control, .form-select {
    border-radius: 0.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ced4da;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Table Styles */
.table {
    background-color: white;
}

.table th {
    background-color: var(--light-color);
    font-weight: 600;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Pagination */
.pagination .page-item.active .page-link {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.pagination .page-link {
    color: var(--secondary-color);
}

/* Alert Messages */
.alert {
    border-radius: 0.25rem;
    padding: 0.75rem 1.25rem;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: var(--light-color);
}

.footer a:hover {
    color: var(--secondary-color);
}

.footer h5 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer ul {
    list-style: none;
    padding-left: 0;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-color);
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 500px;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.auth-card .card-body {
    padding: 2rem;
}

.auth-card .card-footer {
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.03);
}

/* Admin Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
    background-color: var(--primary-color);
    color: white;
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: white !important;
    background-color: var(--secondary-color);
}

.sidebar-heading {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    padding: 0 1rem;
    margin-top: 1rem;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .hero-section .col-md-6:last-child {
        margin-top: 2rem;
    }
    
    .category-card .col-md-2 {
        margin-bottom: 1rem;
    }
    
    .footer .col-md-3 {
        margin-bottom: 1.5rem;
    }
}

/* Additional Utility Classes */
.bg-light-gray {
    background-color: var(--light-gray);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Cart Styles */
.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 5px;
    border-radius: 0.25rem;
}

/* Part Details */
.part-gallery {
    margin-bottom: 1.5rem;
}

.thumbnail-container {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0.25rem;
}

.thumbnail:hover, .thumbnail.active {
    border-color: var(--secondary-color);
}

/* Live Search */
.live-search-container {
    position: relative;
}

#liveSearchResults {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background-color: white;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

#liveSearchResults.show {
    display: block;
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    white-space: normal;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--dark-color);
}