.sucursales-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.sucursales-header {
    margin-bottom: 14px;
}

/* Buscador de sucursales */
.buscador-sucursales {
    display: flex;
    margin-bottom: 12px;
}

.input-buscar-sucursales {
    flex: 1;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #008333;
    border-right: none;
    border-radius: 8px 0 0 8px;
    background-color: #fff;
    color: #333;
    box-sizing: border-box;
    min-width: 0;
}

.input-buscar-sucursales:focus {
    outline: none;
}

.input-buscar-sucursales::placeholder {
    color: #999;
}

.btn-buscar {
    padding: 0 18px;
    background: #008333;
    color: white;
    border: 2px solid #008333;
    border-left: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-buscar:hover {
    background: #006622;
}

.btn-buscar svg {
    width: 20px;
    height: 20px;
    stroke: white;
    fill: none;
}

/* Fila de filtros (zona + geolocalización) */
.filtros-fila {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    align-items: stretch;
}

.filtro-zona-select {
    width: 180px;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid #008333;
    border-radius: 8px;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23008333" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    color: #008333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filtro-zona-select:focus {
    outline: none;
}

/* Botón geolocalización */
.btn-geolocalizacion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #008333;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-geolocalizacion:hover {
    background: #006622;
}

.btn-geolocalizacion:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-geolocalizacion svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.sucursales-header h2 {
    color: #008333;
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: 700;
}

.filtros-caracteristicas {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filtro-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filtro-item:hover {
    background: #e8f5e9;
}

.filtro-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #008333;
}

.filtro-item span {
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* Botones de navegación entre secciones */
.btn-navegacion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    background: #f5f5f5;
    color: #333 !important;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.btn-navegacion:hover {
    background: #e8f5e9;
    color: #333 !important;
    text-decoration: none !important;
}

.btn-navegacion:visited {
    color: #333 !important;
}

.sucursales-content {
    display: grid;
    grid-template-columns: 440px 1fr;
    gap: 40px;
    overflow: hidden;
}

.sucursales-options {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lista-sucursales-count {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
    padding-left: 2px;
}

.lista-sucursales {
    overflow-y: auto;
    padding-right: 10px;
    max-height: 340px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lista-sucursales::-webkit-scrollbar {
    width: 3px;
}

.lista-sucursales::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.lista-sucursales::-webkit-scrollbar-thumb {
    background: #008333;
    border-radius: 10px;
}

.lista-sucursales::-webkit-scrollbar-thumb:hover {
    background: #006622;
}

.sucursal-card {
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    padding: 20px 16px 20px 24px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: auto;
    display: flex;
    align-items: center;
}

.sucursal-card:hover {
    background: #e8f5e9;
}

.sucursal-card.highlight {
    background: #e8f5e9;
    border-left: 4px solid #008333;
}

.sucursal-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 12px;
}

.sucursal-text {
    flex: 1;
    min-width: 0;
}

.sucursal-nombre {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    font-family: "Carot Sans", Sans-serif;
    margin: 0 0 4px 0;
    line-height: 1.25;
}

.sucursal-direccion {
    font-size: 13px;
    color: #666;
    margin: 0;
    margin-bottom: 0 !important;
    line-height: 1.4;
}

.sucursal-distancia {
    font-size: 12px;
    color: #008333;
    font-weight: 600;
    margin-top: 4px;
}

.btn-ver-mapa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: transparent;
    color: #008333;
    border: 1px solid #008333;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 94px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-ver-mapa:hover {
    background-color: #008333;
    color: white;
}

.mapa-container {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
    background: #ffffff;
    min-height: 420px;
}

#mapa, .mapa-instance {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: none;
    background: transparent;
}

.gm-style .gmnoprint,
.gm-style-cc {
    opacity: 0.3;
}

.gm-style .gmnoprint:hover,
.gm-style-cc:hover {
    opacity: 1;
}

