/* Global Styling System */
:root {
    --primary-red: #E32B30;
    --primary-red-hover: #C92025;
    --dark-navy: #0F1D2C;
    --light-navy: #1E2D3D;
    --text-dark: #1F2937;
    --text-muted: #6B7280;
    --bg-light: #F9FAFB;
    --border-light: #E5E7EB;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-dark);
    background-color: #FFFFFF;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F1F1F1;
}
::-webkit-scrollbar-thumb {
    background: #C1C1C1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A8A8A8;
}

/* Header & Navigation */
.header-nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-navy);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--primary-red);
}

.nav-link-custom {
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.25s ease;
    position: relative;
    padding: 6px 0;
}

.nav-link-custom:hover, 
.nav-link-custom.active {
    color: var(--primary-red);
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: width 0.25s ease;
}

.nav-link-custom:hover::after,
.nav-link-custom.active::after {
    width: 100%;
}

.nav-link-custom-mobile {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    font-size: 1.1rem;
}

.nav-link-custom-mobile.active {
    color: var(--primary-red);
}

.icon-btn {
    color: var(--text-dark);
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.25s ease;
    text-decoration: none;
}

.icon-btn:hover {
    background-color: #F3F4F6;
    color: var(--primary-red);
}

.btn-sell {
    background-color: var(--primary-red);
    color: #FFFFFF;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 14px rgba(227, 43, 48, 0.3);
    transition: all 0.3s ease;
}

.btn-sell:hover {
    background-color: var(--primary-red-hover);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 43, 48, 0.4);
}

