/* Main Container */
.distribuidores-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Main Layout Proportions (40/60) */
.distribuidores-main-layout {
    display: grid;
    grid-template-columns: 45% 55%;
    gap: 0;
    margin: 0;
    min-height: 550px; /* Default height */
    align-items: stretch;
}

.distribuidores-search-sidebar {
    padding-right: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertical Centering */
}

/* Main Title Style */
.distribuidores-main-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
    color: #000;
}

/* Custom Select Dropdown */
.distribuidores-search-wrapper {
    margin-bottom: 20px;
}

.custom-select-wrapper {
    position: relative;
    user-select: none;
    margin-bottom: 15px;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 10px 0; /* Minimalist design */
    font-size: 18px;
    font-weight: 400;
    color: #333;
    background: transparent;
    cursor: pointer;
    border: none;
    border-bottom: 1px solid #000; /* Underline style as in image */
    transition: all 0.3s ease;
}

.custom-options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ddd;
    border-top: 0;
    background: #fff;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.custom-select.open .custom-options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    margin-top: 5px;
}

.custom-option {
    position: relative;
    display: block;
    padding: 10px 15px;
    font-size: 15px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-option:hover,
.custom-option.selected {
    color: #000;
    background-color: #f5f5f5;
}

/* Arrow Icon */
.arrow-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    margin-left: 10px;
}

.simple-arrow {
    border: solid #000;
    border-width: 0 2px 2px 0;
    display: block;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    transition: all 0.2s;
    margin-top: -4px;
}

.custom-select.open .simple-arrow {
    transform: rotate(-135deg);
    margin-top: 2px;
}


/* Near Me Button */
.near-me-container {
    margin-bottom: 30px;
}

.btn-near-me {
    font-size: 14px;
    color: #888;
    text-decoration: underline;
    cursor: pointer;
}

/* Results Section with Internal Scroll */
.distribuidores-results {
    max-height: 500px; /* Default height for scroll */
    overflow-y: auto;
    padding-right: 15px;
}

/* Custom Scrollbar */
.distribuidores-results::-webkit-scrollbar {
    width: 4px;
}
.distribuidores-results::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.distribuidores-results::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Distributor Cards */
.distribuidor-item {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
    cursor: pointer;
}

.distribuidor-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

.distribuidor-details p {
    margin: 5px 0;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
}

.distribuidor-icon {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    color: #000;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.distribuidor-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Map Section (No Rounded Corners) */
.distribuidores-map-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%; /* Force grid cell height */
}

#distribuidores-map {
    width: 100%;
    flex-grow: 1; /* Stretch to fill flex container */
    min-height: 300px; /* Fallback for very small screens */
    height: 100%;
    border-radius: 0; /* SQUARE CORNERS */
    border: none;
    z-index: 1;
}

.no-distribuidores-initial {
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 992px) {
    .distribuidores-main-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto auto;
        min-height: auto !important;
    }
    
    .distribuidores-search-sidebar {
        padding-right: 0;
        margin-bottom: 30px;
        justify-content: flex-start;
    }
    
    .distribuidores-map-wrapper {
        width: 100%;
    }
    
    #distribuidores-map {
        height: 400px;
        min-height: 400px;
    }
    
    .distribuidores-results {
        max-height: 400px;
    }
}

/* Radar Pulse Animation for Clusters */
@keyframes cluster-radar-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.marker-cluster div {
    transform: scale(0.85);
    animation: cluster-radar-pulse 1.5s infinite;
}