/* Garage Page Mobile Optimization */

.garage-page {
    padding: 0 !important;
    overflow-x: hidden;
    box-sizing: border-box;
}

.garage-header {
    padding: 1rem 1rem 0.75rem;
    background: transparent;
    position: static;
}

.garage-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.garage-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.garage-vehicle-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 0;
    width: 100%;
    margin: 0 auto;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.garage-vehicle-card {
    background: rgba(14, 22, 36, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: 380px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.garage-vehicle-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.2);
}

/* Disable hover transform on touch devices to prevent stuck states */
@media (hover: none) {
    .garage-vehicle-card:hover {
        transform: none;
    }
}

.vehicle-card-image {
    width: 100%;
    height: 260px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
}

.vehicle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vehicle-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vehicle-card-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.vehicle-card-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex: 1;
}

.vehicle-stat {
    text-align: center;
}

.vehicle-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.vehicle-stat-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent-purple);
}

.vehicle-card-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(59, 130, 246, 0.1);
}

.vehicle-card-actions button {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.8rem;
    min-height: 40px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.vehicle-action-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    color: white;
}

.vehicle-action-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 2rem 1.5rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.empty-state-actions {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
    width: 100%;
}

.empty-state-actions button {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    min-height: 44px;
}

.empty-state-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    color: white;
}

.empty-state-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Filter and sort section */
.garage-filters {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.filter-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(139, 92, 246, 0.3);
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.8rem;
    min-height: 36px;
    display: flex;
    align-items: center;
}

.filter-badge.active {
    background: rgba(139, 92, 246, 0.3);
    border-color: var(--accent-purple);
}

/* AI content section - keep card size consistent */
.vehicle-maintenance-analysis,
.vehicle-ai-summary,
.vehicle-ai-content {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    box-sizing: border-box;
}

/* ============================================
   360PX ULTRA-SMALL DEVICE BREAKPOINT
   ============================================ */

@media (max-width: 360px) {
    .garage-page {
        padding: 0 !important;
    }

    .garage-header {
        padding: 1rem 0.75rem;
    }

    .garage-title {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .garage-subtitle {
        font-size: 0.85rem;
    }

    .garage-vehicle-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0.75rem;
        width: 100%;
        margin: 0 auto;
    }

    .vehicle-card {
        min-height: 360px;
        max-height: 550px;
        width: 100%;
        border-radius: 12px;
    }

    .vehicle-card-image {
        height: 140px;
        font-size: 2.5rem;
    }

    .vehicle-card-body {
        padding: 0.75rem;
    }

    .vehicle-card-title {
        font-size: 0.9rem;
    }

    .vehicle-card-subtitle {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .vehicle-card-stats {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .vehicle-stat-label {
        font-size: 0.65rem;
        margin-bottom: 0.1rem;
    }

    .vehicle-stat-value {
        font-size: 0.8rem;
    }

    .vehicle-card-actions {
        gap: 0.25rem;
        padding-top: 0.5rem;
    }

    .vehicle-card-actions button {
        padding: 0.5rem;
        font-size: 0.7rem;
        min-height: 36px;
    }

    .empty-state {
        min-height: 300px;
        padding: 1.5rem 0.75rem;
    }

    .empty-state-icon {
        font-size: 2.5rem;
        margin-bottom: 0.75rem;
    }

    .empty-state-title {
        font-size: 1.1rem;
        margin-bottom: 0.25rem;
    }

    .empty-state-message {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .empty-state-actions {
        gap: 0.5rem;
    }

    .empty-state-actions button {
        padding: 0.625rem 1rem;
        font-size: 0.8rem;
        min-height: 40px;
    }

    .garage-filters {
        padding: 0.75rem;
        gap: 0.375rem;
    }

    .filter-badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.7rem;
        min-height: 32px;
    }
}
