/* Layout Wrapper */
.inventory-flex-container {
    display: flex;
    gap: 30px;
    width: 100%;
    align-items: flex-start;
    margin: 50px 0;
}

/* Header & Dynamic Heading */
.inventory-header {
    width: 100%;
    display: grid;
    justify-content: center;
}

.inventory-main-heading {
    text-align: center;
    color: #fff;
    font-size: 64px;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 50px;
    line-height: 1.0;
    display: block;
    padding: 0 10%;
    text-wrap: balance;
}

/* Tabs Sidebar */
.inventory-tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.tab-link {
    border: 1px solid #537b81;
    background: transparent !important;
    color: #537b81 !important;
    padding: 32px;
    text-align: left;
    cursor: pointer;
    font-size: 18px;
    font-family: 'Archivo', sans-serif;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    transition: 0.3s ease;
    border-radius: 12px;
    gap: 20px;
}

.tab-link.active {
    background: #386d70 !important;
    color: #fff !important;
    border-color: #fff;
}

/* Panel & Grid Logic */
.inventory-panels-wrap { 
    flex: 1; 
}

.inventory-panel { 
    display: none; 
    opacity: 0;
}

.inventory-panel.active { 
    display: flex; 
    flex-direction: column;
    animation: simpleFadeIn 0.6s ease forwards;
    animation-delay: 0.1s;
}

.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    width: 100%;
}

/* --- Card Hover & Slide-Up Animation Logic --- */
.card-media {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    line-height: 0;
    isolation: isolate; /* Fixes potential Safari overflow bugs */
}

.card-media img {
    width: 100%;
    height: auto;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.card-overlay {
    position: absolute;
    inset: 0; 
    background: linear-gradient(to bottom, rgba(6, 57, 62, 0) 40%, rgba(6, 57, 62, 0.95) 100%);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-decoration: none;
    z-index: 1;
}

.view-detail-text {
    color: #fff;
    font-size: 22px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    /* Slide-Up Setup: Start lower and invisible */
    transform: translateY(30px); 
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.4s ease;
}

/* Hover Triggers */
.card-media:hover img { 
    transform: scale(1.08); 
}

.card-media:hover .card-overlay { 
    opacity: 1; 
}

.card-media:hover .view-detail-text {
    transform: translateY(0); /* Final position on hover */
}

.vehicle-title {
    color: #fff;
    font-size: 20px;
    margin-top: 15px;
    font-weight: 400;
}

/* Centered View All Button */
.view-all-wrapper { 
    margin-top: 50px; 
    display: flex;
    justify-content: center; 
    align-items: center;
    width: 100%;
}

/* Animations */
@keyframes simpleFadeIn { 
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    } 
    to { 
        opacity: 1; 
        transform: translateY(0); 
    } 
}

/* --- Responsive Styles --- */
@media screen and (min-width: 1680px){
    .tab-link { font-size: 24px; }
    .inventory-main-heading { font-size: 72px; }
    .inventory-tabs-nav { width: 398px !important; }
    .view-all-wrapper { margin-top: 80px; }
}


@media screen and (max-width: 1024px) {
    .inventory-tabs-nav {
        width: 100% !important;
		min-width: 100% !important;
		flex-direction: row;
    }
	
	.inventory-flex-container {
    margin: 0px 0 !important;
		flex-direction: column;
}
}


@media screen and (max-width: 1200px) {
    .inventory-main-heading { font-size: 52px; }
    .vehicle-grid { gap: 18px; }
}

@media screen and (max-width: 992px) {
    .inventory-flex-container { flex-direction: column; }
    .inventory-tabs-nav { 
        flex-direction: row; 
        overflow-x: auto; 
        width: 100%; 
        padding-bottom: 15px;
    }
    .tab-link { min-width: auto; }
    .vehicle-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 576px) {
    .inventory-main-heading { font-size: 30px; }
    .vehicle-grid { grid-template-columns: 1fr; }
}