/* Car Gallery Common Styles */
/* Uniform image sizing and responsive design */

/* Main gallery images (all_my_cars.html) */
.car-gallery img {
    width: 100%;
    height: 300px; /* Fixed height for consistency */
    object-fit: cover; /* Maintain aspect ratio while filling container */
    object-position: center; /* Center the image within the container */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Individual car gallery images */
.gallery-item img {
    width: 100%;
    height: 300px; /* Fixed height for consistency */
    object-fit: cover; /* Maintain aspect ratio while filling container */
    object-position: center; /* Center the image within the container */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

/* Enhanced View Details button */
.car-gallery .button {
    display: none;
    color: white;
    left: 50%;
    top: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 80%;
    height: 60px;
    line-height: 60px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.car-gallery .button:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 12px 24px rgba(0,0,0,0.4);
    border-color: rgba(255,255,255,0.6);
}

.car-gallery .img-container:hover .button {
    display: block;
    position: absolute; 
    left: 50%;
    top: 50%;
    width: 80%;
    text-align: center;
    color: white;
    animation: fadeInUp 0.3s ease-out;
}

/* Gallery item hover effects */
.gallery-item:hover {
    transform: scale(1.02);
}

.gallery-item:hover img {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Responsive design */
@media (max-width: 768px) {
    .car-gallery img,
    .gallery-item img {
        height: 250px; /* Smaller on mobile */
    }
    
    .car-gallery .button {
        height: 50px;
        line-height: 50px;
        font-size: 16px;
        width: 85%;
    }
}

@media (max-width: 480px) {
    .car-gallery img,
    .gallery-item img {
        height: 200px; /* Even smaller on very small screens */
    }
    
    .car-gallery .button {
        height: 45px;
        line-height: 45px;
        font-size: 14px;
        width: 90%;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0);
    }
}

/* Page by page view image sizing */
#current-page-img {
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Main description image sizing */
.main-description-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .main-description-img {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .main-description-img {
        height: 250px;
    }
}

