/* ========================================
   MLC Inventory Grid Styles
   ======================================== */

.mlc-inventory-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

.mlc-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 0;
}

@media (max-width: 768px) {
    .mlc-inventory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .mlc-inventory-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Vehicle Card */
.mlc-vehicle-card {
    background: #fff;
    border-radius: 12px;
    overflow: Hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.mlc-vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.mlc-vehicle-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.mlc-vehicle-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.mlc-vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mlc-vehicle-card:hover .mlc-vehicle-image img {
    transform: scale(1.05);
}

.mlc-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #999;
    font-size: 14px;
}

.mlc-vehicle-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mlc-vehicle-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

.mlc-vehicle-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #d80000;
    margin: 0;
}

.mlc-vehicle-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: #666;
    padding: 8px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    flex: 1;
}

.mlc-vehicle-meta div {
    margin: 0;
}

.mlc-vehicle-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #d80000;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.mlc-vehicle-card:hover .mlc-vehicle-btn {
    background: #b20000;
    transform: scale(1.02);
}

/* ========================================
   BODY STYLES SECTION
   ======================================== */

.mlc-body-styles-section {
    margin: 40px 0;
}

.mlc-body-styles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.mlc-body-styles-header {
    text-align: center;
    margin-bottom: 24px;
}

.mlc-body-styles-header h2 {
    margin: 0 0 8px;
    font-size: 32px;
    line-height: 1.2;
    color: #1a1a1a;
}

.mlc-body-styles-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}

.mlc-body-styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.mlc-body-style-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    background: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.mlc-body-style-card:hover {
    transform: translateY(-3px);
    border-color: #111;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.mlc-body-style-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #111;
    margin-bottom: 6px;
    text-align: center;
}

.mlc-body-style-card__count {
    font-size: 14px;
    color: #666;
    text-align: center;
}

.mlc-body-style-card.active {
    border-color: #d80000;
    box-shadow: 0 10px 20px rgba(216, 0, 0, 0.2);
}

.mlc-body-style-card.active .mlc-body-style-card__title {
    color: #d80000;
}

.mlc-body-style-card:active {
    transform: scale(0.97);
}

/* ========================================
   ACTIVE FILTER BADGE
   ======================================== */

.mlc-active-body-style-filter {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 20px 0;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 8px;
    font-size: 14px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.mlc-active-body-style-filter span {
    flex: 1;
}

.mlc-active-body-style-filter strong {
    color: #1a1a1a;
}

.mlc-clear-filter {
    font-weight: 600;
    text-decoration: none;
    color: #d80000;
    padding: 4px 12px;
    border: 1px solid #d80000;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mlc-clear-filter:hover {
    background: #d80000;
    color: #fff;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.mlc-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.mlc-empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.mlc-empty-state p {
    color: #666;
    margin-bottom: 20px;
    font-size: 16px;
}

.mlc-empty-state-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #d80000;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.mlc-empty-state-btn:hover {
    background: #b20000;
    transform: translateY(-2px);
}

/* ========================================
   LOADING STATE
   ======================================== */

.mlc-inventory-page.loading {
    opacity: 0.6;
    pointer-events: none;
}

.mlc-loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    text-align: center;
}

.mlc-inventory-page.loading .mlc-loading-spinner {
    display: block;
}

.mlc-loading-spinner::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #d80000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
