/*--------------------------------------
  1. CONTENEDOR GENERAL RESPONSIVE
--------------------------------------*/
.imor-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/*--------------------------------------
  2. BUSCADOR CON ICONO DE LIMPIEZA (X)
--------------------------------------*/
.imor-search-box {
    position: relative;
    margin-bottom: 12px;
}

.imor-search-box input {
    width: 100%;
    padding: 10px 38px 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease;
}

.imor-search-box input:focus {
    border-color: #10b981;
}

.imor-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background: #9ca3af;
    color: #ffffff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    z-index: 5;
    transition: background-color 0.2s ease;
}

.imor-search-clear.visible {
    display: flex !important;
}

.imor-search-clear:hover {
    background: #4b5563;
}

/*--------------------------------------
  3. PESTAÑAS (TIENDAS / FABRICANTES)
--------------------------------------*/
.imor-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.imor-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-weight: 600;
    font-size: 13.5px;
    text-align: center;
    color: #374151;
    transition: all 0.2s ease;
}

.imor-tab-tiendas.active {
    background: #000000;
    color: #ffffff;
    border-color: #000000;
}

.imor-tab-fabricas.active {
    background: #6b7280;
    color: #ffffff;
    border-color: #6b7280;
}

.imor-tab-content {
    display: none;
}

.imor-tab-content.active {
    display: block;
}

/*--------------------------------------
  4. LISTADO Y AVISOS DE PROXIMIDAD
--------------------------------------*/
.imor-list {
    width: 360px;
    max-height: 580px;
    overflow-y: auto;
    padding-right: 4px;
}

.imor-cerca-ti {
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    border-left: 4px solid #10b981;
    border-radius: 4px;
}

.imor-cerca-ti span {
    display: block;
    font-weight: 700;
    font-size: 14.5px;
    color: #0f172a;
}

.imor-cerca-ti small {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/*--------------------------------------
  5. MAPA LEAFLET
--------------------------------------*/
#imor-map {
    flex: 1;
    min-height: 520px;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
}

/*--------------------------------------
  6. TARJETAS / FICHAS
--------------------------------------*/
.imor-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 14px;
    margin-bottom: 14px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    border-left: 5px solid #10b981;
    transition: all 0.2s ease;
}

.imor-card.selected {
    border-left-color: #0073aa;
    background: #f0f9ff;
}

.imor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.imor-card-title {
    font-size: 15.5px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

/* ETIQUETA DE DISTANCIA EN KM */
.imor-card-distance {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    color: #047857;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    padding: 2px 8px;
    border-radius: 4px;
    margin-top: 6px;
}

/* BOTÓN VOLVER */
.imor-btn-back {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.imor-btn-back:hover {
    background: #e5e7eb;
    color: #111827;
}

.imor-card-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.imor-card-address {
    font-size: 13px;
    color: #374151;
    line-height: 1.4;
    margin-bottom: 6px;
}

.imor-card-subtext {
    color: #6b7280;
    font-size: 12px;
}

.imor-card-phone, .imor-card-hours {
    font-size: 12.5px;
    color: #4b5563;
    margin-top: 3px;
}

.imor-card-phone a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
}

.imor-card-footer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.imor-btn-favourite {
    display: block;
    width: 100%;
    text-align: center;
    background-color: #10b981;
    color: #ffffff !important;
    padding: 8px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    text-decoration: none !important;
    box-sizing: border-box;
}

.imor-btn-favourite:hover {
    background-color: #059669;
}

/*--------------------------------------
  7. ADAPTACIÓN MÓVIL
--------------------------------------*/
@media (max-width: 768px) {
    .imor-wrapper {
        flex-direction: column-reverse;
    }
    
    .imor-list {
        width: 100%;
        max-height: none;
        padding-right: 0;
    }

    #imor-map {
        width: 100%;
        min-height: 320px;
        height: 320px;
    }
}
/* Título encima del buscador */
.imor-titulo-cerca {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    display: block;
}

/* Leyenda explicativa debajo */
.imor-leyenda-busqueda {
    display: block;
    font-size: 12.5px;
    color: #64748b;
    margin-top: 6px;
    margin-bottom: 14px;
}

/* Texto del cuadro de búsqueda más grande */
.imor-search-box input {
    font-size: 16px !important;
}

/* Placeholder ("Buscar por provincia...") más grande */
.imor-search-box input::placeholder {
    font-size: 15.5px !important;
    color: #6b7280;
}