/* Fleet Index Styling */
.fleet-page-container {
    padding-top: 60px;
}

.fleet-hero {
    padding: 60px 5vw 0;
    text-align: center;
    background: linear-gradient(to bottom, #f0f2f5, #ffffff);
}

.fleet-title {
    font-size: clamp(2.5rem, 5vw, 3rem);
    font-weight: 950;
    margin-bottom: 20px;
    color: #111;
    letter-spacing: -2px;
}

.fleet-subtitle {
    color: #666;
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

nav {
    box-shadow: none !important;
}

/* Filter Bar */
.fleet-filter-bar {
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 76px;
    z-index: 90;
    width: 100%;
    /* Fade effect for scroll indicators */
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

@media (max-width: 1335px) {
    .fleet-filter-bar {
        top: 66px;
    }
}

.filter-container {
    width: 100%;
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 5vw;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Smart centering: center if fits, left-align if overflows */
.filter-container::before,
.filter-container::after {
    content: '';
    margin: auto;
}

.filter-container::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    background: #f8fafc;
    border: 1px solid #eef2f6;
    padding: 12px 24px;
    border-radius: 99px;
    font-weight: 800;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #fff;
    border-color: #2aa175;
    color: #2aa175;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 161, 117, 0.1);
}

.filter-btn.active {
    background: #2aa175;
    border-color: #2aa175;
    color: #fff;
    box-shadow: 0 10px 20px rgba(42, 161, 117, 0.2);
}

/* Unified Grid & Animations */
.fleet-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1400px;
    margin: 0 auto;
}

.fleet-item {
    flex: 0 1 420px;
    min-width: 320px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    transform: scale(1);
    overflow: hidden;
    padding: 20px;
}

.fleet-item.hidden-card {
    opacity: 0;
    transform: scale(0.6);
    flex-basis: 0;
    min-width: 0;
    width: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.fleet-section {
    padding: 30px 5vw 80px;
}

/* Vehicle Card */
.vehicle-card {
    background: #ffffff;
    border-radius: 32px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.vehicle-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 15px 30px -12px rgba(0, 0, 0, 0.2);
    border-color: rgba(42, 161, 117, 0.3);
}

.vehicle-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.vehicle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.vehicle-card:hover .vehicle-card-image img {
    transform: scale(1.08);
}

.vehicle-card-content {
    width: 100%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-card-name {
    overflow: hidden;
    white-space: nowrap;
    font-size: 1.4rem;
    font-weight: 900;
    color: #111;
    margin-bottom: 15px;
    line-height: 1.2;
    position: relative;
}

.vehicle-card-name::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50px;
    height: 100%;
    background: linear-gradient(to right, transparent, white);
}

.vehicle-card-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-item {
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-weight: 700;
    font-size: 0.95rem;
}

.stat-item svg {
    color: #2aa175;
}

.vehicle-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.view-btn {
    overflow: hidden;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    color: #2aa175;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Vehicle Detail Page */
.vehicle-container {
    padding-top: 60px;
    padding-bottom: 100px;
    max-width: 1640px;
    margin: 0 auto;
    padding-left: 5vw;
    padding-right: 5vw;
}

.vehicle-layout {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.vehicle-left {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.vehicle-sidebar {
    width: 420px;
    position: sticky;
    top: 100px;
}

.vehicle-gallery {
    margin-bottom: 40px;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.2);
    background: #f0f0f0;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    cursor: pointer;
}

.vehicle-gallery-swiper {
    width: 100%;
    height: 100%;
    display: block;
}

.vehicle-gallery-swiper .swiper-wrapper {
    display: flex !important;
}

.vehicle-gallery-swiper .swiper-slide {
    flex-shrink: 0;
    /* Do NOT set width/height: 100% here as it fights Swiper's inline styles */
}

.vehicle-gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Swiper Controls Customization */
.vehicle-gallery-swiper .swiper-button-next,
.vehicle-gallery-swiper .swiper-button-prev {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    color: #2aa175;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.vehicle-gallery-swiper .swiper-button-next::after,
.vehicle-gallery-swiper .swiper-button-prev::after {
    font-size: 1.1rem;
    font-weight: 900;
}

.vehicle-gallery-swiper .swiper-button-prev::after {
    margin-right: 3px;
}

.vehicle-gallery-swiper .swiper-button-next:hover,
.vehicle-gallery-swiper .swiper-button-prev:hover {
    background: #2aa175;
    color: #fff;
    transform: scale(1.1);
}

.vehicle-gallery-swiper .swiper-button-next:active,
.vehicle-gallery-swiper .swiper-button-prev:active {
    scale: 0.8;
}

.swiper-pagination {
    width: fit-content !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

.vehicle-gallery-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #fff;
    opacity: 0.6;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.vehicle-gallery-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #2aa175;
    width: 25px;
    border-radius: 5px;
}

/* Swiper pagination and navigation styles moved/maintained below */

.vehicle-description-box {
    background: #ffffff;
    border-radius: 32px;
    padding: 24px 32px;
    border: 1px solid #f0f0f0;
    margin-bottom: 40px;
}

.vehicle-description-box h2 {
    font-size: 2.25rem;
    font-weight: 950;
    color: #111;
    margin-bottom: 15px;
}

.vehicle-description-box p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 20px;
}

.spec-box {
    background: #f8fafc;
    padding: 25px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid #eef2f6;
}

.spec-box-icon {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #2aa175;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.spec-box-value {
    font-size: 1.5rem;
    font-weight: 900;
    color: #111;
    display: block;
}

.spec-box-label {
    font-size: 0.85rem;
    color: #777;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sidebar Box */
.booking-cta-box {
    background: #fff;
    color: #fff;
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.3);
}

.cta-tag {
    color: #2aa175;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: block;
}

.cta-title {
    font-size: 2.25rem;
    font-weight: 950;
    line-height: 1.1;
    margin-bottom: 20px;
}

.cta-price {
    margin-bottom: 35px;
}

.cta-price .label { color: #888; font-weight: 700; display: block; }
.cta-price .amount { font-size: 2.5rem; font-weight: 950; color: var(--text-clr); }
.cta-price .amount span { font-size: 1.1rem; color: #888; font-weight: 700; }

.cta-btn {
    width: 100%;
    background: #2aa175;
    color: #fff;
    border: none;
    padding: 22px;
    border-radius: 20px;
    font-size: 1.25rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.cta-btn:hover {
    background: #228b63;
    transform: scale(1.02);
}

/* Mobile Adjustments */
@media (max-width: 1100px) {
    .vehicle-layout {
        flex-direction: column;
        gap: 0;
    }
    
    .vehicle-sidebar {
        width: 100%;
        position: static;
        order: 2; /* Sidebar (booking) below details */
    }

    .vehicle-left {
        order: 1;
    }

    .vehicle-container {
        padding-top: 40px;
        padding-bottom: 60px;
    }
}

@media (max-width: 768px) {
    .fleet-grid {
        display: flex; /* Matches index flex logic */
        flex-direction: column;
        align-items: center;
    }
    
    .spec-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .vehicle-description-box h2 {
        font-size: 1.8rem;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .vehicle-gallery-swiper .swiper-slide {
        height: 100%;
    }

    /* Ensure buttons are visible on mobile */
    .vehicle-gallery-swiper .swiper-button-next,
    .vehicle-gallery-swiper .swiper-button-prev {
        display: flex !important;
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.7);
    }
    
    .vehicle-gallery-swiper .swiper-button-next::after,
    .vehicle-gallery-swiper .swiper-button-prev::after {
        font-size: 0.9rem;
    }

    .fleet-title {
        font-size: 2rem;
    }

    .vehicle-gallery,
    .vehicle-description-box {
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .fleet-title {
        font-size: 1.75rem;
    }

    .vehicle-description-box h2 {
        font-size: 1.5rem;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-description-box {
        padding: 18px 20px;
    }

    .spec-box {
        padding: 20px;
    }

    .stat-item {
        font-size: 0.85rem;
    }

    .vehicle-card-name {
        font-size: 1.2rem;
    }
}
