/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    border: none;
    outline: none;
}

.header-image {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    border: none;
    outline: none;
}

.header-bg {
    width: 100%;
    height: 100%;
    background-image: url('https://www.trinidriver.triniwire.com/images/header_background1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    display: block;
    border: none;
    outline: none;
    vertical-align: top;
}

@media (max-width: 768px) {
    .header {
        height: 30vh;
        max-height: 300px;
        margin: 0;
        padding: 0;
        line-height: 0;
        font-size: 0;
        border: none;
        outline: none;
    }
    
    .header-bg {
        width: 100%;
        height: 100%;
        background-image: url('https://www.trinidriver.triniwire.com/images/header_background_mobile.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        margin: 0;
        padding: 0;
        line-height: 0;
        font-size: 0;
        display: block;
        border: none;
        outline: none;
        vertical-align: top;
    }
    
    .header-content p {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        height: 25vh;
        max-height: 250px;
        margin: 0;
        padding: 0;
        line-height: 0;
        font-size: 0;
        border: none;
        outline: none;
    }
    
    .header-bg {
        width: 100%;
        height: 100%;
        background-image: url('https://www.trinidriver.triniwire.com/images/header_background_mobile.png');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        margin: 0;
        padding: 0;
        line-height: 0;
        font-size: 0;
        display: block;
        border: none;
        outline: none;
        vertical-align: top;
    }
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.0), rgba(0, 0, 0, 0.0));
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    border: none;
    outline: none;
}

.header-content {
    text-align: center;
    color: white;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.header-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.header-content p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin: 0;
}

/* Navigation Styles */
.navbar {
    background-color: #2c3e50;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #ecf0f1;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.nav-link[href="add-vehicle.html"] {
    color: white !important;
    background-color: #e74c3c;
    font-weight: bold;
}

.nav-link[href="add-vehicle.html"]:hover {
    color: white !important;
    background-color: #c0392b;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    color: #ecf0f1;
    font-weight: 500;
    font-size: 0.9rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #ecf0f1;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    padding: 40px 0;
}

/* Category Filter */
.category-filter {
    background-color: white;
    padding: 30px 0;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-filter h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5rem;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.category-btn {
    background-color: #ecf0f1;
    border: 2px solid #bdc3c7;
    color: #2c3e50;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-btn:hover,
.category-btn.active {
    background-color: #3498db;
    border-color: #3498db;
    color: white;
}

/* Vehicle Listings */
.vehicle-listings {
    margin-bottom: 50px;
}

.vehicle-listings h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
    font-size: 2.2rem;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.vehicle-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.vehicle-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: #f8f9fa;
    padding: 5px;
}

.vehicle-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
    color: #2c3e50;
}

.vehicle-info {
    padding: 20px;
}

.vehicle-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.vehicle-details {
    margin-bottom: 15px;
}

.vehicle-detail {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.vehicle-detail strong {
    color: #34495e;
}

.vehicle-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #27ae60;
    text-align: center;
    margin-top: 15px;
}