/* Hero Section */
.hero-section {
    position: relative;
    background-image: url('/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    text-align: center;
    padding: 100px 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(15, 29, 44, 0.8) 0%, rgba(15, 29, 44, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 40px;
    font-weight: 400;
}

/* Search Bar Card */
.search-card-container {
    position: relative;
    z-index: 3;
    margin-top: -60px;
    padding: 0 15px;
}

.search-card {
    background-color: #FFFFFF;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    padding: 15px 25px;
    max-width: 950px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.search-field {
    position: relative;
    padding: 8px 12px;
}

.search-field:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: var(--border-light);
}

@media (max-width: 991px) {
    .search-field:not(:last-child)::after {
        display: none;
    }
}

.search-field label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.search-field label i {
    color: var(--primary-red);
    margin-right: 6px;
    font-size: 1rem;
}

.search-select {
    width: 100%;
    border: none;
    font-weight: 600;
    color: var(--dark-navy);
    font-size: 0.95rem;
    background-color: transparent;
    padding: 4px 0;
    outline: none;
    cursor: pointer;
}

.btn-search {
    background-color: var(--primary-red);
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 12px;
    padding: 14px 28px;
    width: 100%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background-color: var(--primary-red-hover);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(227, 43, 48, 0.3);
}

/* Category Circular Icons */
.categories-section {
    padding: 80px 0 40px;
}

.section-title-center {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 40px;
    text-align: center;
}

.category-circle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--light-navy);
    box-shadow: var(--shadow-soft);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.category-circle-wrapper:hover .category-circle,
.category-circle-wrapper.active .category-circle {
    background-color: var(--primary-red);
    color: #FFFFFF;
    border-color: var(--primary-red);
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(227, 43, 48, 0.2);
}

.category-circle-wrapper span {
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.category-circle-wrapper:hover span,
.category-circle-wrapper.active span {
    color: var(--primary-red);
}

/* Cars Showcase Section */
.cars-section {
    padding: 40px 0 80px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.section-title-left {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 8px;
}

.section-subtitle-left {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 0;
}

.view-all-link {
    color: var(--primary-red);
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease, color 0.2s ease;
}

.view-all-link:hover {
    color: var(--primary-red-hover);
    gap: 10px;
}

/* Car Card Styling */
.car-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.car-img-container {
    position: relative;
    padding-top: 62%; /* Aspect ratio 16:10 */
    overflow: hidden;
    background-color: #F3F4F6;
}

.car-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.car-card:hover .car-img {
    transform: scale(1.08);
}

/* Card Badges */
.car-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #FFFFFF;
    z-index: 5;
    letter-spacing: 0.5px;
}

.badge-new { background-color: var(--primary-red); }
.badge-bestseller { background-color: #10B981; }
.badge-used { background-color: #3B82F6; }
.badge-discount { background-color: var(--primary-red); }
.badge-supercar { background-color: #F59E0B; }
.badge-ev { background-color: #8B5CF6; }

/* Like Heart Button */
.btn-like {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    color: var(--text-muted);
    transition: all 0.25s ease;
}

.btn-like:hover {
    transform: scale(1.1);
    color: var(--primary-red);
}

.btn-like.active {
    color: var(--primary-red);
}

.btn-like.active i::before {
    content: "\f415"; /* Solid heart icon from bootstrap-icons */
}

/* Card Body */
.car-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.car-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.car-brand {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.car-rating {
    font-size: 0.85rem;
    font-weight: 700;
    color: #F59E0B;
    display: flex;
    align-items: center;
    gap: 4px;
}

.car-model-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 12px;
    line-height: 1.3;
}

.car-price-row {
    margin-bottom: 18px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.car-price {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-red);
}

.car-price-old {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.car-specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--light-navy);
}

.spec-item i {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Card Footer Buttons */
.car-card-actions {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 10px;
    margin-top: auto;
}

.btn-detail {
    background-color: #FFFFFF;
    color: var(--light-navy);
    border: 1px solid var(--border-light);
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.btn-detail:hover {
    background-color: var(--bg-light);
    border-color: var(--text-muted);
}

.btn-quote {
    background-color: var(--dark-navy);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.25s ease;
}

.btn-quote:hover {
    background-color: var(--light-navy);
    color: #FFFFFF;
}

/* Load More Section */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.btn-load-more {
    background-color: #FFFFFF;
    color: var(--primary-red);
    border: 1.5px solid var(--primary-red);
    font-weight: 700;
    padding: 12px 36px;
    border-radius: 50px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background-color: var(--primary-red);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(227, 43, 48, 0.2);
}

/* Why Choose Us Section */
.why-choose-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.why-card {
    background-color: #FFFFFF;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid var(--border-light);
    text-align: center;
    box-shadow: var(--shadow-soft);
    height: 100%;
    transition: transform 0.3s ease;
}

.why-card:hover {
    transform: translateY(-5px);
}

.why-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(227, 43, 48, 0.1);
    color: var(--primary-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin: 0 auto 20px;
}

.why-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 12px;
}

.why-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Custom Modal Styles */
.modal-content-custom {
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header-custom {
    border-bottom: 1px solid var(--border-light);
    padding: 20px 25px;
}

.modal-body-custom {
    padding: 25px;
}

.modal-detail-img {
    border-radius: 12px;
    width: 100%;
    object-fit: cover;
    max-height: 380px;
    box-shadow: var(--shadow-soft);
}

.detail-specs-table th {
    font-weight: 600;
    color: var(--text-muted);
}

.detail-specs-table td {
    font-weight: 700;
    color: var(--dark-navy);
}

/* Responsive fixes */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .section-title-left {
        font-size: 1.7rem;
    }
    .car-card-actions {
        grid-template-columns: 1fr;
    }
}

/* Autocomplete suggestions dropdown styling */
.autocomplete-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background-color: #FFFFFF;
    border: 1px solid var(--border-light);
    border-radius: 0 0 16px 16px;
    z-index: 1100;
    margin-top: 5px;
    box-shadow: var(--shadow-medium);
}

.autocomplete-suggestion {
    padding: 12px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.02);
}

.autocomplete-suggestion:last-child {
    border-bottom: none;
}

.autocomplete-suggestion:hover {
    background-color: var(--bg-light);
    color: var(--primary-red);
}

/* Authentication Card & UI styling */
.auth-card {
    border-radius: 24px !important;
    overflow: hidden;
}

.btn-primary-pill {
    background-color: var(--primary-red) !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 10px rgba(227, 43, 48, 0.25);
}

/* Helper shadows and borders */
.shadow-xs {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.shadow-2xs {
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.card-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Profile Tabs */
#profileTabs .nav-link {
    color: var(--text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

#profileTabs .nav-link:hover {
    color: var(--primary-red);
}

#profileTabs .nav-link.active {
    color: var(--text-dark) !important;
    border-bottom-color: var(--primary-red) !important;
}

