/* ========================================
   VIEW STOCK V2 - BAS WORLD DESIGN REPLICA
   ======================================== */

.vehicle-card-v2 {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    height: 100%;
}

.vehicle-card-v2:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #D1D5DB;
}

.vehicle-image-wrapper-v2 {
    position: relative;
    width: 100%;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    background: #F3F4F6;
    overflow: hidden;
}

.vehicle-image-v2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges V2 */
.card-badges-v2 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.badge-new-v2 {
    position: absolute;
    top: 12px;
    left: -28px;
    background: #00A651;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 2px 30px;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-favorite-v2 {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.4);
    /* Semi-transparent dark bg per screenshot */
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 20;
    transition: transform 0.2s, background 0.2s;
}

.btn-favorite-v2:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.6);
}

.btn-favorite-v2 .icon-heart {
    width: 20px;
    height: 20px;
    color: white;
    /* White icon on dark bg */
    transition: fill 0.2s, stroke 0.2s;
    stroke: white;
}

.btn-favorite-v2 .icon-heart.active {
    fill: #EF4444;
    /* Red fill when active */
    stroke: #EF4444;
}

/* Content V2 */
.vehicle-content-v2 {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body-v2 {
    padding: 1rem 1rem 0 1rem;
    flex: 1;
}

.vehicle-name-v2 {
    font-size: 1.1rem;
    font-weight: 800;
    /* Extra bold */
    color: #111827;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.vehicle-subtitle-v2 {
    font-size: 0.9rem;
    color: #4B5563;
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 2.8em;
    /* Force 2 lines height approx */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specs Grid */
.vehicle-specs-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    /* No top border in screenshot, purely spacing */
}

.spec-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-item-v2 {
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-v2 {
    margin-top: 0.5rem;
    /* Flag sits a bit lower/separated? */
    font-weight: 600;
}

/* Price & Status Row */
.card-price-status-row-v2 {
    display: flex;
    align-items: stretch;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    margin-top: auto;
}

.price-box-v2 {
    flex: 1;
    padding: 1rem 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    border-right: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-box-v2 {
    flex: 1;
    padding: 1rem 0;
    text-align: center;
    font-size: 1rem;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ref Footer */
.card-ref-footer-v2 {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: #9CA3AF;
    background: white;
    transition: background-color 0.2s, color 0.2s;
}

.vehicle-card-v2:hover .card-ref-footer-v2 {
    background: #111827;
    /* Dark black/gray */
    color: white;
}

/* Update Grid to handle V2 cards properly if needed */
@media (min-width: 1024px) {
    .vehicle-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Layout Adjustments */
.category-nav .container,
.main-layout {
    max-width: 1600px !important;
    width: 95% !important;
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar Width */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.badge-new-v2 {
    position: absolute;
    top: 12px;
    left: -28px;
    background: #00A651;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    padding: 2px 30px;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-favorite-v2 {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.4);
    /* Semi-transparent dark bg per screenshot */
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 20;
    transition: transform 0.2s, background 0.2s;
}

.btn-favorite-v2:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.6);
}

.btn-favorite-v2 .icon-heart {
    width: 20px;
    height: 20px;
    color: white;
    /* White icon on dark bg */
    transition: fill 0.2s, stroke 0.2s;
    stroke: white;
}

.btn-favorite-v2 .icon-heart.active {
    fill: #EF4444;
    /* Red fill when active */
    stroke: #EF4444;
}

/* Content V2 */
.vehicle-content-v2 {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-body-v2 {
    padding: 1rem 1rem 0 1rem;
    flex: 1;
}

.vehicle-name-v2 {
    font-size: 1.1rem;
    font-weight: 800;
    /* Extra bold */
    color: #111827;
    margin: 0 0 0.25rem 0;
    line-height: 1.2;
    text-transform: uppercase;
}

.vehicle-subtitle-v2 {
    font-size: 0.9rem;
    color: #4B5563;
    margin-bottom: 1rem;
    line-height: 1.4;
    min-height: 2.8em;
    /* Force 2 lines height approx */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Specs Grid */
.vehicle-specs-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    /* No top border in screenshot, purely spacing */
}

.spec-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.spec-item-v2 {
    font-size: 0.9rem;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.location-v2 {
    margin-top: 0.5rem;
    /* Flag sits a bit lower/separated? */
    font-weight: 600;
}

/* Price & Status Row */
.card-price-status-row-v2 {
    display: flex;
    align-items: stretch;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    margin-top: auto;
}

.price-box-v2 {
    flex: 1;
    padding: 1rem 0;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    border-right: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-box-v2 {
    flex: 1;
    padding: 1rem 0;
    text-align: center;
    font-size: 1rem;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ref Footer */
.card-ref-footer-v2 {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    color: #9CA3AF;
    background: white;
    transition: background-color 0.2s, color 0.2s;
}

.vehicle-card-v2:hover .card-ref-footer-v2 {
    background: #111827;
    /* Dark black/gray */
    color: white;
}

/* Update Grid to handle V2 cards properly if needed */
@media (min-width: 1024px) {
    .vehicle-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Layout Adjustments */
.category-nav .container,
.main-layout {
    max-width: 1600px !important;
    width: 95% !important;
    margin-left: auto;
    margin-right: auto;
}

/* Sidebar Width */
.sidebar {
    width: 300px;
    flex-shrink: 0;
}

.filter-checkbox input[type="checkbox"] {
    border-radius: 4px;
    /* Square check */
}

/* Mobile Responsiveness & Filter Logic */

/* Filter Visibility Logic */
@media (min-width: 1024px) {
    .filter-content.default-open {
        display: block !important;
    }
}

@media (max-width: 1023px) {
    .filter-content {
        display: none;
        /* Hidden by default on mobile */
    }

    .filter-content.open {
        display: block !important;
        /* Force show when toggled */
    }
}

/* Mobile Layout Stacking */
@media (max-width: 1023px) {
    .main-layout {
        display: flex;
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-bottom: 2rem;
    }

    .vehicle-grid {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }

    /* Make filter buttons/cards look decent on mobile */
    .sidebar-section {
        border: 1px solid #E5E7EB;
        margin-bottom: 0.5rem;
        border-radius: 0.5rem;
        overflow: hidden;
    }

    .sidebar-button {
        width: 100%;
        padding: 1rem;
        background: #F9FAFB;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        text-align: left;
        font-weight: 600;
        cursor: pointer;
    }

    .filter-content {
        padding: 1rem;
        border-top: 1px solid #E5E7EB;
        background: white;
    }

    .filters-header h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
}