/**
 * Troovo Auto - Subdomain-specific styles only
 * Common styles (buttons, forms, navbar, footer, etc.) are in theme.css
 * Use --troovo-* variables directly - no mapping needed
 */

/* ========================================
   Dropdown styling (from main site style.css)
   ======================================== */
.dropdown-menu,.list-group-item,.modal-content{border-color:var(--troovo-border)}
.dropdown-menu,.modal-content{box-shadow:0 12px 28px rgba(0,0,0,.12);border-radius:var(--bs-border-radius-lg)}
.dropdown-item{padding:.5rem .9rem}
.dropdown-item:focus,.dropdown-item:hover{color:var(--troovo-accent);background-color:var(--troovo-bg-hover)}
.dropdown-item.active,.dropdown-item:active{color:var(--troovo-accent);background-color:var(--troovo-bg-hover)}

/* Swiss/Troovo brand classes are in theme.css */

/* ========================================
   Landing Page Hero
   ======================================== */
.auto-landing-hero {
    background: linear-gradient(135deg, #9d9dc9 0%, #53aebd 50%, #0f3460 100%);
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.auto-landing-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.auto-landing-hero .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .auto-landing-hero {
        padding: 3rem 0;
    }
    .auto-landing-hero h1 {
        font-size: 1.75rem;
    }
}

/* Comparison Table styles are in theme.css */

/* ========================================
   Benefit Cards
   ======================================== */
.auto-benefit-card {
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.auto-benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.auto-benefit-icon {
    font-size: 2.5rem;
    color: var(--troovo-accent);
    margin-bottom: 1rem;
}

.auto-why-icon {
    font-size: 3rem;
    height: 80px;
    width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.auto-why-icon.icon-simple {
    color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.auto-why-icon.icon-inexpensive {
    color: #fd7e14;
    background: rgba(253, 126, 20, 0.1);
}

.auto-why-icon.icon-fast {
    color: #007bff;
    background: rgba(0, 123, 255, 0.1);
}

.auto-why-icon.icon-secure {
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.1);
}

.auto-benefit-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--troovo-text);
}

.auto-benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auto-benefit-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--troovo-border);
}

.auto-benefit-list li:last-child {
    border-bottom: none;
}

/* ========================================
   Vehicle Type Cards
   ======================================== */
.auto-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--troovo-text);
    transition: all 0.2s;
}

.auto-type-card:hover {
    border-color: var(--troovo-accent);
    color: var(--troovo-accent);
    transform: translateY(-2px);
}

.auto-type-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* ========================================
   Filters Card
   ======================================== */
.auto-filters-card {
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    padding: 1.5rem;
    position: sticky;
    top: 1rem;
}

/* ========================================
   Vehicle Cards (Browse)
   ======================================== */
.auto-vehicle-card {
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.auto-vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.auto-vehicle-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--troovo-border);
}

.auto-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auto-vehicle-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--troovo-text-muted);
    font-size: 3rem;
}

.auto-vehicle-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.auto-vehicle-badge.badge-new {
    background: #28a745;
    color: #fff;
}

.auto-vehicle-badge.badge-used {
    background: #6c757d;
    color: #fff;
}

.auto-vehicle-badge.badge-ev {
    background: #17a2b8;
    color: #fff;
}

.auto-vehicle-info {
    padding: 1rem;
}

.auto-vehicle-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--troovo-accent);
    margin-bottom: 0.5rem;
}

.auto-vehicle-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--troovo-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.auto-vehicle-subtitle {
    font-size: 0.875rem;
    color: var(--troovo-text-muted);
    margin-bottom: 0.75rem;
}

.auto-vehicle-location {
    font-size: 0.875rem;
    color: var(--troovo-text-muted);
    margin-bottom: 0.75rem;
}

.auto-vehicle-location i {
    margin-right: 0.25rem;
}

.auto-vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--troovo-text-muted);
}

.auto-vehicle-specs span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ========================================
   Vehicle Detail Page
   ======================================== */
.auto-detail-gallery {
    margin-bottom: 2rem;
}

.auto-detail-main-image {
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: var(--troovo-border);
}

.auto-detail-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auto-detail-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    overflow-x: auto;
}

