/* ========================================
   MANUFACTURER PAGE CSS
======================================== */

/* BREADCRUMB */
.breadcrumb-section {
    background: var(--metallic-light);
    padding: 15px 0;
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumb-item {
    font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--metallic-mid);
}

.breadcrumb-item a {
    color: var(--metallic-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--background-darker);
}

.breadcrumb-item.active {
    color: var(--text-gray);
}

/* MAIN PAGE */
.manufacturer-page {
    background: #F8FAFB;
    padding: 40px 0 80px;
}

/* SIDEBAR WRAPPER */
.sidebar-wrapper {
    position: relative;
    min-height: 500px;
}

.filter-toggle {
    width: 100%;
    padding: 15px;
    background: var(--metallic-dark);
    color: var(--pure-white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.filter-toggle:hover {
    background: var(--background-darker);
}

.filters-wrapper {
    background: var(--pure-white);
    border-radius: 20px;
    padding: 25px;
    padding-right: 20px;
    box-shadow: 0 5px 20px rgba(74, 90, 106, 0.08);
    position: relative;
    transition: none;
    will-change: transform;
    
    /* Scrollbar styling */
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 120px);
}

/* Custom Scrollbar for Sidebar */
.filters-wrapper::-webkit-scrollbar {
    width: 8px;
}

.filters-wrapper::-webkit-scrollbar-track {
    background: var(--metallic-light);
    border-radius: 10px;
    margin: 10px 0;
}

.filters-wrapper::-webkit-scrollbar-thumb {
    background: var(--metallic-mid);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.filters-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--metallic-dark);
}

/* Firefox Scrollbar */
.filters-wrapper {
    scrollbar-width: thin;
    scrollbar-color: var(--metallic-mid) var(--metallic-light);
}

/* Scrollbar hint effect */
.filters-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-wrapper.has-scroll::after {
    opacity: 1;
}

.filter-close {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--metallic-light);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    color: var(--metallic-dark);
    font-size: 16px;
    transition: all 0.3s ease;
}

.filter-close:hover {
    background: var(--metallic-dark);
    color: var(--pure-white);
}

.filter-box {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--metallic-light);
}

.filter-box:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.filter-heading {
    background: var(--metallic-light);
    color: var(--pure-black);
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-content {
    padding: 0 5px;
}

.filter-select,
.price-input {
    width: 100% !important;
    padding: 12px 15px;
    border: 2px solid var(--metallic-light);
    border-radius: 10px;
    font-size: 14px;
    background: var(--pure-white);
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.filter-select:focus,
.price-input:focus {
    border-color: var(--metallic-dark);
    box-shadow: 0 0 0 4px rgba(74, 90, 106, 0.1);
}

.finder-form .form-group {
    margin-bottom: 15px;
}

.finder-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.search-btn,
.apply-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--metallic-dark), var(--metallic-mid));
    color: var(--pure-white);
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 5px 15px rgba(74, 90, 106, 0.3);
}

.search-btn:hover,
.apply-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 90, 106, 0.4);
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input {
    width: auto;
    flex: 1;
}

.price-separator {
    color: var(--metallic-mid);
    font-weight: 700;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.checkbox-label:hover {
    background: var(--metallic-light);
}

.filter-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--metallic-dark);
}

.clear-filters-btn {
    width: 100%;
    padding: 12px;
    background: var(--metallic-light);
    color: var(--metallic-dark);
    border: 2px solid var(--metallic-mid);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.clear-filters-btn:hover {
    background: var(--metallic-dark);
    color: var(--pure-white);
    border-color: var(--metallic-dark);
}

/* LISTING CONTROLS */
.listing-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pure-white);
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 3px 15px rgba(74, 90, 106, 0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.results-count {
    font-size: 15px;
    color: var(--text-gray);
}

.results-count strong {
    color: var(--pure-black);
    font-weight: 700;
}

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

.sort-options label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 600;
}

.sort-select {
    padding: 10px 15px;
    border: 2px solid var(--metallic-light);
    border-radius: 8px;
    font-size: 14px;
    background: var(--pure-white);
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 180px;
}

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

/* MODELS GRID */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.model-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.model-card {
    background: var(--pure-white);
    border: 2px dashed var(--metallic-light);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.model-card:hover {
    border-color: var(--metallic-dark);
    border-style: solid;
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(74, 90, 106, 0.15);
}

.model-image {
    position: relative;
    padding: 25px;
    background: linear-gradient(135deg, #F8FAFB, var(--metallic-light));
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-image img {
    width: 100%;
    height: auto;
    max-height: 130px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.model-card:hover .model-image img {
    transform: scale(1.1);
}

.model-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--metallic-dark);
    color: var(--pure-white);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.model-badge.new {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.model-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.model-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 6px;
    line-height: 1.3;
}

.model-variant {
    font-size: 13px;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.model-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.model-specs span {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 600;
}

.model-specs span i {
    color: var(--metallic-dark);
    font-size: 14px;
}

.model-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--metallic-dark);
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--metallic-light);
}

/* NO RESULTS */
.no-results {
    background: var(--pure-white);
    padding: 60px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(74, 90, 106, 0.08);
}

.no-results i {
    font-size: 64px;
    color: var(--metallic-mid);
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 12px;
}

.no-results p {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 25px;
}

/* RESPONSIVE */
@media (max-width: 1199.98px) {
    .models-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991.98px) {
    .sidebar-wrapper {
        margin-bottom: 30px;
        min-height: auto;
    }
    
    .filter-toggle {
        display: flex;
    }
    
    .filters-wrapper {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 320px !important;
        height: 100vh;
        max-height: 100vh;
        z-index: 9999 !important;
        overflow-y: auto;
        transition: left 0.3s ease !important;
        border-radius: 0;
    }
    
    .filters-wrapper.active {
        left: 0 !important;
        box-shadow: 0 0 100px rgba(0, 0, 0, 0.5);
    }
    
    .filter-close {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    body.filters-open {
        overflow: hidden;
    }
    
    body.filters-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
    
    .models-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .manufacturer-page {
        padding: 30px 0 60px;
    }
    
    .listing-controls {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
    }
    
    .sort-options {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .sort-select {
        width: 100%;
    }
    
    .models-grid {
        gap: 20px;
    }
    
    .no-results {
        padding: 40px 30px;
    }
    
    .no-results i {
        font-size: 48px;
    }
    
    .no-results h3 {
        font-size: 20px;
    }
}

@media (max-width: 575.98px) {
    .models-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .model-image {
        min-height: 160px;
        padding: 20px;
    }
    
    .model-image img {
        max-height: 110px;
    }
    
    .model-info {
        padding: 15px;
    }
    
    .model-name {
        font-size: 16px;
    }
    
    .model-price {
        font-size: 18px;
    }
    
    .listing-controls {
        padding: 12px 15px;
    }
    
    .results-count {
        font-size: 14px;
    }
    
    .filters-wrapper {
        width: 100% !important;
        max-width: 320px !important;
    }
}

@media (max-width: 400px) {
    .model-specs {
        flex-direction: column;
        gap: 8px;
    }
    
    .price-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .price-separator {
        display: none;
    }
}