/* Add Vehicle Section */
.add-vehicle-section {
    background: linear-gradient(135deg, #3498db, #2980b9);
    padding: 50px 0;
    margin: 50px 0;
}

.add-vehicle-card {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.add-vehicle-card h3 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 15px;
}

.add-vehicle-card p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.add-vehicle-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: #e74c3c;
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .header-content h1 {
        font-size: 2.5rem;
    }
    
    .header-content p {
        font-size: 1.1rem;
    }
    
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px 0;
        position: static;
        background-color: transparent;
        width: auto;
        text-align: center;
        box-shadow: none;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
    
    .category-filter {
        padding-top: 0;
    }
    
    .vehicle-listings h2 {
        font-size: 1.8rem;
    }
    
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    /* Mobile Image Gallery Layout */
    .image-gallery {
        flex-direction: column;
        align-items: center;
    }
    
    .main-image {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .main-image img {
        width: 100%;
        max-width: 400px;
        height: 250px;
        object-fit: cover;
        border-radius: 10px;
    }
    
    .gallery-thumbnails {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        max-width: 100%;
    }
    
    .gallery-thumbnails img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 5px;
        cursor: pointer;
        border: 2px solid transparent;
        transition: all 0.3s ease;
    }
    
    .gallery-thumbnails img:hover,
    .gallery-thumbnails img.active {
        border-color: #3498db;
        transform: scale(1.1);
    }
    
    /* Image Modal Navigation */
    .image-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(0, 0, 0, 0.5);
        color: white;
        border: none;
        font-size: 24px;
        padding: 10px 15px;
        cursor: pointer;
        border-radius: 5px;
    }
    
    .image-nav.prev {
        left: 20px;
    }
    
    .image-nav.next {
        right: 20px;
    }
    
    .image-nav:hover {
        background-color: rgba(0, 0, 0, 0.8);
    }
    
    .image-counter {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        color: white;
        background-color: rgba(0, 0, 0, 0.7);
        padding: 5px 15px;
        border-radius: 20px;
        font-size: 14px;
    }
    
    /* Touch-friendly image modal */
    .image-modal img {
        touch-action: pan-x;
        user-select: none;
        -webkit-user-select: none;
    }
    
    .gallery-thumbnail {
        touch-action: manipulation;
    }
    
    /* Optimize vehicle title for more characters per line */
    .vehicle-title {
        font-size: 0.9rem;
        line-height: 1.1;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    /* Reduce padding in vehicle cards on mobile for more text space */
    .vehicle-info {
        padding: 12px;
    }
    
    /* Mobile modal adjustments for 768px breakpoint */
    .modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 15px;
        max-height: 98vh;
        overflow-x: hidden;
        box-sizing: border-box;
        display: block;
        flex-direction: column;
    }
    
    .modal {
        padding: 0;
        left: 0;
        right: 0;
    }
    
    .modal-image-section,
    .modal-details-section {
        flex: none;
        width: 100%;
        padding-left: 0;
    }
    
    .modal-details-section {
        margin-top: 20px;
    }
    
    /* Ensure modal content fits without horizontal scroll */
    .vehicle-detail-info {
        word-wrap: break-word;
        overflow-wrap: break-word;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .vehicle-detail-info h2 {
        font-size: 1.5rem;
        word-wrap: break-word;
        margin: 0 0 15px 0;
    }
    
    .detail-grid {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .detail-item {
        margin-bottom: 10px;
        word-wrap: break-word;
        width: 100%;
        box-sizing: border-box;
    }
    
    .detail-item strong {
        display: inline-block;
        min-width: 80px;
    }
    
    /* Black scrollbar for image modal */
    .image-modal {
        scrollbar-width: thin;
        scrollbar-color: #000000 #000000;
    }
    
    .image-modal::-webkit-scrollbar {
        width: 8px;
    }
    
    .image-modal::-webkit-scrollbar-track {
        background: #000000;
    }
    
    .image-modal::-webkit-scrollbar-thumb {
        background: #000000;
        border-radius: 4px;
    }
    
    .image-modal::-webkit-scrollbar-thumb:hover {
        background: #333333;
    }
    
    .category-buttons {
        gap: 10px;
    }
    
    .category-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .add-vehicle-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    .header {
        height: 300px;
    }
    
    .header-content h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        gap: 6px;
        padding: 8px 0;
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Optimize vehicle title for very small mobile screens */
    .vehicle-title {
        font-size: 0.85rem;
        line-height: 1.1;
        font-weight: 600;
        margin-bottom: 6px;
    }
    
    /* Even less padding on very small screens */
    .vehicle-info {
        padding: 10px;
    }
    
    .add-vehicle-card {
        padding: 30px 20px;
    }
    
    /* Mobile modal adjustments */
    .modal-content {
        width: 98%;
        margin: 1% auto;
        padding: 15px;
        max-height: 98vh;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    
    .modal {
        padding: 0;
        left: 0;
        right: 0;
    }
    
    /* Ensure modal content fits without horizontal scroll on small mobile */
    .vehicle-detail-info h2 {
        font-size: 1.3rem;
        margin: 0 0 10px 0;
    }
    
    .detail-item {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }
    
    .detail-item strong {
        min-width: 70px;
    }
}

@media (min-width: 1200px) {
    .vehicle-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 1200px;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    gap: 30px;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Desktop Modal Layout */
.modal-image-section {
    flex: 1;
    min-width: 0;
}

.modal-details-section {
    flex: 1;
    min-width: 0;
    padding-left: 20px;
}

.modal-image-section .image-gallery {
    flex-direction: column;
    align-items: flex-start;
}

.modal-image-section .main-image {
    width: 100%;
    margin-bottom: 15px;
}

.modal-image-section .main-image img {
    width: 100%;
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
}

.modal-image-section .gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.modal-image-section .gallery-thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.modal-image-section .gallery-thumbnails img:hover,
.modal-image-section .gallery-thumbnails img.active {
    border-color: #3498db;
    transform: scale(1.05);
}

.modal-details-section h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2c3e50;
}

.modal-details-section .detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-details-section .detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.modal-details-section .detail-item strong {
    font-weight: 600;
    color: #2c3e50;
    min-width: 120px;
}

.modal-details-section .detail-item span {
    text-align: right;
    color: #7f8c8d;
}

.modal-details-section .price-highlight {
    color: #e74c3c !important;
    font-weight: bold;
    font-size: 1.2rem;
}

.modal-details-section .vehicle-description {
    margin-top: 20px;
}

.modal-details-section .vehicle-description h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.modal-details-section .vehicle-description p {
    line-height: 1.6;
    color: #7f8c8d;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Payment Styles */
.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.payment-option {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid #e9ecef;
}

.payment-option h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.bank-details {
    background-color: #e8f5e8;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

.bank-details h4 {
    color: #27ae60;
    margin-bottom: 15px;
}

.bank-details p {
    margin-bottom: 10px;
    font-weight: 500;
}

/* Admin Styles */
.admin-panel {
    background-color: #34495e;
    color: white;
    padding: 20px;
    margin-bottom: 30px;
}

.admin-panel h2 {
    margin-bottom: 20px;
}

.admin-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.admin-btn {
    background-color: #e74c3c;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.admin-btn:hover {
    background-color: #c0392b;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 500;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Auth Styles */
.auth-container {
    max-width: 500px;
    margin: 50px auto;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background-color: #f8f9fa;
}

.tab-btn {
    flex: 1;
    padding: 20px;
    border: none;
    background-color: transparent;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background-color: #3498db;
    color: white;
}

.auth-form {
    padding: 40px;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

.auth-form p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-full {
    width: 100%;
    margin-top: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Add Vehicle Styles */
.add-vehicle-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.add-vehicle-container h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    text-align: center;
}

.add-vehicle-container > p {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #ecf0f1;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.image-upload-area {
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s ease;
    position: relative;
}

.image-upload-area:hover {
    border-color: #3498db;
}

.image-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder i {
    font-size: 3rem;
    color: #bdc3c7;
    margin-bottom: 15px;
}

.upload-placeholder p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.upload-placeholder small {
    color: #95a5a6;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-image {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.preview-image img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

/* Payment Styles */
.payment-container {
    max-width: 1000px;
    margin: 0 auto;
}

.vehicle-summary {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.vehicle-summary h3 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.listing-fee {
    background-color: #e8f5e8;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: center;
}

.listing-fee h4 {
    color: #27ae60;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.paypal-container {
    margin: 20px 0;
    text-align: center;
}

.bank-payment-form {
    background-color: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bank-info {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.bank-info p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.bank-instructions {
    background-color: #e3f2fd;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.bank-instructions h4 {
    color: #1976d2;
    margin-bottom: 15px;
}

.bank-instructions ol {
    margin-left: 20px;
}

.bank-instructions li {
    margin-bottom: 8px;
}

/* Admin Panel Styles */
.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-listings {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.admin-listing-card {
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 20px;
    align-items: center;
}

.listing-image img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.listing-details h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.listing-details p {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.listing-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.status-pending {
    color: #f39c12;
    font-weight: bold;
}

.status-approved {
    color: #27ae60;
    font-weight: bold;
}

.no-data {
    text-align: center;
    color: #7f8c8d;
    font-style: italic;
    padding: 40px;
}

/* Vehicle Detail Modal Styles */
.vehicle-detail-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ecf0f1;
}

.price-highlight {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2rem;
}

.vehicle-description {
    margin: 20px 0;
}

.vehicle-description h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.contact-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Contact Page Styles */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin: 50px 0;
}

.contact-info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.contact-methods {
    display: grid;
    gap: 30px;
    margin-top: 30px;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-method i {
    font-size: 2rem;
    color: #3498db;
    margin-top: 5px;
}

.contact-method h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.contact-method p {
    margin-bottom: 5px;
    color: #7f8c8d;
}

.contact-form-container {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form-container h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

/* FAQ Section */
.faq-section {
    margin: 80px 0;
}

.faq-section h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
}

.faq-container {
    display: grid;
    gap: 20px;
}

.faq-item {
    background-color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.faq-item p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* Cars Page Styles */
.search-filter-section {
    background: linear-gradient(135deg, #3498db, #2980b9);
    padding: 50px 0;
    margin-bottom: 50px;
}

.search-container {
    text-align: center;
    margin-bottom: 40px;
}

.search-container h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 15px;
}

.search-input {
    flex: 1;
    position: relative;
}

.search-input i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
}

.search-input input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-container {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    color: white;
    margin-bottom: 8px;
    font-weight: 600;
}

.filter-group select {
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.filter-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.listings-header h2 {
    color: #2c3e50;
    font-size: 2rem;
}

.sort-options {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-options label {
    color: #7f8c8d;
    font-weight: 600;
}

.sort-options select {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.load-more-container {
    text-align: center;
    margin-top: 50px;
}

.no-vehicles {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-vehicles h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.pagination-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #2980b9;
}

.pagination-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.pagination-info {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background-color: #e74c3c;
    color: white;
}

.role-badge.user {
    background-color: #3498db;
    color: white;
}

/* Image Gallery Styles */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: center;
}

.gallery-image {
    transition: all 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
    border-color: #3498db !important;
}

.main-image {
    text-align: center;
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    scrollbar-width: thin;
    scrollbar-color: #000000 #000000;
}

.image-modal::-webkit-scrollbar {
    width: 8px;
}

.image-modal::-webkit-scrollbar-track {
    background: #000000;
}

.image-modal::-webkit-scrollbar-thumb {
    background: #000000;
    border-radius: 4px;
}

.image-modal::-webkit-scrollbar-thumb:hover {
    background: #333333;
}

/* Expanded Image View */
.expanded-image-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.expanded-image-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1000px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.expanded-image-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.expanded-image-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 30px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10002;
}

.expanded-image-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.expanded-image-nav.prev {
    left: 30px;
}

.expanded-image-nav.next {
    right: 30px;
}

/* Ensure navigation arrows are positioned relative to the modal, not the content */
.expanded-image-modal {
    position: relative;
}

.expanded-image-modal .expanded-image-nav {
    position: fixed;
}

.expanded-image-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10003;
}

.expanded-image-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.expanded-image-counter {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    backdrop-filter: blur(10px);
    z-index: 10002;
}

/* Mobile responsive for expanded image modal */
@media (max-width: 768px) {
    .expanded-image-content {
        width: 95%;
        padding: 10px;
    }
    
    .expanded-image-content img {
        max-height: 70vh;
    }
    
    .expanded-image-nav {
        font-size: 24px;
        padding: 12px 16px;
    }
    
    .expanded-image-nav.prev {
        left: 15px;
    }
    
    .expanded-image-nav.next {
        right: 15px;
    }
    
    .expanded-image-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .expanded-image-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }
    
    /* Mobile Image Modal Fixes */
    .image-modal-content {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .image-modal-content img {
        max-width: 100vw;
        max-height: 85vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
    
    .image-nav {
        position: fixed;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border: none;
        font-size: 30px;
        padding: 15px 20px;
        cursor: pointer;
        z-index: 10002;
        border-radius: 0;
    }
    
    .image-nav.prev {
        left: 10px;
    }
    
    .image-nav.next {
        right: 10px;
    }
    
    .image-counter {
        position: fixed;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 10px 20px;
        border-radius: 20px;
        font-size: 14px;
        z-index: 10002;
    }
    
    .image-close {
        position: fixed;
        top: 20px;
        right: 20px;
        color: white;
        font-size: 40px;
        font-weight: bold;
        cursor: pointer;
        z-index: 10002;
        background: rgba(0, 0, 0, 0.5);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.image-modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.image-close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.image-close:hover {
    color: #3498db;
}

/* Advertise Page Styles */
.advertise-hero {
    text-align: center;
    margin: 50px 0;
    padding: 40px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 15px;
    color: white;
}

.advertise-hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.advertise-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.advertising-packages {
    margin: 60px 0;
}

.advertising-packages h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-size: 2rem;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.package-card {
    background-color: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease;
}

.package-card:hover {
    transform: translateY(-5px);
}

.package-card.featured {
    border: 3px solid #3498db;
    transform: scale(1.05);
}

.package-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e74c3c;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.package-header {
    text-align: center;
    margin-bottom: 30px;
}

.package-header h4 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.package-price {
    color: #27ae60;
    font-size: 2rem;
    font-weight: bold;
}

.package-price span {
    font-size: 1rem;
    color: #7f8c8d;
}

.package-features ul {
    list-style: none;
    margin-bottom: 30px;
}

.package-features li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    color: #7f8c8d;
}

.package-features i {
    color: #27ae60;
    margin-right: 10px;
    font-size: 1.1rem;
}

.advertising-form-section {
    background-color: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin: 50px 0;
}

.advertising-form-section h3 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
    font-size: 2rem;
}

.advertising-form-section > p {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.why-advertise {
    margin: 80px 0;
}

.why-advertise h3 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 50px;
    font-size: 2rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 30px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-item i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
}

.benefit-item h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.benefit-item p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-container {
        margin: 20px;
    }
    
    .add-vehicle-container {
        margin: 20px;
        padding: 20px;
    }
    
    .admin-listing-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .listing-actions {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .vehicle-detail-view {
        grid-template-columns: 1fr;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
        gap: 30px;
        margin: 30px 0;
    }
    
    .contact-method {
        flex-direction: column;
        text-align: center;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .listings-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sort-options {
        width: 100%;
        justify-content: space-between;
    }
    
    .advertise-hero h2 {
        font-size: 2rem;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .package-card.featured {
        transform: none;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
