/* Mobile Responsive Fixes */

/* Prevent horizontal scroll on all pages */
body {
    overflow-x: hidden;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Container fixes for mobile */
.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Progress bar mobile responsive */
.progress-bar-mobile {
    display: none;
}

@media (max-width: 768px) {
    /* Hide desktop progress bar on mobile */
    .progress-bar-desktop {
        display: none;
    }
    
    /* Show mobile progress bar */
    .progress-bar-mobile {
        display: block;
    }
    
    /* Fix grid layouts that might cause horizontal scroll */
    .grid {
        gap: 1rem;
    }
    
    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Fix any wide elements */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix tables on mobile */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    /* Fix large text that might overflow */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix form elements */
    input, textarea, select {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix button layouts */
    .button-group {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Fix vehicle cards grid */
    .vehicle-card {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Fix specification tables */
    .spec-table {
        font-size: 0.875rem;
    }
    
    .spec-table .flex {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Category cards responsive adjustments */
    .grid.grid-cols-2.md\\:grid-cols-4 {
        gap: 0.75rem;
    }
    
    /* Category card content */
    .group.bg-gray-50 {
        padding: 0.75rem;
        border-radius: 0.5rem;
    }
    
    /* Category icons */
    .group.bg-gray-50 div[class*="text-2xl"] {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    /* Category titles */
    .group.bg-gray-50 h3 {
        font-size: 0.95rem;
        line-height: 1.3;
        margin-bottom: 0.25rem;
    }
    
    /* Category descriptions */
    .group.bg-gray-50 p {
        font-size: 0.8rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Specific fixes for order pages */
@media (max-width: 640px) {
    /* Reduce padding on mobile */
    .py-8 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Fix vehicle image gallery */
    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    /* Fix price display */
    .price-display {
        font-size: 1.5rem;
    }
    
    /* Fix trust badges */
    .trust-badges {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Fix any potential scrolling issues */
.no-scroll {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Mobile progress indicator */
.mobile-progress {
    background: linear-gradient(to right, #3B82F6 0%, #3B82F6 var(--progress, 14%), #E5E7EB var(--progress, 14%), #E5E7EB 100%);
    height: 4px;
    width: 100%;
    border-radius: 2px;
}

/* Mobile step indicator */
.mobile-step-info {
    text-align: center;
    padding: 1rem;
    background: #F8FAFC;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* Cache control for forms */
.no-cache {
    cache-control: no-cache, no-store, must-revalidate;
    pragma: no-cache;
    expires: 0;
}

/* Text truncation utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 3em; /* 2 lines × 1.5 line-height */
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: 4.5em; /* 3 lines × 1.5 line-height */
}

/* Professional Vehicle Cards */
.vehicle-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.vehicle-card:hover {
    transform: translateY(-2px);
    border-color: #3b82f6;
}

.vehicle-card .p-4 {
    padding: 1.25rem;
}

.vehicle-card h3 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #1f2937;
}

.vehicle-card .text-blue-600 {
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* Clean button styling */
.vehicle-card a[class*="bg-blue-600"] {
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

/* Image optimization for cards */
.vehicle-card img {
    transition: transform 0.3s ease;
}

.vehicle-card:hover img {
    transform: scale(1.02);
} 