/* ==========================================================================
   MODELS PAGE STYLES - AUTONOMOUS REFINED DESIGN
   ========================================================================== */

.models-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* Breadcrumb */
.models-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6A7282;
    margin-bottom: 24px;
}

.models-breadcrumb a {
    color: #6A7282;
    text-decoration: none;
    transition: color 0.15s;
}

.models-breadcrumb a:hover {
    color: #6A142C;
}

.models-breadcrumb span {
    color: #9CA3AF;
}

.models-breadcrumb .current {
    color: #1E2939;
    font-weight: 600;
}

/* Brand Header */
.models-brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #EAE1E2;
    padding: 24px 28px;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(106, 20, 44, 0.04);
    flex-wrap: wrap;
}

.models-brand-header__info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 260px;
}

.models-brand-header__logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #FAFAFA;
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #F0E6E7;
    flex-shrink: 0;
}

.models-brand-header__title {
    font-size: 26px;
    font-weight: 800;
    color: #0A0A0A;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.models-brand-header__sub {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
    max-width: 600px;
    line-height: 1.45;
}

.models-type-toggle {
    display: flex;
    background: #F4ECEE;
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

.models-type-btn {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #605153;
    transition: all 0.18s ease;
}

.models-type-btn.active {
    background: #ffffff;
    color: #6A142C;
    box-shadow: 0 2px 8px rgba(106, 20, 44, 0.12);
}

/* Filter & Controls Bar */
.models-filter-bar {
    background: #ffffff;
    border: 1px solid #EAE1E2;
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 28px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.models-filter-row--main {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* Search input */
.models-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.models-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9CA3AF;
    pointer-events: none;
}

.models-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 12px 9px 36px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13.5px;
    font-family: inherit;
    color: #111827;
    outline: none;
    transition: all 0.15s ease;
}

.models-search-input:focus {
    background: #ffffff;
    border-color: #6A142C;
    box-shadow: 0 0 0 3px rgba(106, 20, 44, 0.08);
}

/* Badge Status Filter buttons */
.models-badge-filters {
    display: flex;
    gap: 6px;
}

.models-badge-btn {
    padding: 7px 13px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #F9FAFB;
    font-size: 12.5px;
    font-weight: 600;
    color: #4B5563;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.models-badge-btn:hover {
    border-color: #6A142C;
    color: #6A142C;
}

.models-badge-btn.active {
    background: #6A142C;
    color: #ffffff;
    border-color: #6A142C;
}

.models-badge-btn--new.active {
    background: #0284C7;
    border-color: #0284C7;
    color: #ffffff;
}

.models-badge-btn--action.active {
    background: #DC2626;
    border-color: #DC2626;
    color: #ffffff;
}

/* Dropdowns */
.models-dropdowns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.models-select {
    padding: 8px 12px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
}

.models-select:focus {
    border-color: #6A142C;
    background: #fff;
}

/* View Switcher */
.models-view-switcher {
    display: flex;
    background: #F3F4F6;
    border-radius: 8px;
    padding: 3px;
    gap: 2px;
    margin-left: auto;
}

.models-view-btn {
    background: transparent;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #6B7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.models-view-btn svg {
    width: 16px;
    height: 16px;
}

.models-view-btn.active {
    background: #ffffff;
    color: #6A142C;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Sub-filter row */
.models-filter-sub {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6B7280;
}

.models-count-text {
    font-weight: 600;
    color: #4B5563;
}

/* ==========================================================================
   MODELS GRID MODE (Default)
   ========================================================================== */

.models-view--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.model-card-new {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #E9E0E1;
    color: #0A0A0A;
    overflow: hidden;
    position: relative;
    transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s;
}

.model-card-new:hover {
    border-color: #6A142C;
    box-shadow: 0 10px 30px rgba(106, 20, 44, 0.14);
    transform: translateY(-4px);
}

/* ==========================================================================
   IMAGE OPTIMIZATION: SHIMMER SKELETON & BLUR-UP
   ========================================================================== */
.img-shimmer {
    position: relative;
    overflow: hidden;
    background-color: #F1F3F6;
}

.img-shimmer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(240, 242, 245, 0) 0%,
        rgba(255, 255, 255, 0.75) 50%,
        rgba(240, 242, 245, 0) 100%
    );
    background-size: 200% 100%;
    animation: imgShimmer 1.5s infinite linear;
    z-index: 1;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.img-shimmer.img-loaded::before {
    opacity: 0;
    animation: none;
}

@keyframes imgShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.lazy-smooth-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.03);
    transition: opacity 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                filter 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: block;
}

.lazy-smooth-img.loaded,
.lazy-smooth-img.is-loaded {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.model-card-new__img-wrap {
    width: 100%;
    aspect-ratio: 16/10;
    background: #F7F2F3;
    overflow: hidden;
    position: relative;
}

.model-card-new__img-wrap--logo {
    background: #FAFAFA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-card-new__img-link {
    display: block;
    width: 100%;
    height: 100%;
}

.model-card-new__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.model-card-new:hover .lazy-smooth-img.loaded:not(.model-card-new__img--logo) {
    transform: scale(1.05);
}

.model-card-new__img--logo {
    object-fit: contain;
    padding: 24px;
    width: auto;
    height: auto;
    max-width: 60%;
    max-height: 60%;
    margin: auto;
}

/* Floating Status Badges on image */
.model-floating-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
    pointer-events: none;
}

