/* Custom CSS for CAAVIEWJAPAN Vehicle Listing Website */

/* Price display fixes */
.text-primary, .text-danger {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-body .text-danger, 
.card-body .text-primary,
.price-display {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem !important;
    line-height: 1.2 !important;
}

/* Specific price column styling */
.col-4 .price-display {
    font-size: 0.85rem !important;
    word-break: keep-all;
}

/* Global Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #334155;
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

/* Navigation responsive adjustments */
@media (max-width: 991px) {
    .btn-nav-modern {
        margin-bottom: 8px !important;
        display: block !important;
        text-align: center !important;
    }
    
    .navbar-nav .nav-item {
        margin-bottom: 5px;
    }
}

/* Modern Navigation Button Styling */
.btn-nav-modern {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: white !important;
    padding: 10px 18px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
}

.btn-nav-modern:hover {
    background: linear-gradient(135deg, #6366f1 0%, #60a5fa 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.btn-nav-modern:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* Remove any icons from navigation buttons */
.btn-nav-modern::before,
.btn-nav-modern::after,
.btn-nav-modern i {
    display: none !important;
    content: none !important;
}

/* Ensure no icon fonts are loaded in nav buttons */
.btn-nav-modern * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Legacy nav button styling - keep for compatibility */
.btn-nav {
    border: 2px solid #6c757d !important;
    border-radius: 20px !important;
    margin: 0 5px !important;
    padding: 8px 16px !important;
    transition: all 0.3s ease !important;
    background-color: transparent !important;
}

.btn-nav:hover {
    border-color: #007bff !important;
    background-color: #007bff !important;
    color: white !important;
    transform: translateY(-2px);
}

.btn-nav.active {
    border-color: #007bff !important;
    background-color: #007bff !important;
    color: white !important;
}

/* Main Content */
.main-content {
    padding-top: 76px; /* Account for fixed navbar */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="%23ffffff10"><polygon points="1000,100 1000,0 0,100"/></svg>');
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-content .lead {
    font-size: 1.3rem;
    opacity: 0.9;
}

.hero-buttons .btn {
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-search-card {
    margin-top: 2rem;
}

.hero-search-card .card {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Vehicle Cards */
.vehicle-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.card-img-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-top {
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.vehicle-card:hover .card-img-top {
    transform: scale(1.05);
}

.placeholder-img {
    height: 200px;
    background: linear-gradient(45deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.placeholder-img-large {
    height: 400px;
    background: linear-gradient(45deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}

.card-img-overlay-top {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.vehicle-features {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
}

.vehicle-info {
    background: #f8fafc;
    border-radius: 8px;
    padding: 15px;
}

/* Vehicle Detail Page */
.vehicle-detail-img {
    height: 400px;
    object-fit: cover;
}

.vehicle-gallery .carousel-item img {
    border-radius: 8px;
}

.spec-item {
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-item:last-child {
    border-bottom: none;
}

.sticky-top {
    top: 90px !important;
}

.seller-info {
    border: 1px solid #e2e8f0;
}

.contact-options .btn {
    font-weight: 600;
}

.phone-display {
    font-family: monospace;
    font-size: 1rem;
}

/* Stats Section */
.stat-item {
    padding: 20px;
}

.stat-icon {
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* About Section */
.about-card {
    transition: all 0.3s ease;
    height: 100%;
}

.about-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.feature-item {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

/* Contact Section */
.contact-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.contact-icon {
    margin-bottom: 15px;
}

/* Filter Section */
.card-title {
    color: var(--dark-color);
    font-weight: 600;
}

/* Admin Styles */
.table th {
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #dee2e6;
}

.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
}

.img-thumbnail {
    border: 1px solid #dee2e6;
}

/* Forms */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-control, .form-select {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 10px 12px;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    transform: translateY(-1px);
}

.btn-lg {
    padding: 12px 24px;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .vehicle-detail-img {
        height: 250px;
    }
    
    .sticky-top {
        position: relative !important;
        top: auto !important;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding-top: 66px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .vehicle-card .card-body {
        padding: 15px;
    }
}

/* Loading and Animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

footer .social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Empty States */
.empty-state {
    padding: 60px 20px;
}

.empty-state i {
    opacity: 0.5;
}

.empty-state h3, .empty-state h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.empty-state p {
    color: #6b7280;
    font-size: 1.1rem;
}