.auto-detail-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.auto-detail-thumbnail.active,
.auto-detail-thumbnail:hover {
    opacity: 1;
}

.auto-detail-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auto-detail-specs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.auto-detail-spec {
    text-align: center;
    min-width: 120px;
    flex: 0 1 150px;
}

.auto-detail-spec-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--troovo-accent);
}

.auto-detail-spec-label {
    font-size: 0.875rem;
    color: var(--troovo-text-muted);
}

/* Tech specs table for vehicle details */
.auto-specs-table {
    width: 100%;
}

.auto-specs-table tr {
    border-bottom: 1px solid var(--troovo-border);
}

.auto-specs-table tr:last-child {
    border-bottom: none;
}

.auto-specs-table th,
.auto-specs-table td {
    padding: 0.75rem 0;
}

.auto-specs-table th {
    font-weight: 500;
    color: var(--troovo-text-muted);
    width: 40%;
}

.auto-specs-table td {
    font-weight: 600;
    color: var(--troovo-text);
}

.auto-detail-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.auto-detail-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--troovo-bg);
    border: 1px solid var(--troovo-border);
    border-radius: 20px;
    font-size: 0.875rem;
}

.auto-detail-feature i {
    color: var(--troovo-accent);
}

.auto-detail-sidebar {
    position: sticky;
    top: 1rem;
}

.auto-detail-contact-card {
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* EV-specific styling */
.auto-ev-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #00b894, #00cec9);
    color: #fff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.auto-ev-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.1), rgba(0, 206, 201, 0.1));
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.auto-ev-stat {
    text-align: center;
}

.auto-ev-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #00b894;
}

.auto-ev-stat-label {
    font-size: 0.75rem;
    color: var(--troovo-text-muted);
}

/* ========================================
   Post Form
   ======================================== */
.auto-form-section {
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.auto-form-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--troovo-border);
}

/* Conditional fields styling */
.auto-conditional-fields {
    display: none;
}

.auto-conditional-fields.active {
    display: block;
}

/* Footer Links styles are in theme.css */

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 991px) {
    .auto-filters-card {
        position: static;
        margin-bottom: 1.5rem;
    }

    .auto-detail-sidebar {
        position: static;
        margin-top: 1.5rem;
    }
}

@media (max-width: 767px) {
    .auto-detail-spec {
        min-width: 100px;
        flex: 0 1 calc(50% - 0.5rem);
    }

    .auto-ev-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   My Listings Dashboard
   ======================================== */
.auto-listings-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auto-listing-row {
    display: flex;
    gap: 1rem;
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 12px;
    overflow: hidden;
}

.auto-listing-image {
    width: 200px;
    min-height: 150px;
    flex-shrink: 0;
    background: var(--troovo-border);
}

.auto-listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.auto-listing-image .auto-vehicle-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--troovo-text-muted);
}

.auto-listing-details {
    flex: 1;
    padding: 1rem;
}

.auto-listing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--troovo-accent);
}

.auto-listing-specs {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--troovo-text-muted);
}

.auto-listing-specs span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.auto-listing-actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 767px) {
    .auto-listing-row {
        flex-direction: column;
    }

    .auto-listing-image {
        width: 100%;
        height: 150px;
    }
}

/* ========================================
   Make/Model Selector
   ======================================== */
.auto-make-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.auto-make-item {
    padding: 0.75rem;
    text-align: center;
    background: var(--troovo-bg);
    border: 1px solid var(--troovo-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.auto-make-item:hover {
    border-color: var(--troovo-accent);
}

.auto-make-item.selected {
    border-color: var(--troovo-accent);
    background: rgba(5, 150, 105, 0.1);
}

/* ========================================
   Quick filters (browse page)
   ======================================== */
.auto-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.auto-quick-filter {
    padding: 0.5rem 1rem;
    background: var(--troovo-bg-secondary);
    border: 1px solid var(--troovo-border);
    border-radius: 20px;
    font-size: 0.875rem;
    color: var(--troovo-text);
    text-decoration: none;
    transition: all 0.2s;
}

.auto-quick-filter:hover,
.auto-quick-filter.active {
    border-color: var(--troovo-accent);
    color: var(--troovo-accent);
}

.auto-quick-filter i {
    margin-right: 0.25rem;
}