.info-window {
    padding: 12px;
    max-width: 320px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.info-window h3 {
    margin: 0 0 12px 0;
    color: #008333;
    font-size: 16px;
    font-weight: 600;
}

.info-window p {
    margin: 6px 0;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.info-horario {
    margin-top: 12px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 3px solid #008333;
    font-size: 12px;
    line-height: 1.6;
    color: #555;
}

#no-resultados,
.no-resultados-msg {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

#no-resultados p,
.no-resultados-msg p {
    font-size: 15px;
}

@media (max-width: 1024px) {
    .sucursales-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .lista-sucursales {
        max-height: 300px;
        margin-bottom: 20px;
    }
    
    .mapa-container {
        min-height: 350px;
    }
    
    #mapa, .mapa-instance {
        min-height: 350px;
    }
    
    .region-select,
    .filtro-zona-select {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .sucursales-header h2 {
        font-size: 24px;
    }
    
    .buscador-sucursales {
        flex-direction: row;
    }
    
    .input-buscar-sucursales {
        font-size: 16px;
    }
    
    .filtros-fila {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtro-zona-select {
        max-width: 100%;
        width: 100%;
    }
    
    .btn-geolocalizacion {
        width: 100%;
        justify-content: center;
    }
    
    .filtros-caracteristicas {
        gap: 8px;
    }
    
    .filtro-item {
        padding: 6px 10px;
    }
    
    .filtro-item span {
        font-size: 12px;
    }
    
    .lista-sucursales {
        max-height: 280px;
    }
    
    .mapa-container {
        min-height: 300px;
    }
    
    #mapa, .mapa-instance {
        min-height: 300px;
    }
    
    .sucursal-card {
        padding: 16px 12px 16px 18px;
    }
    
    .sucursal-nombre {
        font-size: 14px;
    }
    
    .sucursal-direccion {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .sucursales-container {
        padding: 15px;
    }
    
    .sucursal-card {
        padding: 12px;
    }
    
    .sucursal-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .btn-ver-mapa {
        width: 100%;
    }
}

/* Lista simple */
.lista-sucursales-simple {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.lista-titulo {
    text-align: left;
    color: #008333;
    font-size: 32px;
    font-weight: 300;
    margin: 0 0 30px 0;
}

.lista-filtros {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    flex-direction: column;
}

.filtro-select {
    padding: 12px 40px 12px 16px;
    font-size: 15px;
    font-weight: 600;
    border: 2px solid #008333;
    border-radius: 8px;
    background-color: #fff;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23008333" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    color: #008333;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    line-height: 1.4;
    min-width: 100px;
    width: 100%;
    max-width: 280px;
    margin: auto;
}

.filtro-select:hover,
.filtro-select:focus {
    border-color: #006622;
    outline: none;
}

.grid-sucursales-simple {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 8px;
    margin-bottom: 40px;
}

.tarjeta-sucursal-simple {
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    padding: 16px 16px 16px 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80px;
}

.tarjeta-sucursal-simple:hover {
    background: #e8f5e9;
}

.tarjeta-info {
    flex: 1;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.tarjeta-nombre {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    font-family: "Carot Sans", Sans-serif;
    margin: 0;
    line-height: 1.25;
}

.tarjeta-direccion {
    font-size: 13px;
    color: #666;
    margin: 0;
    margin-bottom: 0 !important;
    line-height: 1.4;
}

.tarjeta-boton {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: transparent;
    color: #008333;
    text-decoration: none;
    border: 1px solid #008333;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 94px;
    justify-content: center;
    text-decoration: none !important;
    flex-shrink: 0;
}

.tarjeta-boton:hover {
    background: #008333;
    color: white;
}

.sin-resultados {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
}

@media (max-width: 768px) {
    .lista-titulo {
        font-size: 24px;
    }
    
    .grid-sucursales-simple {
        grid-template-columns: 1fr;
    }
    
    .lista-filtros {
        flex-direction: column;
    }
    
    .filtro-select {
        width: 100%;
        min-width: auto;
    }
    
    .tarjeta-sucursal-simple {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }
    
    .tarjeta-info {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .tarjeta-boton {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .lista-sucursales-simple {
        padding: 0 15px;
    }
    
    .lista-titulo {
        font-size: 20px;
    }
    
    .tarjeta-nombre {
        font-size: 14px;
    }
}

/* ============================================
   MODAL MOBILE PARA SUCURSALES
   ============================================ */

.sucursal-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease;
}

.sucursal-modal.active {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
}

.sucursal-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.sucursal-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.sucursal-modal.active .sucursal-modal-content {
    transform: translateY(0);
}

.sucursal-modal-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
}

.sucursal-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sucursal-modal-close:hover {
    background: #eee;
}

.sucursal-modal-body {
    padding: 0 20px 30px;
}

.sucursal-modal-header {
    padding: 10px 0 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.sucursal-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #2D5A27;
    padding-right: 30px;
}

.sucursal-modal-info {
    margin-bottom: 20px;
}

.sucursal-modal-row {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    align-items: flex-start;
}

.sucursal-modal-row:last-child {
    border-bottom: none;
}

.sucursal-modal-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2D5A27;
}

.sucursal-modal-icon svg {
    flex-shrink: 0;
}

.sucursal-modal-row span,
.sucursal-modal-row a {
    font-size: 15px;
    color: #333;
    line-height: 1.5;
}

.sucursal-modal-row a {
    color: #008333;
    text-decoration: none;
    font-weight: 500;
}

.sucursal-modal-horario {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.sucursal-modal-horario h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sucursal-modal-horario-content {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

.sucursal-modal-actions {
    display: flex;
    gap: 12px;
}

.sucursal-modal-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.sucursal-modal-btn svg {
    flex-shrink: 0;
}

.sucursal-modal-btn span {
    font-size: 15px;
}

.sucursal-modal-btn-directions {
    background: #2D5A27;
    color: #fff;
}

.sucursal-modal-btn-directions:hover {
    background: #234a1f;
    color: #fff;
}

.sucursal-modal-btn-call {
    background: #f0f0f0;
    color: #333;
}

.sucursal-modal-btn-call:hover {
    background: #e5e5e5;
    color: #333;
}

/* Esconder en desktop */
@media (min-width: 768px) {
    .sucursal-modal {
        display: none !important;
    }
}