/* ===== POPUP FILTER ===== */
.filter-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    max-height: 85vh;
    background: white;
    border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    overflow-y: auto;
    animation: popupFadeIn 0.2s ease;
}

.filter-popup.active {
    display: block;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: aquamarine;

}

.popup-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0 8px;
}

.popup-section {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.popup-section h5 {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
}

/* Filter Card Container */
.filter-card-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-card {
    text-align: center;
}

.filter-card input[type="checkbox"] {
    display: none;
}

.filter-card input[type="checkbox"]:checked + label img {
    border: 2px solid #007bff;
    transform: scale(1.05);
}

.filter-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
    cursor: pointer;
}

/* Merek Mobil */
.merek-mobil-container {
    max-height: 150px;
    overflow-y: auto;
    border: 2px solid green;
    border-radius: 8px;
    padding: 8px;
    font-size: 12px;
    font-family: cursive;
}

.merek-item {
    display: flex;
    align-items: center;
    padding: 1px 2px;
    cursor: pointer;
}

.merek-item:hover {
    background: #f5f5f5;
}

.merek-item input[type="checkbox"] {
    margin-right: 10px;
}

/* Selected Tags */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    min-height: 30px;
}

.merek-tag {
    background: #007bff;
    color: white;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.merek-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
}



/* Dimensi Inputs */
.dimensi-inputs {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.dimensi-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.dimensi-row label {
    width: 100px;
    font-size: 12px;
}

.dimensi-row input {
    flex: 1;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Filter Summary */
.filter-summary {
    background: #f8f9fa;
}

.filter-count {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.count-number {
    font-size: 20px;
    font-weight: bold;
    color: #007bff;
}

/* Popup Actions */
.popup-actions {
    display: flex;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #eee;
}

.btn-primary {
    flex: 2;
    padding: 12px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn-secondary {
    flex: 1;
    padding: 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

/* Popup Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.popup-overlay.active {
    display: block;
}


/* MODEL FILTER */



/* MODEL FILTER - Merek Filter */
.filter-card {
    display: flex;
    align-items: center;
    padding: 3px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    background: blanchedalmond;
    
    /* Efek 3D halus */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    border-bottom: 3px solid #d2b48c;
}

.filter-card:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-bottom-color: #b59a6e;
}

.filter-card :active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom-width: 2px;
}


/* MODEL FILTER - Jenis Filter */

/* Jenis Filter Grid */
.jenis-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-size: 12px;
    font-style: italic;
    font-family: system-ui;
    font-weight: 500;
  /*  gap: 8px;	*/
}

.jenis-item input[type="checkbox"] {
    margin-right: 8px;
}

.jenis-icon {
    margin-right: 6px;
    font-size: 16px;
}

/* Filter Options */
.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    cursor: pointer;
}
.jenis-item {
    display: flex;
    align-items: center;
    padding: 3px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    background: blanchedalmond;
    
    /* Efek 3D halus */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    border-bottom: 3px solid #d2b48c;
}

.jenis-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-bottom-color: #b59a6e;
}

.jenis-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom-width: 2px;
}


/* MODEL FILTER - Model Filter */
.model-filter-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    font-size: 12px;
    font-family: system-ui;
    font-weight: 500;
  /*  gap: 8px;	*/
}

.model-item {
    display: flex;
    align-items: center;
    padding: 5px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    background: blanchedalmond;
    
    /* Efek 3D halus */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.2s;
    border-bottom: 3px solid #d2b48c;
}

.model-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    border-bottom-color: #b59a6e;
}

.model-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-bottom-width: 2px;
}

.model-item input[type="checkbox"] {
    margin-right: 8px;
}

.model-item .model-icon {
    margin-right: 5px;
    font-size: 14px;
    width: 14px;
    text-align: center;
    transition: all 0.2s ease;
}

.model-item:has(input:checked) {
    background: #e3f2fd;
    border-color: #2196F3;
}

.model-item:has(input:checked) .model-icon {
    transform: scale(1.1);
}

.model-item input[type="checkbox"]:checked + .model-icon {
    transform: scale(1.2);
    filter: brightness(1.2);
}


/* MODEL FILTER - Dimensi */

.dimensi-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.dimensi-item {
    width: calc(50% - 4px);
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    background: white;
    box-sizing: border-box;
}

.dimensi-item:focus {
    border-color: #2196F3;
    outline: none;
    box-shadow: 0 0 0 2px rgba(33,150,243,0.1);
}

.dimensi-item[type="number"] {
    -moz-appearance: textfield;
}

.dimensi-item[type="number"]::-webkit-outer-spin-button,
.dimensi-item[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.range-info {
    margin-top: 12px;
    text-align: right;
    font-size: 11px;
    color: #666;
}

.range-info i {
    color: #2196F3;
    margin-right: 4px;
}