/* Car Detail Page Styles */
.breadcrumb {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(240, 192, 64, 0.2);
    padding: 1rem 0;
    margin-top: 100px;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.breadcrumb a, .breadcrumb span {
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a:hover {
    color: #f0c040;
}

.breadcrumb i.fa-chevron-right {
    margin: 0 0.75rem;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Car Header */
.car-header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 20, 0.9) 100%);
    color: white;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.car-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/cars.webp') center/cover;
    opacity: 0.1;
    z-index: -1;
}

.car-header-content {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.car-image-container {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    width: 420px;
    height: 420px; /* Explicitly set height to match width for perfect square */
    align-self: center;
}

.car-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.car-header-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 0;
    min-height: 420px;
}

.car-header-info h1 {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
    line-height: 1.2;
}

.car-category {
    background: linear-gradient(135deg, #f0c040, #ffcc55);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 0.5rem;
    width: fit-content;
}

.car-year-range {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.car-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.price-label {
    color: #aaa;
    font-size: 1rem;
}

.price-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #f0c040;
}

/* Quick Specs */
.quick-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.spec-item {
    background: rgba(240, 192, 64, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(240, 192, 64, 0.3);
    transition: all 0.3s ease;
}

.spec-item:hover {
    background: rgba(240, 192, 64, 0.2);
    border-color: rgba(240, 192, 64, 0.5);
    transform: translateY(-2px);
}

.spec-item i {
    color: #f0c040;
    font-size: 1.2rem;
}

.spec-item span {
    font-weight: 500;
    color: #fff;
}

/* Main Content */
.car-detail-main {
    background: #000;
    min-height: 100vh;
    padding: 3rem 0;
}

.car-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Content Tabs */
.content-tabs {
    display: flex;
    background: rgba(240, 192, 64, 0.1);
    border-radius: 15px;
    padding: 0.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #ccc;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab-btn:hover {
    background: rgba(240, 192, 64, 0.2);
    color: #f0c040;
}

.tab-btn.active {
    background: linear-gradient(135deg, #f0c040, #ffcc55);
    color: #000;
}

.tab-btn i {
    font-size: 1rem;
}

/* Tab Content */
.tab-content {
    background: rgba(20, 20, 20, 0.8);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(240, 192, 64, 0.1);
    backdrop-filter: blur(10px);
}

/* Ensure all headings in tab content are white */
.tab-content h3,
.tab-content h4 {
    color: #fff !important;
}

.tab-content h3 i,
.tab-content h4 i {
    color: #f0c040 !important;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Overview Sections */
.overview-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Features and Issues Grid Layout */
.features-grid, .issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.features-list, .issues-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.75rem;
}

/* Overview Grid (deprecated - keeping for compatibility) */
.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.info-section {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 15px;
    padding: 2rem;
    border-left: 4px solid #f0c040;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

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

.info-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.4rem;
}

.info-section h3 i {
    color: #f0c040;
}

/* Features */
.features-container, .issues-container {
    position: relative;
}

.features-list, .issues-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.75rem;
}

.feature-item, .issue-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(60, 60, 60, 0.6);
    border-radius: 10px;
    border-left: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.feature-item {
    border-left-color: #4CAF50;
}

.issue-item {
    border-left-color: #f44336;
}

.feature-item:hover, .issue-item:hover {
    background: rgba(80, 80, 80, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.feature-item i {
    color: #4CAF50;
    margin-top: 0.25rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.issue-item i {
    color: #f44336;
    margin-top: 0.25rem;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.feature-item span, .issue-item span {
    flex: 1;
    line-height: 1.5;
    color: #fff;
}

/* Show More Button */
.show-more-btn {
    background: linear-gradient(135deg, #f0c040, #ffcc55);
    color: #000;
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 192, 64, 0.4);
}

.show-more-btn i {
    transition: transform 0.3s ease;
}

.show-more-btn.expanded i {
    transform: rotate(180deg);
}

/* Hidden Content */
.hidden {
    display: none !important;
}

/* Technical Details */
.technical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tech-section {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 15px;
    padding: 2rem;
    border-left: 4px solid #f0c040;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.tech-section.full-width {
    grid-column: 1 / -1;
}

.tech-section h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.2rem;
}

.tech-section h4 i {
    color: #f0c040;
}

.tech-details {
    display: grid;
    gap: 1rem;
}

.tech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(60, 60, 60, 0.6);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    gap: 2rem;
    backdrop-filter: blur(5px);
}

.tech-label {
    font-weight: 500;
    color: #ccc;
    min-width: 120px;
}

.tech-value {
    font-weight: 600;
    color: #fff;
    text-align: right;
}

/* Measurement System Toggle */
.measurement-system-toggle {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid #f0c040;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.measurement-system-toggle label {
    font-weight: 500;
    color: #fff;
}

.measurement-system-toggle select {
    padding: 0.75rem 1.25rem;
    border: 2px solid rgba(240, 192, 64, 0.3);
    border-radius: 10px;
    background: rgba(60, 60, 60, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none; /* Remove default styling */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f0c040' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.measurement-system-toggle select:hover {
    border-color: #f0c040;
    box-shadow: 0 4px 12px rgba(240, 192, 64, 0.3);
}

.measurement-system-toggle select:focus {
    outline: none;
    border-color: #f0c040;
    box-shadow: 0 0 0 3px rgba(240, 192, 64, 0.2);
}

/* Expanded Technical Details */
.hidden-tech-details {
    margin-top: 2rem;
}

.tech-details-expanded {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.tech-details-expanded .tech-section {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 15px;
    padding: 2rem;
    border-left: 4px solid #f0c040;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

/* Maintenance */
.maintenance-section {
    max-width: 100%;
}

.maintenance-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.maintenance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    border-left: 4px solid #f0c040;
    gap: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.maintenance-task {
    font-weight: 500;
    color: #fff;
    flex: 1;
}

.maintenance-interval {
    color: #ccc;
    font-weight: 600;
    text-align: right;
    min-width: 150px;
}

/* Parts */
.parts-section {
    max-width: none;
}

.parts-category {
    margin-bottom: 2rem;
}

.parts-category h4 {
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0c040;
}

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

.part-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    border-left: 4px solid #f0c040;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.part-name {
    font-weight: 500;
    color: #fff;
}

.part-code {
    font-family: 'Courier New', monospace;
    background: rgba(60, 60, 60, 0.8);
    color: #f0c040;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* Community */
.community-section, .faqs-section {
    margin-bottom: 2rem;
}

.insights-container {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.insight-item {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 15px;
    padding: 1.5rem;
    border-left: 4px solid #f0c040;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.insight-item i {
    color: #f0c040;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.insight-item p {
    font-style: italic;
    line-height: 1.6;
    margin: 0;
    color: #fff;
}

/* FAQs */
.faqs-container {
    margin-top: 1.5rem;
}

.faq-item {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.faq-question {
    padding: 1.5rem;
    background: rgba(60, 60, 60, 0.6);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: background-color 0.3s ease;
    color: #fff;
}

.faq-question:hover {
    background: rgba(80, 80, 80, 0.8);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: #f0c040;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.active {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    line-height: 1.6;
    color: #ccc;
}

/* Ownership Costs */
.ownership-costs {
    background: rgba(40, 40, 40, 0.8);
    border-radius: 10px;
    padding: 1.5rem;
    line-height: 1.6;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 192, 64, 0.2);
}

.ownership-costs p {
    margin: 0;
    color: #ccc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .car-header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        align-items: center;
    }
    
    .car-image-container {
        width: 300px;
        height: 300px; /* Maintain square on tablet */
        margin: 0 auto;
    }
    
    .car-header-info {
        padding: 0;
    }
    
    .car-header-info h1 {
        font-size: 2.5rem;
    }
    
    .quick-specs {
        grid-template-columns: repeat(2, 1fr);
        margin-top: 2rem;
    }
    
    .features-grid, .issues-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list, .issues-list {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb {
        margin-top: 90px;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .technical-grid {
        grid-template-columns: 1fr;
    }
    
    .content-tabs {
        overflow-x: auto;
    }
    
    .tab-btn {
        min-width: 100px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .parts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .car-header {
        padding: 2rem 0;
    }
    
    .car-header-content {
        grid-template-columns: 1fr;
    }
    
    .car-image-container {
        width: 250px;
        height: 250px; /* Maintain square on mobile */
    }
    
    .car-header-info {
        padding: 0;
    }
    
    .car-header-info h1 {
        font-size: 2rem;
    }
    
    .quick-specs {
        grid-template-columns: 1fr;
        margin-top: 1.5rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .features-grid, .issues-grid {
        grid-template-columns: 1fr;
    }
    
    .features-list, .issues-list {
        grid-template-columns: 1fr;
    }
    
    .breadcrumb {
        margin-top: 80px;
    }
    
    .info-section, .tech-section {
        padding: 1.5rem;
    }
}
