.public-layout .main-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.public-layout .page-content {
    padding: 0 !important;
    overflow: visible !important;
}

/* --- Catalog Page: Two-Column Layout --- */
.catalog-page {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px 80px 20px;
    align-items: flex-start;
}

/* --- Main (Right Column: Banner + Top Bar + Cards) --- */
.catalog-main {
    flex: 1;
    min-width: 0;
}

.catalog-banner-top {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    z-index: 99;
}

/* --- Sidebar (Left Column: Filters) --- */
.catalog-sidebar {
    width: 330px;
    flex-shrink: 0;
}

@media (min-width: 992px) {
    .catalog-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 90px;
        align-self: stretch;
        z-index: 20;
        height: calc(100vh - 90px);
        overflow-y: auto;
    }
}

.sidebar-filter-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
}

.sidebar-filter-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.filter-group {
    margin-bottom: 18px;
}

.filter-group-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    justify-content: space-between;
}

.filter-group-row .filter-col {
    flex: 0 0 auto;
    width: calc(50% - 5px);
    min-width: 0;
}

.filter-group-row .filter-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter-group-row .filter-select {
    width: 100%;
    padding: 10px 12px;
}

.filter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.filter-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.3s;
}

.filter-select:focus {
    border-color: var(--primary);
}

.filter-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-input {
    flex: 1;
    padding: 10px 12px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    width: 100%;
    transition: border-color 0.3s;
}

.filter-input:focus {
    border-color: var(--primary);
}

.range-sep {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
}

.btn-filter-search {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 5px;
}

.btn-filter-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
}

.btn-filter-search i {
    width: 18px;
    height: 18px;
}

.btn-filter-clear {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}

.btn-filter-clear:hover {
    color: var(--primary);
}

/* --- Top Bar (count + sort) --- */
.catalog-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 18px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
}

.catalog-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.catalog-count strong {
    color: var(--text-main);
    font-weight: 800;
}

.filter-tags {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    flex-wrap: wrap;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 10px;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

.filter-tag-x {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.2);
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tag-x:hover {
    background: var(--primary);
    color: #fff;
}

.filter-tag-x i {
    width: 10px;
    height: 10px;
}

.filter-tag-clear-all {
    background: rgba(255, 80, 80, 0.15);
    border-color: rgba(255, 80, 80, 0.3);
    color: #ff5050;
}

.filter-tag-clear-all:hover {
    background: #ff5050;
    color: #fff;
}

.filter-tag-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
}

.filter-tag-clear:hover {
    background: rgba(255, 80, 80, 0.2);
    color: #ff5b5b;
}

.filter-tag-clear i {
    width: 14px;
    height: 14px;
}

.catalog-sticky-wrapper {
    background-color: #ffffff;
    position: sticky;
    top: 90px;
    z-index: 99;
    width: 100%;
    margin-bottom: 24px;
}

#catalog-results {
    padding-top: 8px;
}

.catalog-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.catalog-sort label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sort-select {
    padding: 8px 14px;
    background: var(--bg-deep);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 700;
    outline: none;
    cursor: pointer;
    transition: border-color 0.3s;
}

.sort-select:focus {
    border-color: var(--primary);
}

/* --- Catalog Grid --- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.banner-slideshow {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
    z-index: 99;
    width: 100%;
    aspect-ratio: 16 / 3;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 10px;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
}

/* Banner Dots */
.banner-slideshow-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.banner-slideshow-dots-side {
    bottom: 10px;
    gap: 6px;
}

.banner-slideshow-dots .banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-slideshow-dots-side .banner-dot {
    width: 8px;
    height: 8px;
}

.banner-slideshow-dots .banner-dot:hover {
    background: rgba(255,255,255,0.7);
}

.banner-slideshow-dots .banner-dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Banner Arrows */
.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 2;
    opacity: 0;
}

.banner-slideshow:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow:hover {
    background: rgba(0,0,0,0.8);
    transform: translateY(-50%) scale(1.1);
}

.banner-arrow i {
    width: 20px;
    height: 20px;
}

.banner-arrow-prev { left: 12px; }
.banner-arrow-next { right: 12px; }

/* Vertical Slideshow Dots */
.banner-slideshow-vertical {
    position: relative;
}

.banner-slideshow-dots-side {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.banner-slideshow-dots-side .banner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.banner-slideshow-dots-side .banner-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* --- Sidebar Banners (Vertical Slideshow) --- */
.sidebar-banners {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    padding: 12px;
}

/* --- Banner Placeholders --- */
.banner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    border: 2px dashed var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    text-align: center;
    gap: 8px;
}

.banner-placeholder-icon {
    width: 40px;
    height: 40px;
    opacity: 0.3;
}

.banner-placeholder span {
    font-size: 0.85rem;
    font-weight: 600;
}

.banner-placeholder small {
    font-size: 0.7rem;
    opacity: 0.7;
}

.banner-placeholder-top {
    width: 100%;
    aspect-ratio: 16 / 3;
    padding: 20px;
    margin-bottom: 10px;
}

.banner-placeholder-side {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 15px;
}

.banner-slideshow-vertical {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 10px;
}

.banner-slide-vertical {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide-vertical.active {
    opacity: 1;
}

/* --- Vehicle Card (Simple Style) --- */
.vehicle-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vehicle-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.vehicle-card:hover .card-media img {
    transform: scale(1.05);
}

.card-content-simple {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.vehicle-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    line-height: 1.3;
    cursor: pointer;
    transition: color 0.2s;
}

.vehicle-name:hover {
    color: var(--primary);
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.card-year {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.card-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

.btn-share-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: auto;
    padding: 8px 12px;
    background: rgba(37, 211, 102, 0.05);
    border: 1px solid #25D366;
    border-radius: 8px;
    color: #25D366;
    font-size: 12px;
    font-weight: 750;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-share-card:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    opacity: 0.2;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
}

/* --- Animations --- */
.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Responsive --- */
@media (max-width: 1200px) {
    .catalog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .catalog-page {
        flex-direction: column;
        padding: 20px 16px 60px 16px;
    }

    .catalog-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .banner-slideshow {
        aspect-ratio: 16 / 6;
        min-height: 160px;
    }
}

@media (max-width: 768px) {
    .catalog-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .catalog-top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .banner-slideshow {
        aspect-ratio: 16 / 7;
        min-height: 150px;
        max-height: 240px;
        border-radius: 12px;
    }

    .sidebar-banners {
        display: none;
    }

    .vehicle-card {
        border-radius: 14px;
        overflow: hidden;
    }

    .vehicle-card .card-media {
        aspect-ratio: 16 / 10;
        height: auto;
    }
}

@media (max-width: 480px) {
    .banner-slideshow {
        aspect-ratio: 16 / 8;
        min-height: 140px;
    }
}

.filter-group-row-years {
    display: flex !important;
    gap: 12px !important;
    width: 100% !important;
}
.filter-col-year {
    flex: 1 1 0% !important;
    width: 0 !important;
    min-width: 0 !important;
}
