/* TTF Font tanımı */
@font-face {
    font-family: 'FontAwesome';
    src: url('../fonts/fa-solid-900.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Ana Container - Grid Layout */
.mlk-dealer-locator-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

@media (max-width: 768px) {
    .mlk-dealer-locator-container {
        grid-template-columns: 1fr;
        padding: 10px;
    }
}

/* Sol Panel - Filtreleme */
.mlk-filter-panel {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.mlk-filter-box {
    margin-bottom: 20px;
}

.mlk-filter-box label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.mlk-filter-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.3s;
}

.mlk-filter-select:focus {
    outline: none;
    border-color: #0073aa;
}

/* Butonlar */
.mlk-filter-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.mlk-btn-primary,
.mlk-btn-secondary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mlk-btn-primary {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    box-shadow: 0 3px 6px rgba(0,115,170,0.3);
}

.mlk-btn-primary:hover {
    background: linear-gradient(135deg, #005a87 0%, #004a70 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0,115,170,0.4);
}

.mlk-btn-secondary {
    background: #f1f1f1;
    color: #333;
    border: 2px solid #ddd;
}

.mlk-btn-secondary:hover {
    background: #e0e0e0;
    border-color: #ccc;
}

/* Sonuç sayacı */
.mlk-results-count {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    box-shadow: 0 3px 6px rgba(0,115,170,0.2);
}

#mlk-dealer-count {
    font-size: 24px;
    font-weight: 700;
    display: inline-block;
    margin-right: 5px;
}

/* Sağ Panel - Harita */
.mlk-map-panel {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.mlk-map-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.mlk-main-map {
    width: 100%;
    height: auto;
    max-height: 70vh;
    display: block;
}

.mlk-markers-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Markerlar - DÜZELTİLDİ */
.mlk-marker {
    position: absolute;
    font-family: 'FontAwesome', sans-serif;
    font-weight: 900;
    font-size: clamp(18px, calc(26px * var(--mlk-scale, 1)), 36px);
    transform: translate(-50%, -50%);
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.mlk-marker:hover {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 100;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

/* Pulse efekti */
.mlk-marker::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    background: currentColor;
    animation: mlk-pulse 2s infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    opacity: 0.4;
}

@keyframes mlk-pulse {
    0% { 
        transform: translate(-50%, -50%) scale(0.8); 
        opacity: 0.8; 
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.5); 
        opacity: 0.3; 
    }
    100% { 
        transform: translate(-50%, -50%) scale(2); 
        opacity: 0; 
    }
}

/* Lightbox - Hover tooltip */
.mlk-lightbox {
    display: none;
    position: absolute;
    bottom: 42px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.92);
    color: #fff;
    padding: calc(10px * var(--mlk-scale, 1)) calc(16px * var(--mlk-scale, 1));
    border-radius: 6px;
    white-space: nowrap;
    font-size: calc(13px * var(--mlk-scale, 1));
    font-family: Arial, sans-serif;
    font-weight: normal;
    z-index: 200;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    animation: mlk-tooltip-in 0.2s ease;
}

@keyframes mlk-tooltip-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.mlk-lightbox::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.92);
}

.mlk-lightbox strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.mlk-marker:hover .mlk-lightbox {
    display: block;
}

/* Legend - Açıklama */
.mlk-map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.mlk-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.mlk-legend-item:hover {
    background: #f5f5f5;
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.mlk-legend-item.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    box-shadow: 0 3px 8px rgba(0,115,170,0.3);
}

.mlk-icon {
    font-family: 'FontAwesome', sans-serif;
    font-weight: 900;
    font-size: 18px;
}

/* Alt Detay Paneli */
.mlk-detail-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.25);
    padding: 30px;
    z-index: 10000;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 450px;
    overflow-y: auto;
    border-top: 3px solid #0073aa;
}

.mlk-detail-panel.active {
    bottom: 0;
}

.mlk-detail-content {
    padding-right: 50px;
    max-width: 900px;
    margin: 0 auto;
}

.mlk-detail-content h2 {
    margin: 0 0 20px 0;
    color: #0073aa;
    font-size: 24px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 12px;
}

.mlk-detail-photo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 12px 0 20px 0;
}
.mlk-detail-photo img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    border: 2px solid #e0e0e0;
}
.mlk-author-name {
    font-weight: 600;
    color: #333;
}

.mlk-detail-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: #f1f1f1;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mlk-detail-close:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.mlk-detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.mlk-detail-row:last-child {
    border-bottom: none;
}

.mlk-detail-row strong {
    min-width: 180px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.mlk-detail-row span {
    color: #666;
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
}

.mlk-cert-section {
    margin-top: 16px;
}
.mlk-cert-section h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}
.mlk-cert-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.mlk-cert-item {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    background: #fafafa;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.mlk-cert-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mlk-cert-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}
.mlk-cert-name {
    padding: 8px 10px;
    font-size: 13px;
    color: #444;
    border-top: 1px solid #eee;
}

#mlk-lightbox-overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}
#mlk-lightbox-overlay.active {
    display: flex;
}
#mlk-lightbox-overlay .mlk-lightbox-box {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
#mlk-lightbox-overlay .mlk-lightbox-box img {
    max-width: 90vw;
    max-height: 90vh;
    display: block;
}
#mlk-lightbox-overlay .mlk-lightbox-caption {
    margin-top: 8px;
    font-size: 14px;
    color: #333;
    text-align: center;
    width: 100%;
    word-break: break-word;
}
#mlk-lightbox-overlay .mlk-lightbox-prev,
#mlk-lightbox-overlay .mlk-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #fff;
    border: none;
    font-size: 48px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 12px;
    user-select: none;
}
#mlk-lightbox-overlay .mlk-lightbox-prev { left: 18px; }
#mlk-lightbox-overlay .mlk-lightbox-next { right: 18px; }
@media (max-width: 768px) {
    #mlk-lightbox-overlay .mlk-lightbox-prev,
    #mlk-lightbox-overlay .mlk-lightbox-next {
        font-size: 36px;
    }
}

/* Responsive - Mobil */
@media (max-width: 768px) {
    .mlk-filter-panel {
        padding: 20px;
    }
    
    .mlk-map-panel {
        padding: 15px;
    }
    
    .mlk-marker {
        font-size: 24px;
    }
    
    .mlk-detail-panel {
        padding: 20px;
    }
    
    .mlk-detail-content {
        padding-right: 30px;
    }
    
    .mlk-detail-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .mlk-detail-row strong {
        min-width: auto;
    }
    .mlk-cert-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    
    .mlk-legend-item {
        font-size: 13px;
        padding: 8px 12px;
    }
}

/* Scrollbar styling */
.mlk-detail-panel::-webkit-scrollbar {
    width: 8px;
}

.mlk-detail-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mlk-detail-panel::-webkit-scrollbar-thumb {
    background: #0073aa;
    border-radius: 4px;
}

.mlk-detail-panel::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}