.model-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(4px);
}

.model-tag-badge--action {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.model-tag-badge--new {
    background: linear-gradient(135deg, #0284C7 0%, #0369A1 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.model-tag-badge--custom {
    background: rgba(17, 24, 39, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.model-tag-badge--ev {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Card Body */
.model-card-new__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.model-card-new__header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.model-card-new__info {
    flex: 1;
    min-width: 0;
}

.model-card-new__brand {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6A7282;
    display: block;
    margin-bottom: 2px;
}

.model-card-new__name {
    font-size: 16px;
    font-weight: 800;
    color: #0A0A0A;
    line-height: 1.3;
    margin: 0;
}

.model-card-new__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}

.model-card-new__name a:hover {
    color: #6A142C;
}

/* Price Box */
.model-card-new__price-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.model-card-new__price-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: #9CA3AF;
    letter-spacing: 0.04em;
}

.model-card-new__price {
    font-size: 16px;
    font-weight: 800;
    color: #6A142C;
    white-space: nowrap;
}

.model-card-new__price--action {
    color: #DC2626;
    font-size: 17px;
}

.model-card-new__price-old {
    font-size: 12px;
    color: #9CA3AF;
    text-decoration: line-through;
    font-weight: 500;
}

.model-card-new__price--na {
    font-size: 13px;
    color: #6B7280;
    font-weight: 600;
}

/* Specs Chips */
.model-card-new__specs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.model-spec-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #F7F3F4;
    border: 1px solid #EDE4E5;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    color: #4B5563;
}

.model-spec-chip svg {
    width: 13px;
    height: 13px;
    color: #6A142C;
    flex-shrink: 0;
}

.model-spec-chip--variants {
    background: rgba(106, 20, 44, 0.07);
    border-color: rgba(106, 20, 44, 0.15);
    color: #6A142C;
    font-weight: 700;
}

/* Card CTA Footer */
.model-card-new__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #F3F4F6;
}

.model-card-new__cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: #6A142C;
    text-decoration: none;
    transition: gap 0.15s ease;
}

.model-card-new__cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.15s ease;
}

.model-card-new:hover .model-card-new__cta {
    gap: 8px;
}

.model-card-new:hover .model-card-new__cta svg {
    transform: translateX(2px);
}

/* ==========================================================================
   MODELS LIST MODE (Horizontal comparative view)
   ========================================================================== */

.models-view--list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.models-view--list .model-card-new {
    flex-direction: row;
    border-radius: 14px;
    align-items: stretch;
}

.models-view--list .model-card-new__img-wrap {
    width: 240px;
    min-width: 240px;
    aspect-ratio: auto;
    height: auto;
    border-right: 1px solid #E9E0E1;
}

.models-view--list .model-card-new__body {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
}

.models-view--list .model-card-new__header-row {
    flex-direction: column;
    margin-bottom: 0;
    gap: 4px;
    min-width: 180px;
}

.models-view--list .model-card-new__specs-chips {
    margin-bottom: 0;
    max-width: 320px;
}

.models-view--list .model-card-new__footer {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.models-view--list .model-card-new__cta {
    background: #6A142C;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
}

.models-view--list .model-card-new__cta:hover {
    background: #500018;
}

/* Empty State */
.models-empty {
    text-align: center;
    padding: 60px 24px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px dashed #D1D5DB;
    margin-top: 20px;
}

.models-empty__icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.models-empty h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
}

.models-empty p {
    color: #6B7280;
    font-size: 14px;
    margin: 0 0 16px;
}

.models-reset-btn {
    display: inline-block;
    background: #6A142C;
    color: #ffffff;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.models-reset-btn:hover {
    background: #500018;
}

/* Responsive queries */
@media (max-width: 1024px) {
    .models-view--grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .models-brand-header {
        padding: 20px;
    }
    
    .models-brand-header__info {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .models-view--list .model-card-new {
        flex-direction: column;
    }

    .models-view--list .model-card-new__img-wrap {
        width: 100%;
        aspect-ratio: 16/10;
        border-right: none;
        border-bottom: 1px solid #E9E0E1;
    }

    .models-view--list .model-card-new__body {
        flex-direction: column;
        align-items: flex-start;
    }

    .models-view--list .model-card-new__footer {
        width: 100%;
    }

    .models-view--list .model-card-new__cta {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 580px) {
    .models-view--grid {
        grid-template-columns: 1fr;
    }

    .models-filter-row--main {
        flex-direction: column;
        align-items: stretch;
    }

    .models-badge-filters, .models-dropdowns {
        width: 100%;
    }

    .models-select {
        flex: 1;
    }

    .models-view-switcher {
        margin-left: 0;
        justify-content: center;
    }
}
