/* --- LAYOUT RESET --- */
.dealer-locator-container {
    font-family: 'Inter', 'Roboto', sans-serif;
    width: 100%; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 40px;
}

/* Wrapper */
.locator-wrapper {
    display: flex; flex-direction: row;
    width: 100%; background: #fff;
    border-radius: 6px; overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #ddd;
}

/* Map Section */
.map-section { flex: 1; position: relative; height: 100%; }
#dealer-map { width: 100%; height: 100% !important; background: #e5e7eb; z-index: 1; }

/* Sidebar */
.locator-controls {
    width: 340px; flex-shrink: 0; padding: 25px;
    background: #fff; border-left: 1px solid #eee;
    overflow-y: auto; height: 100%; display: flex; flex-direction: column;
    box-sizing: border-box; z-index: 2;
}

.sidebar-header h3 { margin: 0 0 20px 0; font-size: 18px; font-weight: 700; color: #333; display: flex; align-items: center; gap: 8px; }

/* Inputs */
.search-box { position: relative; }
.search-box i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #999; }
#dealer-search { width: 100%; padding: 12px 12px 12px 38px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; background: #f9f9f9; outline: none; transition: all 0.2s; box-sizing: border-box;}
#dealer-search:focus { background: #fff; border-color: #0F1E36; }

.flex-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.badge { background: #eee; color: #555; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; }
#radius-slider { width: 100%; cursor: pointer; height: 5px; accent-color: #0F1E36; }

.control-group { margin-bottom: 20px; }
.control-group label { font-size: 11px; font-weight: 700; color: #666; text-transform: uppercase; margin-bottom: 8px; display: block; }

.services-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.services-grid label { font-size: 13px; color: #444; display: flex; align-items: center; gap: 8px; cursor: pointer; }

.btn-geo { width: 100%; padding: 14px; border: none; border-radius: 4px; color: white; font-weight: 700; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: all 0.2s; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-geo:hover { opacity: 0.9; transform: translateY(-1px); }

.results-meta { text-align: center; font-size: 12px; color: #999; margin-top: 15px; }

/* --- CARD DESIGN --- */
.dealer-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.dealer-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.04);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    display: flex; flex-direction: column;
}

.dealer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* HEADER */
.dealer-card-header {
    background: #0F1E36; /* PHP vervangt dit */
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.dealer-card-header h4 { margin: 0; font-size: 17px; color: #fff; font-weight: 600; letter-spacing: 0.5px; }
.header-icon { color: rgba(255,255,255,0.4); font-size: 18px; }

/* BODY */
.dealer-card-body { padding: 20px; flex-grow: 1; background: #fff; display: flex; flex-direction: column; gap: 12px; }

.data-row { display: flex; align-items: center; gap: 12px; font-size: 14px; color: #333; line-height: 1.5; }
.data-icon { 
    width: 20px; height: 20px; 
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.data-icon i { color: #999; font-size: 16px; } 
.data-content { color: #555; word-break: break-word; }

.data-link { text-decoration: none; color: #333; font-weight: 500; transition: color 0.2s; }
.data-link:hover { color: #0F1E36; text-decoration: underline; }

/* Tags */
.services-section { margin-top: 10px; padding-top: 15px; border-top: 1px solid #f0f0f0; }
.services-title { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #999; margin-bottom: 8px; display: block; }
.dealer-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 3px; background: #f4f4f4; color: #666; border: 1px solid #eee; }

/* FOOTER */
.dealer-card-footer {
    padding: 15px 20px; background: #f9f9f9; border-top: 1px solid #eee;
}
.route-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 10px; border-radius: 4px;
    border: 1px solid #0F1E36; background: transparent;
    color: #0F1E36; font-size: 13px; font-weight: 700; text-decoration: none; transition: all 0.2s; box-sizing: border-box;
}
.route-btn:hover { background: #0F1E36; color: #fff; }

/* POPUP FIXES */
.leaflet-popup-content-wrapper { padding: 0; border-radius: 6px; overflow: hidden; }
.leaflet-popup-content { margin: 0 !important; width: 320px !important; }
/* Sluitknop wit maken op de blauwe header */
.leaflet-container a.leaflet-popup-close-button {
    color: #fff; font-size: 20px; top: 10px; right: 10px; text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Mobile */
@media (max-width: 900px) {
    .locator-wrapper { flex-direction: column; height: auto !important; }
    .map-section { height: 400px !important; }
    .locator-controls { width: 100%; border-left: none; border-top: 1px solid #ddd; }
}